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
16 Apr 2024 19:26:51 EDT (-0400)
  Re: How to set the view to the object width?  
From: Kima
Date: 21 Sep 2019 21:35:00
Message: <web.5d86cef3756e0408ecc0fada0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > I haven't worked out a solution yet, or maybe I have in the past and can't
> > remember / locate it (yet), but at:
>
>
> I still haven't found what I'm looking for - I could swear that I had written
> some code to do this already....
>
>
> but if you take a look at:
>
> http://news.povray.org/web.591ae6ba4e850994c437ac910%40news.povray.org
>
> I do some calculations to find what radius is always at least 1 pixel wide, and
> thus always visible.
>
> If you define that radius to be the image_width, and then work backwards, you
> should wind up with a camera position.
>
>
> I'll see if I can work it out after I get some sleep, but if you're going to
> hammer away at this, I always find that a diagram, a spreadsheet, and some good
> #debug directives in the code really help me work this kind of thing out lots
> faster.
>
> (also, see: http://news.povray.org/58f60d9e%241%40news.povray.org to avoid any
> atan problems   ;)   )

First of all, I must correct a stupid mistake (in using the calculator). The
tan(15) = 0.26794919

However, my problem with the above-mentioned equation
(https://www.povray.org/documentation/view/3.6.1/246/) still stands.

To make the equation work, I must omit 0.5, and I don't know where it comes
from.

Simple example:

Consider the angle of view of 90, then, direction_length = right_length. Since
tang(45) = 1, 0.5 is superfulous.

I can think of 0.5 necessary if only using full_length
(left_lenth+right_lenght). Or amd I making another stupid mistake?


Post a reply to this message

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