POV-Ray : Newsgroups : povray.binaries.animations : Map of the Universe : Re: Map of the Universe Server Time
19 Jul 2024 00:55:37 EDT (-0400)
  Re: Map of the Universe  
From: ABX
Date: 28 Jan 2004 04:34:37
Message: <vsve10h1r79j1a4s8l2fkks6dvjhd0svd4@4ax.com>
On Wed, 28 Jan 2004 01:10:44 -0800, "AngleWyrm"
<no_### [at] hotmailcom> wrote:
> One thing I haven't figured out: How to animate the camera, do a camera
> track. The scene here was generated as a union and then rotated. While this
> might work, it didn't give me the effects I was really wanting.
>
> What I wanted to do is have the camera orbit the scene in the x-z plane, and
> perform a sinusoidal rise and fall during the course of the orbit, from
> about +5y to -5y.
>
> Anyone tell me how to do this?

The common way if to introduce some expressions into camera statement relative
to time expressed by value of 'clock' build-in variable. For example:

camera{
  location 3*x*clock
  look_at 2*y*clock
}

where camera goes along x axis and and looks at points on y axis. If your
movement is more complicated you can use splines or macros:

#declare S=spline{
  0 <0,0,0>
  1 <1,2,3>
  7 <11,25,-3>
}

#macro M(Time)
  #if(Time<2)
    <2,3,2*Time>
  #else
    <Time,2,Time*Time>
  #end
#end

camera{
  location S(clock)
  look_at M(clock)
}

Instead of applying any transformation to union which contain whole world you
can apply inversion of this transformation to camera.

ABX


Post a reply to this message

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