Re: rotation in 3D



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

.



Relevant Pages

  • Re: rotation in 3D
    ... have to rotate around x, y and z, respectively. ... POV-ray uses the orthonormal axes ... successively change the camera coordinates ... Rotating the camera on a circle around the y-axis for example (and looking ...
    (sci.math)
  • Re: rotation in 3D
    ... POV-ray uses the orthonormal axes, ... successively change the camera coordinates so that ... the camera traverses the path of a circle normal to the axis you want to rotate. ...
    (sci.math)
  • RE: Light Direction relative to World Matrix
    ... It's usual practice to move the camera and derive the view matrix transform ... I can then rotate the world matrix to rotate my camera. ... I use a Tilt field to change the Z-component of my LookAt vector, ... This means that when I rotate the camera, the shadows on the ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: Camera preview orientation on HTC-Universal
    ... It sounds to me like you're seeing a camera ... does not use DirectShow or the DirectShow camera driver. ... This is necessary because as you rotate the shell on the device you also physically rotate the device. ... How can I tell the output renderer to NOT rotate / flip the content? ...
    (microsoft.public.pocketpc.developer)
  • Re: Light Direction relative to World Matrix
    ... > from the camera position, ... I can then rotate the world matrix to rotate my camera. ... I use a Tilt field to change the Z-component of my LookAt vector, ... >>Microsoft MVP ...
    (microsoft.public.win32.programmer.directx.managed)

Quantcast