PDA

View Full Version : mm..vectors


samel
11-22-2006, 03:53 PM
Hi.. i have some particles moving along a surface with a noise function..
is there any way to retrieve a direction vector..

like this:

http://i14.photobucket.com/albums/a303/le_bonbon/direction_vector_help.jpg

i guess you need to do some kind of comparison between frames to get it's travelling
direction..? some cross product action going on?
a little help please.. i suck at this :D

thanks
//s

tbaypaul
11-22-2006, 07:38 PM
the average direction vector would simply be the difference between where it will be at time t + n and where it is at t. You select the n and per particle position will give you positons...

sunit
11-23-2006, 04:21 AM
velocity will give you the directional speed (speed & direction).

vector $vel = velocity;

normalizing/unitizing velocity:

unit(velocity)

will give you the same direction vector, just with a length of 1.

-sunit

samel
11-24-2006, 10:34 AM
thanks..

yup, the velocity attribute was the way to go..

//s

CGTalk Moderation
11-24-2006, 10:34 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.