POV-Ray : Newsgroups : povray.binaries.tutorials : Rotating CSGs : Re: Rotating CSGs Server Time
30 May 2023 10:07:26 EDT (-0400)
  Re: Rotating CSGs  
From: K  Tyler
Date: 7 Aug 1998 08:15:40
Message: <35CAD399.C036DFA4@pacbell.net>
Gregoire Millette wrote:

> Anybody know how to rotate a CSG object properly.
> I have an animation I'm working on and  I have a CSG that I just want to
> rotate on it's X axis while having it move on the Z axis creating the
> illusion that it's rolling.
> It easy with just a ball because all you have to do is rotate the
> texture but once I get to rotating the whole CSG it always rotates
> around an axis unkown? and sorta orbits it's original location.
> Any ideas?
> Greg

  Some where in the POV-Ray docs, I believe in the tutorial, section 4,
discussing the use of the clock function. One of the demonstrations
used for the tutorial is that of a ball rolling along the floor left to right.
It will give you a pretty go idea of what kind of methods to use for
the effect you describe.

    I'll offer you a little hint to get you going.
Now that you have your object rotating on it's axis,
you need to apply a translate to the object `after' the
rotate statement.
    If you place it before the rotate statement it will
cause your object to travel in continuously expanding
circles rather than having it appear to roll across the

It would look something like this:

object{YourObject rotate 720*x*clock translate 100*z*clock.}

This example will have your object rotate completely
2 times during one clock cycle and move it 100 units
into the z direction at the same time.

The example in the docs tutorial is even more informative
and even tells you how to change the direction of travel half
way through your animation. I'd read up on it if I were you.

Hope this helps and happy rendering.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.