POV-Ray : Newsgroups : povray.animations : Camera question/Simple Animation : Camera question/Simple Animation Server Time
28 Jul 2024 22:16:56 EDT (-0400)
  Camera question/Simple Animation  
From: islam
Date: 6 Jul 1998 09:06:13
Message: <35A0BC05.41C6@icrf.icnet.uk>
I would like to do very simple animations by keeping the object
fixed at the origin and translating/rotating the camera along a
defined curve. For example have the camera move in a circle in
the X-Z plane. I must be doing something very silly because strange
things start to happen after a 90degree rotation. Here is the
psedo code for my program:

/* ROTATE CAMERA AROUND Y-AXIS ABOUT ORIGIN */

lxo = 0. ; lyo = 0. ; lyo = 50. /* camera start xyz location */
rxo = 1. ; ryo = 0. ; rzo = 0.  /* right axis start xyz location */

for i = start-angle , end-angle
{

create_new_pov_input_file_i

/* rotate camera location and right x & z */

lx = cos(i).lxo - sin(i).lzo	 
lz = sin(i).lxo + cos(i).lzo	 
rx = cos(i).rxo - sin(i).rzo	 
rz = sin(i).rxo + cos(i).rzo	 

write-camera:
 camera {
 location <   lx,ly,lz>
 look_at  <   0.,0.,0.>
 up       <   0.,1.,0.>
 right    <   rx,ry,rz>
 orthographic}

write_out_scene_data

}

Any help/comments much appreciated. Thanks
____________________________________________
Suhail A Islam
Biomolecular Modelling Laboratory
Imperial Cancer Research Fund, P.O. Box 123
44 Lincoln's Inn Fields, London WC2A 3PX
Tel: (0171) 269 3380 
Fax: (0171) 269 3258
email: isl### [at] icrficnetuk
http://www.icnet.uk/bmm/
____________________________________________


Post a reply to this message

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