POV-Ray : Newsgroups : povray.general : vrotate question : Re: vrotate question Server Time 1 Jun 2023 16:17:06 EDT (-0400)
 Re: vrotate question
 From: m@b Date: 21 Jul 2022 15:09:21 Message: <62d9a461@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#62d9a461%40news.povray.org",
"dateCreated": "2022-07-21T19:09:21+00:00",
"datePublished": "2022-07-21T19:09:21+00:00",
"author": {
"@type": "Person",
"name": "m@b"
}
}
On 21/07/2022 6:10 pm, jr wrote:
> hi,
>
> "m@b" <sai### [at] googlemailcom> wrote:
>
>
>
>> You moved the point along the x axis then rotated it by 45 degrees in x.
>> The 45 degree rotation has no effect as the point is still at y = 0, z = 0
>
> no visible effect for the first point, agree, but I thought the rotation would
> (should!) still exist and propagate when subsequent points are calculated.
>
> the next question, then, is how to specify a point <5,0,0> and corresponding
> vrotate()s to give me two separate X-axis rotations (as I tried with the two
> rotation vectors)?  do I have to pre-compute some point not-on-axis beforehand,
> or is there a "clean" way?
>
>
> regards, jr.
>

This is hurting my brain a bit.

Reading the docs, the rotations are around the origin (<0,0,0>) so

#local p2_ = vrotate(<5,0,0>,<45,i_,45>);
sphere{p2_, 1}

is equivalent to:

sphere{<0,0,0>, 1 translate<5,0,0> rotate<45,i_,45>}

Not quite sure what you want to achieve.

m@
```