![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"PreScript":The whole .pov-file is Included below!!
(Attention:this is rather a long text!!excuse my horrible english please)
Here is my Problem:
I want to have an object that is in the middle of a Room or something,
rendered so that after rendering it would seem as if the camera would
I tried to solve it "trigonometricaly" that means I translated the value
for the X-axis with cos(a)*r .(the "(a)" for alpha and "r" for the radiant.
Normaly , as expecting the camera should move counterclockwise in the
trail of the circle described through cos(a) and sin(a).
But astonishingly the camera (and also the viewpoint) jumped in
zigzag across the Image.
I wanted to proof if I done well with my mathematics and wrote a little
programm in "C" and don't wonder it didn't work either.
from 0-100 frames) 2.sin(a) 3.cos(a) 4.sin(a)*r 5.cos(a)*r.
The problem revealed just in the second row where the "prog" calculated
the value for sin(a) {I used sin(360*clock).Instead of receiving a value
near to zero (~0.008) I got -0.44. Now I do not know if it was my fault
or if there is technical problem.
Anybody a hint or solution?
#version 3.0
global_settings { assumed_gamma 2.2 }
#include "colors.inc"
#include "textures.inc"
#declare r=70; file://this is the radiant off the circle
#declare a=360*clock; // clock statement for circular movement
// #declare si=sin(a) // achieved trough sin(a)*r for the "Y-axis"
// #declare co=cos(a) // and "cos(a)*r for the "X-axis"
// #declare x_=co*r this seemed to be one possibility
// #declare y_=si*r the other one is directly "built-in"
camera {
location <0, 40, -70>
translate<cos(a)*r, 0, sin(a)*r>
look_at <0, 18, 0>
}
light_source { <-40, 100, -100> color rgb 1}
light_source { <40, 100, -100> color rgb 1 }
plane { y,0 pigment { Plum }}
box {
<-10, 0, 10>
<10, 30, -10>
pigment { checker color White color Black }
}
sphere {
<0, 30, 0>,5
pigment { color Yellow }
}
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
This won't help with the math question, but I have an online tutorial
"Advanced POV-Ray Animation for Beginners" that describes how to do an
animation like this using a bezier_spline as the camera path. It's located at
http://www.puzzlecraft.com/cm/ClockMod.html
steve
"siegfried.guendisch" wrote:
> "PreScript":The whole .pov-file is Included below!!
> (Attention:this is rather a long text!!excuse my horrible english please)
> Here is my Problem:
> I want to have an object that is in the middle of a Room or something,
> rendered so that after rendering it would seem as if the camera would
> I tried to solve it "trigonometricaly" that means I translated the value
> for the X-axis with cos(a)*r .(the "(a)" for alpha and "r" for the radiant.
> Normaly , as expecting the camera should move counterclockwise in the
> trail of the circle described through cos(a) and sin(a).
> But astonishingly the camera (and also the viewpoint) jumped in
> zigzag across the Image.
> I wanted to proof if I done well with my mathematics and wrote a little
> programm in "C" and don't wonder it didn't work either.
> from 0-100 frames) 2.sin(a) 3.cos(a) 4.sin(a)*r 5.cos(a)*r.
> The problem revealed just in the second row where the "prog" calculated
> the value for sin(a) {I used sin(360*clock).Instead of receiving a value
> near to zero (~0.008) I got -0.44. Now I do not know if it was my fault
> or if there is technical problem.
> Anybody a hint or solution?
>
> #version 3.0
> global_settings { assumed_gamma 2.2 }
>
> #include "colors.inc"
> #include "textures.inc"
> #declare r=70; file://this is the radiant off the circle
>
> #declare a=360*clock; // clock statement for circular movement
> // #declare si=sin(a) // achieved trough sin(a)*r for the "Y-axis"
> // #declare co=cos(a) // and "cos(a)*r for the "X-axis"
> // #declare x_=co*r this seemed to be one possibility
> // #declare y_=si*r the other one is directly "built-in"
>
> camera {
> location <0, 40, -70>
> translate<cos(a)*r, 0, sin(a)*r>
> look_at <0, 18, 0>
> }
>
> light_source { <-40, 100, -100> color rgb 1}
> light_source { <40, 100, -100> color rgb 1 }
> plane { y,0 pigment { Plum }}
>
> box {
> <-10, 0, 10>
> <10, 30, -10>
> pigment { checker color White color Black }
> }
>
> sphere {
> <0, 30, 0>,5
> pigment { color Yellow }
> }
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"siegfried.guendisch" wrote:
>
> "PreScript":The whole .pov-file is Included below!!
> (Attention:this is rather a long text!!excuse my horrible english please)
> Here is my Problem:
> I want to have an object that is in the middle of a Room or something,
> rendered so that after rendering it would seem as if the camera would
As Steve said this won't help your math any but the easies way to rotate
the camera around the origin is to simply use the rotate command instead
of trying some complex translation scheme.
camera {
location <0, 40, -70>
look_at <0, 15, 0>
rotate <0, 360*clock, 0>
}
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I believe the problem is that the trigonometry functions take radians
for the angle, and you are giving them degrees. So instead of circling
once, the camera circles 360/pi times(I think).
Use cos(radians(a)) and sin(radians(a)) instead, or even better, use
rotate < 0, r, 0> instead.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: siegfried guendisch
Subject: Re: Newbie with animation Problem
Date: 4 Jul 1999 11:36:17
Message: <377f7f71@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
siegfried.guendisch <sie### [at] planet-interkom de> schrieb in im
Newsbeitrag: 377e4d9a@news.povray.org...
> "PreScript":The whole .pov-file is Included below!!
> (Attention:this is rather a long text!!excuse my horrible english please)
> Here is my Problem:
> I want to have an object that is in the middle of a Room or something,
> rendered so that after rendering it would seem as if the camera would
> I tried to solve it "trigonometricaly" that means I translated the value
> for the X-axis with cos(a)*r .(the "(a)" for alpha and "r" for the
radiant.
> Normaly , as expecting the camera should move counterclockwise in the
> trail of the circle described through cos(a) and sin(a).
> But astonishingly the camera (and also the viewpoint) jumped in
> zigzag across the Image.
> I wanted to proof if I done well with my mathematics and wrote a little
> programm in "C" and don't wonder it didn't work either.
> from 0-100 frames) 2.sin(a) 3.cos(a) 4.sin(a)*r 5.cos(a)*r.
> The problem revealed just in the second row where the "prog" calculated
> the value for sin(a) {I used sin(360*clock).Instead of receiving a value
> near to zero (~0.008) I got -0.44. Now I do not know if it was my fault
> or if there is technical problem.
> Anybody a hint or solution?
>
> #version 3.0
> global_settings { assumed_gamma 2.2 }
>
> #include "colors.inc"
> #include "textures.inc"
> #declare r=70; file://this is the radiant off the circle
>
> #declare a=360*clock; // clock statement for circular movement
> // #declare si=sin(a) // achieved trough sin(a)*r for the "Y-axis"
> // #declare co=cos(a) // and "cos(a)*r for the "X-axis"
> // #declare x_=co*r this seemed to be one possibility
> // #declare y_=si*r the other one is directly "built-in"
>
> camera {
> location <0, 40, -70>
> translate<cos(a)*r, 0, sin(a)*r>
> look_at <0, 18, 0>
> }
>
> light_source { <-40, 100, -100> color rgb 1}
> light_source { <40, 100, -100> color rgb 1 }
> plane { y,0 pigment { Plum }}
>
> box {
> <-10, 0, 10>
> <10, 30, -10>
> pigment { checker color White color Black }
> }
>
> sphere {
> <0, 30, 0>,5
> pigment { color Yellow }
> }
>
>
>
>
>
I don't know who replied to my posting anymore, but thanks a lot.
Finaly it worked with "rotate" and is much easier.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |