POV-Ray : Newsgroups : povray.newusers : rotative illumination Server Time
25 Nov 2024 03:46:39 EST (-0500)
  rotative illumination (Message 1 to 3 of 3)  
From: pierre
Subject: rotative illumination
Date: 25 Sep 2006 07:40:00
Message: <web.4517bf9d9d0b62baad334ed60@news.povray.org>
Hello everybody,

I am trying to implement a scene in povray. I want to create an animation
where the illumination move around the scene (like the sun during day
time).
I have two major problems:
-I do not understand the coordonate system in povray: my object is a plate
with a size of dx dy dz (2000 2000 40). I want fisrt to rotate around the
center (2000 2000 20) following a perfect circle with a diameter of 2000.
My camera is situated in (<1000, 1939, 348>. My goal is to move the
illumination in the same plane than the camera. I tried with the functions
v-rotate and clock but it doesn't seem to work.

-My second point, is about an elliptic path of the illumination. Is it
possible to program such a path?

Thanks by advance

Pierre


Post a reply to this message

From: Stephen
Subject: Re: rotative illumination
Date: 25 Sep 2006 08:25:01
Message: <web.4517ca271092441bf1cb1e660@news.povray.org>
"pierre" <pie### [at] efpginpgfr> wrote:
> Hello everybody,
>
> I am trying to implement a scene in povray. I want to create an animation
> where the illumination move around the scene (like the sun during day
> time).
> I have two major problems:
> -I do not understand the coordonate system in povray: my object is a plate
> with a size of dx dy dz (2000 2000 40). I want fisrt to rotate around the
> center (2000 2000 20) following a perfect circle with a diameter of 2000.
> My camera is situated in (<1000, 1939, 348>. My goal is to move the
> illumination in the same plane than the camera. I tried with the functions
> v-rotate and clock but it doesn't seem to work.
>
> -My second point, is about an elliptic path of the illumination. Is it
> possible to program such a path?
>

Hi Pierre,
In Pov-Ray the Z-axis is up-down so your plate should be dx dy dz (2000 40
2000).
As for rotating an object all rotations are about the origin. So to start
off I suggest you create your plate and your light source at the origin
then translate the light source to the required distance and rotate it
about your plate.
Later when you get what you want, you can move your plate and light to their
proper positions. Translate the light to the origin plus the offset from
the plate, rotate it then move it back. Sounds complicated I know but when

Even later you can use v-rotate, believe me it does work.
As for an elliptical path it is possible but it depends on your maths.

Stephen


Post a reply to this message

From: Tim Attwood
Subject: Re: rotative illumination
Date: 25 Sep 2006 20:18:36
Message: <451871dc$1@news.povray.org>
The default coordinates in POV are left-handed.
If you hold your left hand with your thumb up,
your index finger pointed away, and your middle
finger bent across your body then those fingers and
thumb represent the positive directions of the
X,Y, and Z axes.

X (middle finger: right positive, left negative)
Y (thumb: up positive, down negative)
Z (index finger: forward positive, rearward negative)

Rotations also use this same memory-tool,
if you hold your left hand representing the axes, then
trace upwards from the inside of your palm with your
right pointer, rotating first around your middle, then
index, and then thumb, you are rotating in the
positive direction for the axes.

rotate X (an object on top of the x axis will rotate away)
rotate Z (an object on top of the z axis will tilt left)
rotate Y (an object on the origin will spin clockwise)

Normally, objects are created centered on the origin,
then rotated to the angle required, and then translated
to the desired location.

Simple orbits can be made by first translating an object
to it's desired location in relation to its orbit-center, and
then rotating the object around the origin, after the
desired orbital rotations are done, then translate the
object again, moving its orbit-center to the desired final
location.

Elliptical orbits can't be done with scale, except with
point_lights, because the scaling will effect the object
shape.  Instead, you do the same process with math.
POV has many built in vector functions for this.
Usually a vector will have 3 terms, representing a
point. <X,Y,Z> So if you want to calculate an elliptical
orbit, you start with a point on a circular orbit, rotate it,
scale it, then rotate the elliptical orbit about its orbit-center,
and then translate your object from where you created it
(preferably the origin) to the final position using the
point you calculated for the placement.

So for example:
#declare orbit = <10000,0,0>; //major radius
#declare orbit = vrotate(orbit,<0,360*clock,0>); // rotate about origin
#declare orbit = orbit*<1,1,0.5>; // scale z for minor radius
#declare orbit = vrotate(orbit,<-60,0,0>); // tilt orbit up
#declare orbit = vrotate(orbit,<0,30,0>); // twist orbit a bit
object { spoon translate orbit } // put it there

POV also has splines, which can be used to create custom
paths, which can be used to move objects in animations, or
to move cameras smoothly.


Post a reply to this message

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