POV-Ray : Newsgroups : povray.binaries.tutorials : Rotating CSGs : Re: Rotating CSGs Server Time30 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>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"dateCreated": "1998-08-07T12:15:40+00:00",
"datePublished": "1998-08-07T12:15:40+00:00",
"author": {
"@type": "Person",
"name": "K  Tyler"
}
}
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
ground.

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.