POV-Ray : Newsgroups : povray.binaries.animations : Solar System : Re: Solar System Server Time
26 Apr 2024 07:20:00 EDT (-0400)
  Re: Solar System  
From: Bald Eagle
Date: 16 May 2017 07:50:01
Message: <web.591ae6ba4e850994c437ac910@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
>
> >
> > I also have some formulas for scaling something so that it's always at least a
> > pixel wide.   I may add that so the apparent size never drops below a pixel.
> >
>
> That sounds interesting; I've never tried anything like that. If it's not too
> complicated to explain, *I'm* all ears. ;-)

So, define a Location and a LookAt variable for use in your camera definition
(and an optional Angle), and then plug those into this:

 // Check if user-defined camera angle is used, otherwise set to default
 #ifndef (Angle)
  #local Angle = 67.38;
 #end
 #local M = (0.5*Aspect)/tan(radians(Angle/2));
 #local Dist1 = vlength (ObjectLocation-Location);
 #local ZA1 = Dist1/M;
 #local Rad1 = ((ZA1/image_width)*Aspect);

A cylinder with Rad1 ought to give you a visible object at any distance.


Post a reply to this message

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