POV-Ray : Newsgroups : povray.general : How to set the view to the object width? : Re: How to set the view to the object width? Server Time
26 Apr 2024 19:16:56 EDT (-0400)
  Re: How to set the view to the object width?  
From: Bald Eagle
Date: 22 Sep 2019 19:35:01
Message: <web.5d880451756e04084eec112d0@news.povray.org>
So, I'm working on a scene to illustrate this.

#declare Aspect = image_width/image_height;
#declare Right_Vector = <1, 0, 0>*Aspect;
#declare Screen_Plane = z;
#declare Camera_Loc = <0, 0, 0>;
#declare Screen_Center = <0, 0, 1>;
#declare Right_Vector = <1, 0, 0>*Aspect;     //<---------

#declare direction_length = vlength (Screen_Center - Camera_Loc);

#declare half_angle = degrees(atan2( (0.5 * vlength(Right_Vector)),
direction_length));

This gives 33.69

Multiplying this by two gives the default camera angle of 67.380


Post a reply to this message

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