POV-Ray : Newsgroups : povray.advanced-users : Complex Annimation : Re: Complex Annimation Server Time
2 Nov 2024 11:25:42 EDT (-0400)
  Re: Complex Annimation  
From: Matt Giwer
Date: 20 Nov 1999 01:35:38
Message: <38364144.596AA9A9@giwersworld.org>
David Vincent-Jones wrote:

> I am looking for an example of an animation where the camera moves in
> something other than a simple lineal fashion. I am creating a walk through
> where I want to be able to go around objects and generally move in a non
> linear form.
> Any ideas or examples would help

Here is an elliptical sweep down/in, sweep up/out pair that makes
a horrible example if you are looking for something simple but it
shows what you can do with it. It is also not in its simplest
math form yet. (Note: clock is used in a manner different than
the POV docs recomment.) 

#if ( (clock >= 5) & ( clock < 6) )
camera
{
location<-20.0 + 38*sin((clock-5)*pi/2), 
3-(clock-5)*11,
-8.0 -22*cos((clock-5)*pi/2)>
  direction 1.5*z
  right     4/3*x
  look_at   <-5.0, -8.0,  -10.0>
}  
#end 

#if ( (clock >= 6) & ( clock < 7) )
camera
{
location<-20.0+38*sin((clock-5)*pi/2),
3-11+(clock-6)*11,
-8.0 +22*cos((clock-5)*pi/2)>
  direction 1.5*z
  right     4/3*x
  look_at   <-5.0, -8.0,  -10.0>
}  
#end 

	That sweeps half way around the look_at point while coming down
to its y level and then returns by the same path to where it
started. 

	For a walkthrough of a say a hallway you would have to define
the path down the hallway. If there are obstacles in the hallway
you would have to test the distance between each and the camera.
That is sqrt(sqr(x2-x1) + sqr(y2-y1) + sqr(z2-z1)) -- they
hypotenuse of a triangle in three dimensions. Then when "close
enough" implement your avoidance routine until it is "far enough"
away. 

And not going to swear to it but <object_location> -
<camera_location> = look_at or something very close to that. That
way you can move the camera along a hall but have it look at
different objects as it moves along as eyes would do. 

-- 
<blink>---please--don't---</blink>

http://www.giwersworld.org/artiii/

Oh my God! They've rendered Kenny!


Post a reply to this message

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