RE: calculating "straight line" velocity

Date : Fri, 30 Mar 2007 20:51:04 +0100
To : <XSI(at)Softimage.COM>
From : "Kim Aldis" <XSI(at)kim-aldis.co.uk>
Subject : RE: calculating "straight line" velocity

That would depend on what the number is that you’re looking for. ;-)

 

Some clarification; if you’re looking for velocity then the magnitude is not what you’re looking for. Velocity is defined as a distance travelled per unit time *in a constant direction*. The vector itself is the velocity, defining the displacement as well as the direction. The magnitude of the velocity, sometimes known as the speed of an object, has no direction. There are reasons for this distinction. Most notably, an object is defined as having an acceleration if it’s velocity is changing. This is often taken as meaning that it’s speed (magnitude of velocity)  is changing and this is correct but an object with a circular motion of constant speed also has an acceleration because it’s direction, and so it’s velocity, is changing. This is how an object being swung around your head on the end of a piece  exerts a force keeping the string taught; F = ma, force = mass times acceleration.

 

I’m going off on one I know  but it’s extremely important to be precise in your terminology when dealing with mathematical concepts. If only to stop me going off on one. ;-)

 

So, what was it you wanted?

 

From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Byron Nash
Sent: 30 March 2007 16:22
To: XSI(at)Softimage.COM
Subject: Re: calculating "straight line" velocity

 

I have a quick question based on this discussion a while back from Andi. Do I need to do anything else with the Magnitude value that Kim's script(see below) outputs to determine the velocity of an object? It seems like the value his script returns may be the number I'm looking for but I'm not sure.

On 12/5/06, Andi Farhall <andi(at)clearpost.co.uk> wrote:

Thank you chaps, most helpfull.....

 

A

-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM]On Behalf Of Kim Aldis
Sent: Tuesday, December 05, 2006 10:36 AM
To: XSI(at)Softimage.COM
Subject: RE: calculating "straight line" velocity

Velocity will be a vector, it needs a direction as well as a magnitude (length). What you're looking to find is the length of that vector which you can get using Pythagoras. Or you can use this dandy script. Beware, though, magnitude alone isn't enough to define either velocity or acceleration. They both need to be a vector:-

 

 

var oObj = selection(0);

 

var vX = oObj.kinematics.global.linvelx.value;

var vY = oObj.kinematics.global.linvely.value;

var vZ = oObj.kinematics.global.linvelz.value;

var vVec = XSIMath.CreateVector3( vX, vY, vZ );

 

var aX = oObj.kinematics.global.linaccx.value;

var aY = oObj.kinematics.global.linaccy.value;

var aZ = oObj.kinematics.global.linaccz.value;

var aVec = XSIMath.CreateVector3( aX, aY, aZ );

 

Logmessage( "Velocity Magnitude: " + vVec.length() );

Logmessage( "Acceleration Magnitude: " + aVec.length() );

 

From: owner-xsi(at)Softimage.COM [mailto: owner-xsi(at)Softimage.COM] On Behalf Of Andi Farhall
Sent: 05 December 2006 10:17
To: xsi(at)Softimage.COM
Subject: calculating "straight line" velocity

 

Hello peeps,

I'm currently doing some camera moves that will eventually end up motion control and am trying to calculate the velocity and accleration of the camera. With the global kinematic velocity and acceleration i get x y and z as seperate componetnts but i've no idea what to do mathwise to combine these numbers to get velocity in a "straight line" as in "camera doing 8 metres/second". I initially thought that i would just invert any negative numbers, add the three together and divide by 3 ( i can hear some of you laughing) but it didn't take very long before i realised it was beyond my mathmatical capabilities. Is it an easy equation that someone could explain or am i limited to doing it graphically (which will only give me velocity)?

I spent too long behind the bike shed at school clearly....

 

tia
Andi

 

 

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________




--
Byron Nash
www.armoredsquirrel.com


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.