|
glob of spheres twisting and changing size by Jeremie PETIT 1996
History 01-Nov-2000: Allocation checks 15-May-1997: jwz_at_jwz.org: turned into a standalone program. 04-Sep-1996: Added 3d support Henrik Theiling 20-Feb-1996: Added tests so that already malloced objects are not malloced twice, thanks to the report from 01-Feb-1996: Patched by Jouk Jansen for VMS Patched by for TrueColor displays 30-Jan-1996: Wrote all that I wanted to. Sort of starfield with a 3D engine. For a real starfield, I only scale the sort of sphere you see to the whole sky and clip the stars to the camera screen. Use: batchcount is the number of stars. cycles is the maximum size for a star DONE: Build up a XArc list and Draw everything once with XFillArcs That idea came from looking at swarm code. DONE: Add an old arcs list for erasing. DONE: Make center of starfield SinVariable. DONE: Add some random in the sinvary() function. DONE: check time for erasing the stars with the two methods and use the better one. Note that sometimes the time difference between beginning of erasing and its end is negative! I check this, and do not use this result when it occurs. If all values are negative, the erasing will continue being done in the currently tested mode. DONE: Allow stars size customization. DONE: Make sizey be no less than half sizex or no bigger than twice sizex. IDEA: A simple check can be performed to know which stars are behind and which are in front . So is possible to very simply change the drawing mode for these two sorts of stars. BUT: this would lead to a rewrite of the XArc list code because drawing should be done in two steps: behind stars then in front stars. Also, what could be the difference between the rendering of these two types of stars? IDEA: Calculate the distance of each star to the viewer and render the star accordingly to this distance. Same remarks as for previous ideas can be pointed out. This would even lead to reget the old stars drawing code, that has been replaced by the XFillArcs. On another hand, this would allow particular stars (own color, shape...), as far as they would be individually drawn. One should be careful to draw them according to their distance, that is not drawing a far star after a close one.
|
|
|
|