POV-Ray : Newsgroups : povray.general : Mesh rotation and inside_vector : Re: Mesh rotation and inside_vector Server Time
10 Oct 2024 03:02:01 EDT (-0400)
  Re: Mesh rotation and inside_vector  
From: Bald Eagle
Date: 22 Aug 2024 06:35:00
Message: <web.66c713b2cb3ec43f1f9dae3025979125@news.povray.org>
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.
See this "recent" thread:

http://news.povray.org/povray.advanced-users/message/%3Cweb.65c535447ecd0aa1f9dae3025979125%40news.povray.org%3E/#%3Cwe
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


Post a reply to this message

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