POV-Ray : Newsgroups : povray.general : Mesh rotation and inside_vector : Re: Mesh rotation and inside_vector Server Time13 Sep 2024 13:36:26 EDT (-0400)
 Re: Mesh rotation and inside_vector
 From: Bald Eagle Date: 22 Aug 2024 06:35:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.66c713b2cb3ec43f1f9dae3025979125%40news.povray.org",
"headline": "Re: Mesh rotation and inside_vector",
"dateCreated": "2024-08-22T10:35:00+00:00",
"datePublished": "2024-08-22T10:35:00+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
Ilya Razmanov <ily### [at] gmailcom> wrote:

> I was thinking a bit in similar direction previously - if I define
> rotate vector in the beginning of the scene, and then use it as argument
> to rotate the thing, then I may probably refresh my school math
> knowledge and use the same vector to create inside one.

No need to refresh any math - let POV-Ray do the heavy lifting.

If you want to end up at <x, y, z> starting from <x0, y0, z0>, then take <x, y,
z> and rotate _inverse_ the rotation of your object.

b.65c535447ecd0aa1f9dae3025979125%40news.povray.org%3E

> Haven't tried it
> though, since, obviously, even I can't stop people from rotating objects
> the way they used to, i.e. first having an object, then rotating it, and
> not vs (hm, Alice, just think of rotating object before having one).

Well, yeah - but we do all sorts of things like that here.
Because there is no camera or light or object - it's all just math.
So you're just defining a rotation matrix to use later . . .  ;)

(Maybe there's also a way to minimize that bottom mesh to use as few triangles
as possible to close it.)

- BE
```