The planets are drawn with a for-loop from 0 to 360 levels at a specified radius.
Previously, I’d merely been giving that draw-a-circle methodology an angle for the sunshine to fall on it and colouring +/-90 levels to that angle vibrant, whereas the remainder of the circle remained darkish. (Resulting in a circle which was at all times 50% gentle & 50% darkish.)
Now with the pseudo-sphere rendering, it is first flipped so I’m drawing shadow on a lit circle (simple sufficient), nevertheless it’s then attenuating between 0 and the radius then again to 0 whereas contained in the the shadow’s angles (the incoming gentle’s angle +180 levels).
This mainly ends in a croissant form being drawn behind the circle which works as a reasonably convincing 3D shadow on an in any other case flat disk.
Representation of planets over time:
(No precise 3D calculations are happening; Startron is a whole case-study of hacks, tips and heuristic approaches )
In different information, I simply acquired my new Raspberry Pi working and have realised I must construct for ARM structure to help this. So ranging from v0.82, Startron shall be being launched for Windowsx64, Linuxx86-64 and LinuxARMx64. (Woo)
« Last Edit: February 28, 2022, 07:27:07 AM by Rogod »