Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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]
[Corion]: Nicholas Clark++ # read for a multichar block-delimiter by scanning for the last char, and only then check whether the whole delimiter was read.
[Corion]: At least if you're appending the data read to a larger buffer, this means you avoid the situation of "a delimiter was found but the other half has not been read yet"
choroba misses the context

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (14)
As of 2016-12-06 14:59 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (107 votes). Check out past polls.