|
||||
Idea... any interest in moon phase in TF3d?
Ok, so here's the deal. The moon image is static, it's file:
060bb8f2_manila So, begin by creating 24 images, one for each phase of the moon, from say this nice high quality image: ![]() Make 'em in the correct format for TF3d (optionally compressed) and named as the standard phase name for each image (ie, Waxing Crescent, First Quarter Moon, etc) Next, write a wee little mortscript that would, each day at say noon, use this nifty web service here http://www.trynt.com/trynt-moon-phase-api/ to fetch the correct phase for the day and copy the right image file for that phase over to the image filename for the moon. Bonus points if it only copies the image if its changed ![]() Rejoice as TF3d shows the correct phase for the moon whenever it draws the moon. Sound interesting? I can code it up and post it. Edit: looks like there are only 8 standard names, but the above web service gives a lot of detail: Code:
<trynt> − <moon-phase> <date>February 5, 2009</date> <date-timestamp>1233860176</date-timestamp> <moon-phase-name>Waxing Crescent</moon-phase-name> <moon-phase-position>0.59326823386299</moon-phase-position> <lunar-illumination>8.3%%</lunar-illumination> <days-til-full-moon>12.01</days-til-full-moon> <days-til-new-moon>26.8</days-til-new-moon> <days-til-first-quarter-moon>4.6</days-til-first-quarter-moon> <days-til-last-quarter-moon>19.4</days-til-last-quarter-moon> − <moon-phases> − <data> <day>Thursday</day> <moon-phase-name>Waxing Crescent</moon-phase-name> </data> − <data> <day>Friday</day> <moon-phase-name>Waxing Crescent</moon-phase-name> </data> − <data> <day>Saturday</day> <moon-phase-name>Waxing Crescent</moon-phase-name> </data> − <data> <day>Sunday</day> <moon-phase-name>Waxing Crescent</moon-phase-name> </data> − <data> <day>Monday</day> <moon-phase-name>First Quarter Moon</moon-phase-name> </data> − <data> <day>Tuesday</day> <moon-phase-name>First Quarter Moon</moon-phase-name> </data> − <data> <day>Wednesday</day> <moon-phase-name>Waxing Gibbous</moon-phase-name> </data> </moon-phases> </moon-phase> <server>10.254.95.50</server> </trynt>
__________________
Last edited by schettj; 02-05-2009 at 02:58 PM. |
This post has been thanked 1 times. |
|
|
|