Re: rotation in 3D
- From: "I.N. Galidakis" <morpheus@xxxxxxxxxxxx>
- Date: Thu, 10 Apr 2008 20:03:48 +0300
Steven wrote:
"I.N. Galidakis" <morpheus@xxxxxxxxxxxx> wrote in message
news:1207844007.909004@xxxxxxxxxxx
Steven wrote:
I want to rotate an object in 3d space with orthonormal axes x, y
and z. Target orientation is defined by orthogonal vectors x' and
y'. I have to rotate around x, y and z, respectively. (application
is POV-ray)
How do I do this?
You are trying to do it the hard way. POV-ray uses the orthonormal
axes <x,y,z>,
with x > 0 being to your right, y > 0 being up and z > 0 being
towards your
computer screen.
In addition, POV-ray has a macro for "camera". Here it is:
camera {
location <1.5, 1.5, -1.5>
look_at 0
angle 60
}
Instead of rotating the axes, successively change the camera
coordinates so that
the camera traverses the path of a circle normal to the axis you
want to rotate.
Rotating the camera on a circle around the y-axis for example (and
looking at
some fixed location like 0 above), is equivalent to rotating around
the y-axis.
I will let you figure out the circle equation for the camera rotation
(which is
very easy) as an exercise.
Once you figure out the equation, you only need plug-in the x and y
values in
the camera's "location", above.
This only works if there is only 1 object to rotate.
Well, your original question asked for one object:
I want to rotate an object in 3d space with orthonormal axes x, y
and z.
My scene has a
few dozens of objects, each with its own rotation, along a spline
path. AAMOF the rotation should follow the spline's curvature.
I don't understand what you mean by "along a spline path", but did you try the
macro "rotate"?
Thanks for your thoughts anyway,
You are welcome,
Steven--
I.N. Galidakis
.
- Follow-Ups:
- Cubic spline path (was: rotation in 3D)
- From: Steven
- Cubic spline path (was: rotation in 3D)
- References:
- rotation in 3D
- From: Steven
- Re: rotation in 3D
- From: I.N. Galidakis
- Re: rotation in 3D
- From: Steven
- rotation in 3D
- Prev by Date: Re: How many present day Mathematicians do you know of?
- Next by Date: Re: Is the empty set a number?
- Previous by thread: Re: rotation in 3D
- Next by thread: Cubic spline path (was: rotation in 3D)
- Index(es):
Relevant Pages
|