POV-Ray : Newsgroups : povray.advanced-users : difficult questions (for me anyway) : Re: difficult questions (for me anyway) Server Time
2 Nov 2024 07:25:52 EDT (-0400)
  Re: difficult questions (for me anyway)  
From: Lars Luthman
Date: 8 Mar 2000 12:11:02
Message: <38c689a6$1@news.povray.org>
Mick Hazelgrove skrev i meddelandet <38c68473@news.povray.org>...

>I have a cylinder from 0 to x*1, rotate it randomly around the y axis. Can
I
>find the xyz values of the end point that was x*1?


I don't think that's possible, if you don't calculate the random value and
save it in a variable before you rotate the cylinder, like this:

#declare R = rand();
rotate <0, R, 0>

Then you can calculate the new endpoint using sin() and cos().


>I make a second cylinder from this point to x*2 and rotate it
>randomly - does it rotate around zero or around the end point of cylinder
>one?

Yes, everything rotates around <0, 0, 0> in POV.


If it rotates around zero how can I make it rotate around the end of
>cylinder one? do I have to translate it to zero, then rotate it, then
>translate it to the end of cylinder one?


Yeah.


--ll


Post a reply to this message

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