PDA

View Full Version : Spiral motion path



Jerry Pine
03-28-2003, 06:17 PM
I'm running LW 6.5 on a PC. I have a spiral tube that I need to run a ball through. I don't see a function in Layout mode that will allow me to "draw" a motion path. The tube is spiral like the "hypnosis wheel" that you see in cartoons. It is not spiral like a cork screw.

If you could explain your answers simply, I'd apprecitate it. I really have not done anything with LW since V5. I'm doing this as a favor for a collegue of my wife at the univeristy.

Many TIA

Jerry Pine

Heimhenge
03-29-2003, 12:04 AM
Don't know if LW earlier than 7.5 (which I started on) has Motion Mixer, but if it does, you should be able to combine a circular motion with a radial (in or out) motion and tweak it till it fits the existing spiral.

It would be cool to be able to just draw a motion path, but I don't think that's possible in 7.5 even. At least I haven't found it yet.

Without knowing the dimensions of the spiral path I can't be explicit, but here's a specific example using Graph Editor. It will generate a spiral in the XZ plane with a starting radius of 10m at Time=0 and a radius of 1m at Time=60.

For the X expression use: (10 - 0.15*Time)*sin(PI*Time)
For the Z expression use: (10 - 0.15*Time)*cos(PI*Time)

Note that the "decay" factor is linear in this case. You could also use logarithmic decay ... depends on the shape of your spiral. The sine and cosine expressions alone generate a pure circular motion. You can probably wing it from here by tweaking the numeric parameters. Hope this helps!

Samba
03-29-2003, 07:01 AM
You can create your motion path as a spline in modeler.Save this object send it to layout then select the object you want to move along this path and activate the CurveConstraint plugin in the motion panel.There you just have to choose your spline object as path to follow. :D

WCameron
03-29-2003, 07:04 AM
and the easiest way to create the spline is to grab a single line of points off your geometry and make the spline from them :-)

- Will.
(Well, usually its easier :-)

Heimhenge
03-29-2003, 09:19 AM
Samba: Cool. I was hoping there was a way to literally draw a motion path, and you (sort of) answered my question. Like Jerry, I needed to make an object move in a spiral path, and using expressions in Graph Editor was the only thing that really worked well for me.

So here's a followup question ... splines or not, smooth spirals are notoriously difficult to draw. Is there some way to "automate" the creation of a spiral spline with an expression or something so that each loop of the spiral is evenly spaced and smoothly curved?

Arnie Cachelin
03-29-2003, 09:41 AM
If you put a NULL in the center of the spiral, and make it the parent of the ball, you can rotate the null while moving the ball in from the outermost radius of the spiral. This will result in a nice spiral motion. If that is not fancy enough, you could use an expression or follower to tie the ball's distance from the center (call it X) to the angle of the null.

Heimhenge
03-29-2003, 10:42 AM
You know, I tried to do just that. But I couldn't "tie the ball's distance from the center" to anything as I couldn't find a variable that would represent it. Can't use X (or Z) literally since that coordinate varies depending on system rotation angle.

I tried using this expression for the distance from the center:

([ball.position.X])^2+([ball.position.Z]}^2

Sorta like the Pythagorean Theorem in the XZ plane, but couldn't get it to work. Is the syntax wrong?

BTW ... I found the documentation for expressions really dismal. If you have a link to a good reference on expressions I'd appreciate your posting it. Thanks.

Samba
03-30-2003, 11:49 AM
How to draw an "equally spaced" spiral in modeler:
Create a straight two points spline in modeler in the XY plane and parallel with the y-axis, but shift it from the plane center. To have your points equally spaced along this spline you can freeze it (ctrl d) and create a new spline with the newly created points.If you don't have enough points repeat the former action. Then you just have to use the twist function centered on the y-axis and so you have your spiral...:D

Heimhenge
03-30-2003, 12:56 PM
Methinks the twisted spline would, as described, produce a helix and not a spiral, no? It sounded like Jerry originally asked about a spiral. I know that's what I needed.

Samba
03-30-2003, 11:55 PM
Right, I described the creation of an helix. I 'm gonna slow down with coffee and buy a dictionnary...
So I go on: once you have a nice helix (watch two threads above), you can taper it to give it a cone shape and then constraint all its points on one plane (ctrl-v). So now you have a spiral !
Sorry :(

Jerry Pine
03-31-2003, 12:52 AM
Thanks to all for the speed and variety of replies. I used Arnie's suggestion using a null. It worked great!

Many thanks again.

Regards,

Jerry Pine