POV-Ray : Newsgroups : povray.newusers : Smooth swinging camera work : Re: Smooth swinging camera work Server Time
19 Apr 2024 05:34:13 EDT (-0400)
  Re: Smooth swinging camera work  
From: Bald Eagle
Date: 10 Apr 2016 08:40:01
Message: <web.570a4923e1dfd56f80403a200@news.povray.org>
"SecondCup" <nomail@nomail> wrote:

> Nice! The lower image looks good until my code wants it to rotate around the
> center 360 degrees.

"Until the code I wrote that I think will rotate it around..."
Don't anthropomorphize POV-Ray, SDL, or your computer.
Only YOU _want_ something to happen.  Then you follow the rules of the puzzle to
get the OS to run POV-Ray which interprets the SDL and then makes a Cartesian
grid of colored pixels.

> Because I tell the code to 'look_at <the center>', the coordinate system isn't
> doing what I want.

The coordinate system is a static "thing"  It doesn't "do" anything.
Look_at just determines what direction the camera is pointing when it's at a
given location ("vector").


> Without being locked to viewing the center, the coordinates would be:
> 6oclock location <0,-15,-65>
> 3oclock location <65,-15,0>
> 12oclock location <0,-15,+65>
> 9oclock location <-65,-15,0>
>
> This would create the points on a spleen to rotate around the centre, but my
> camera wouldnt be focused on the center. The look_at command causes the z-value
> to act like a zoom-in/out tool.

Those would be the coordinates regardless of where the camera is looking, or if
there is even a camera at all.   The clock still exists even if a blind man or
no one at all is looking at it.  (Let's not get into quantum delayed-choice
gedanken experiments....)

If those are your cardinal points on the clock, go back, draw it out on a piece
of paper (or preferably on a unit-circle diagram) and then double-check any
intermediate points you have in your spline.
An easy way to do this without paper or a spreadsheet or trig, is to just do
what I just did with the camera path(s) and place some yellow spheres at the
points where you want the camera to pass through, and see if it lines up with
where your spline gets interpolated to be.

I would start out with something VERY simple, like your top-down view of a
clock, with the first 4 points, and then start progressively adding points -
then you can see where things start to go wrong.

I'm on the road all day today - I'll look at this again some time after I get
back in, sleep, go to work, get back, etc.  ;)

Good luck   :)


Post a reply to this message

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