POV-Ray : Newsgroups : povray.binaries.animations : Solar System : Re: Solar System Server Time
16 Apr 2024 18:16:38 EDT (-0400)
  Re: Solar System  
From: Bald Eagle
Date: 12 May 2017 12:20:01
Message: <web.5915dfc24e850994c437ac910@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, for background, I've always used cylinders or tori or wire-boxes to draw
"lines" as indicators or guides in images.  I'd always have to fiddle with the
radius of the object to get it so it was wide enough to be useful (visible) but
not like a tree obstructing the scene.

When one studies the curves of --- small objects directed at larger ones --- the
concept of "MOA" comes into play.  Same with visual phenomena and cameras.
If I have an object in front of the default perspective camera, (and let's say
the image size is 640 x 480) then anything that's [(1/640)/2] in radius will
have a diameter of one pixel.   Adjust for aspect ratio in the case of
horizontal "lines".

Then, to account for distance, when something is doubled in distance, it appears
half the size - it covers half of its former angular field of view.  So the
radius needs to be doubled.   So just add a multiplier.

I need to work out the Euclidean distance from a point in the plane parallel to
the right-up plane, and use that instead of just z, but I've tested the basic
concept, and the code works nicely.  Cylinders of different heights at different
distances from the camera all have the same apparent width.  :)

So, for the planetary orbits, I can just calculate the minimum radius necessary
for visibility at it's present Euclidean distance from the camera, and just
redefine the planet's radius as a #declare PlanetRadius=max(Real,
MinForVisibility) function.

If I remember to copy the scene file to my USB stick, I ought to be able to post
the working prototype code on Monday.


Post a reply to this message

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