Ask a Question related to Macromedia Director 3D, Design and Development.
-
MartyPlumbo #1
Moving Along a Curve in 3D
Does anyone out there know how to do the math to make an object in 3D space transform from point A through point B to point C, in a smooth curve?
To put it another way, I'd like a 3D object to move from one point in space to another, passing through a specified intermediate point, all using a regular arc.
Sort of like the cool 2D curve math on the Hairybobbies site ([url]http://www.geocities.com/hairybobby2000/mathhome.html[/url]), but now in 3D.
Anyone done this yet?
:-)
MartyPlumbo Guest
-
Length of curve?
I have a closed curve of irregular shape, and I would like to divide it into segments of equal length. Does Freehand have any features to deal with... -
Paths-Drawing a curve on a curve
Probably a simple task, but if I start out drawing a curved path and I want to make my next section a curve also, how do I do it? For example, if I... -
Moving Randomly Moving Sprite To New Location on mouseEnter
Hi All, This is way over my head. I am currently using Director 8. I have a randomly moving sprite(call it X) on stage (I accomplished this... -
just half a bezier curve please
Does anyone know the lingo for animating a vertex list . I understand how to create a bezier curve in code. but lets say i have a curve - how can I... -
curve effect
Hi, How do I get the curve effect here. It's on the top of the page. http://www.regmovies.com Thanks David -
paul #2
Re: Moving Along a Curve in 3D
I asked the same thing a year or two ago and saved the response from Paul
L...
Here is a parent script modified to work in 3d.
usage is:-
bezierCurver=script("3d
bezier").new(vector(0,0,0),vector(100,100,100),vec tor(-20,20,20),vector(120,
100,100))
then work out your time t as a value between 0 and 1
currentPosition=bezierCurver.getPosition(t)
read on for parent script (put it in a parent script cast member called "3d
bezier"
-- 3d bezier curve parent script
-- Paul Lemon (paull@pilotinteractive.co.uk)
property a,b,c
property start
on new me, istart, end, control1,control2
-- istart is a vector representing the start position in 3d space
-- end is a vector representing the end position in 3d space
-- control1 is a vector representing the first control point
-- control2 is a vector representing the second control point
start=istart
c=3*(control1-start)
b=3*(control2-control1) - c
a=end-start-c-b
return me
end
on getPosition me,t
-- returns a vector describing the beziers position at a point in time t
-- 0<= t <=1
t2=t*t
t3=t*t2
return a*t3 + b*t2 + c*t + start
end
on getOrientation me,t
-- returns a vector describing the direction(velocity) the beziers is
-- pointing in at time t
-- 0<= t <=1
t2=t*t
return 3*a*t2 + 2*b*t +c
end
on getspeed me,t
return=me.getOrientation(t).magnitude
end
"MartyPlumbo" <martyp@insightbb.com> wrote in message
news:bstv3f$8u6$1@forums.macromedia.com...space transform from point A through point B to point C, in a smooth curve?>
> Does anyone out there know how to do the math to make an object in 3D
paul Guest



Reply With Quote

