Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: color problem

by sundialsvc4 (Abbot)
on Dec 31, 2013 at 14:35 UTC ( #1068800=note: print w/replies, xml ) Need Help??

in reply to color problem

There will be three points-of-interest in the geometry:
  • The position in space (and orientation) of the camera, and the dimensions of its viewport.
  • The position-in-space of the sun, the center of orbit.
  • The distance and angle (polar coordinates) of each planet, which may be converted to absolute (x,y,z).
All of this math lets you determine, at any point in time, whether a given planet is visible to the camera, where it appears on the camera's film, and how far away from the camera it is. You then sort this display-list in descending order by z-order, and draw it.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1068800]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2018-06-22 23:42 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.