POV-Ray : Newsgroups : povray.general : Camera confusion : Re: Camera confusion Server Time
2 Aug 2024 12:23:22 EDT (-0400)
  Re: Camera confusion  
From: pan
Date: 25 Oct 2004 08:19:06
Message: <417cef3a@news.povray.org>
"ShiJie" <jca### [at] yahoocom> wrote in message
news:web.417cb11d952bf6174727610@news.povray.org...
> Dear NG,
>
> I am a bit confuse about using the camera I would appreciate it if someone
> would guide me. I have an object which is I think place on coordinates
> <0,0,0>. Now this object is a bit complicated and I would like to view it
> on its back,front and each of its side view, one way is of course to
rotate
> the object and view it (but I think this will take more rendering time and
> besides its a bit more complicated) and the easier way is just to place
the
> a camera on the right position to view the objects front, back, left and
> right side views

this bit of code might be helpful
just change the rotation angles to view different aspects of scene
this will help understanding povray coordinate system

#declare camera_angle  = 50;
#declare camera_location    = <100.00, 0.0, 0.0>;
#declare camera_rotation_x  =    23;  // degrees of rotation around x axis
#declare camera_rotation_y  =    -45; // degrees of rotation around y axis
#declare camera_rotation_z  =    0;  // degrees of rotation around z axis

/*  redefine camera location according to desired axial rotations about
origin (<0,0,0> */
#declare camera_location    = vrotate(camera_location,
<camera_rotation_x,camera_rotation_y,camera_rotation_z>);
#declare camera_look   = <0.00, 0.00, 0.00>; // focus point for scene


#ifndef(camera_angle)
 camera{location camera_location look_at  camera_look}
#else
 camera{location camera_location look_at  camera_look angle camera_angle}
#end
/* if you add this light source, the scene will always be lighted */
/* remove it or change it later */
light_source{camera_location color rgb <1.00, 1.00, 1.00>}

it would be easy enough to define a vector rotation for the camera relative
to the
camera look at point (or any other point), but I'll leave that as an
exercise for the reader

/* example of additional useful declaration    distance of camera from
origin */
#declare camera_length_2origin    =
vlength(<camera_location.x,camera_location.y,camera_location.z>);
/* example of additional useful declaration    distance of camera from look
at point */
#declare camera_length_2look_at    = vlength(
<camera_location.x,camera_location.y,camera_location.z> , camera_look);

pan


Post a reply to this message

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