ScriptSpot

Forum topic · General Scripting

Cosine / Sine Motion Paths

By Hofuzz · 2007-09-13

Description

Hello all,

I'm new to maxscript and would like to try applying some cosine/sine functions to motion paths. Do anyone have pointers or examples on doing this in maxscript? I'm trying to let some objects float in free space in an organic manner.

Thanks much,
Hofuzz

Comments (3)

Hofuzz · 2007-10-14

crazyosachou: Thanks I'll definitely try this out!

crazyosachou · 2007-10-13

hi,
i don't know what do u want exactelly but, try this and i hope it will help u to start:

select u'r object, go to motion panel in Command pannel,then assign to his position controller a position-scipt by clicking on the small button "?" left of the screen. go to properties of the position and paste this:

---------------------------------------------------------
--verify if the varriable "my_angle" & "my_radius" exist
--and creat them if not
if (my_angle==Undefined) do (my_angle=0.0;)
if (my_radius==Undefined) do (my_radius=10.0;)
--loop "my_angle" to avoid infinitiv incrimentation
if (my_angle>=360) do (my_angle=0)
--incrimentation of "my_angle" wich can be the speed
my_angle+=1;
--u'r function
z_position=my_radius*(cos my_angle)
--object position
[ 0, 0, z_position ]
----------------------------------------------------------

then press evaluate, play the animation, u'r object should float .hope u get what u want !!!

mikiex · 2007-09-20

you could use a waveform controller, or noise controller or a scripted controller