PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Windows Mobile > Windows Mobile Hacks/Tweaks > Pocket PC Themes
Register Community Search

Notices


Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-05-2009, 02:53 PM
schettj's Avatar
morsus mihi
Offline
Pocket PC: iPhone 4
Carrier: AT&T
Location: Not from around these parts
 
Join Date: Oct 2006
Posts: 3,017
Reputation: 3616
schettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIP
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
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>
so could use the "days till" numbers, etc, to select from the intermediate images in the series.
__________________

Last edited by schettj; 02-05-2009 at 02:58 PM.
This post has been thanked 1 times.
  #2 (permalink)  
Old 02-05-2009, 06:38 PM
schettj's Avatar
morsus mihi
Offline
Pocket PC: iPhone 4
Carrier: AT&T
Threadstarter
Location: Not from around these parts
 
Join Date: Oct 2006
Posts: 3,017
Reputation: 3616
schettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIP
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Re: Idea... any interest in moon phase in TF3d?

Following up, its a simple calculation for the phases, so I can do it all in Mortscript.

Might get some time to play with it, if I get it working I'll post it up.

When this is run it should more or less get you a number between 0 (full moon above) and 23 - start counting from 1 above for the pic that goes with this number - for the current date. So pretty simple - not perfect since it should be UTC time, but hey close enough!

Not tested (tested C version )
Code:
#
# moon phase 0-2333
#

GetTime(d,m,y,h,min,s)

if (m < 3)
        y = y - 1
        m = m + 12
endif

m = m + 1
c = 365.25*y
e = 30.6*m
jd = c+e+d-694039.09
jd = jd /  29.53

b = floor(jd)
jd = jd - b
ph = Round(jd*24)
if (ph > 23)
  ph = 0
endif

#ph = 0 (NEW) thru 23 (last of the waning cresent)
So all I have to do is add the "run me once a day at 1pm" code, make 24 moon image files for manila named moon_0 through moon_23, and add the code to copy the computed file over the default moon file, and we're done.
  #3 (permalink)  
Old 02-05-2009, 06:41 PM
Hafrust's Avatar
VIP Member
Offline
Pocket PC: Fuze
Carrier: AT&T
 
Join Date: Dec 2007
Posts: 2,197
Reputation: 3856
Hafrust is still contributing even after becoming a VIPHafrust is still contributing even after becoming a VIPHafrust is still contributing even after becoming a VIPHafrust is still contributing even after becoming a VIPHafrust is still contributing even after becoming a VIPHafrust is still contributing even after becoming a VIPHafrust is still contributing even after becoming a VIPHafrust is still contributing even after becoming a VIPHafrust is still contributing even after becoming a VIPHafrust is still contributing even after becoming a VIPHafrust is still contributing even after becoming a VIP
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Idea... any interest in moon phase in TF3d?

Sounds cool...I'm interested.
__________________
If you are new to the site, take a look at the PPCGeeks New User Guide to get an overview of how to use the forums.

Having problems finding what you're looking for? Here are some tips on how to search the site more effectively.
  #4 (permalink)  
Old 02-05-2009, 06:48 PM
hibby50's Avatar
The Hibster
Offline
Pocket PC: 3DDD :p
Carrier: Sprint 4g
Location: PPCGeeks.com... Where else?
 
Join Date: Apr 2008
Posts: 6,156
Reputation: 6354
hibby50 is a trusted member of the communityhibby50 is a trusted member of the communityhibby50 is a trusted member of the communityhibby50 is a trusted member of the communityhibby50 is a trusted member of the communityhibby50 is a trusted member of the communityhibby50 is a trusted member of the communityhibby50 is a trusted member of the communityhibby50 is a trusted member of the communityhibby50 is a trusted member of the communityhibby50 is a trusted member of the community
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Send a message via AIM to hibby50 Send a message via MSN to hibby50
Re: Idea... any interest in moon phase in TF3d?

Me too... who wants to make it happen?
__________________

  #5 (permalink)  
Old 02-05-2009, 08:36 PM
schettj's Avatar
morsus mihi
Offline
Pocket PC: iPhone 4
Carrier: AT&T
Threadstarter
Location: Not from around these parts
 
Join Date: Oct 2006
Posts: 3,017
Reputation: 3616
schettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIP
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Re: Idea... any interest in moon phase in TF3d?

Quote:
Originally Posted by hibby50 View Post
Me too... who wants to make it happen?
I'm on it. I'll post something later today (hopefully, poking around on this between real work)

Edit... nope, not today

I was able to chop up the images, and have started the import into manila process. It'll get there, just not today

Last edited by schettj; 02-05-2009 at 09:46 PM.
  #6 (permalink)  
Old 02-06-2009, 10:07 AM
schettj's Avatar
morsus mihi
Offline
Pocket PC: iPhone 4
Carrier: AT&T
Threadstarter
Location: Not from around these parts
 
Join Date: Oct 2006
Posts: 3,017
Reputation: 3616
schettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIP
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Re: Idea... any interest in moon phase in TF3d?

Ok, this is nearly done! I'm testing it now. I need to add a city that's in the dark...

Edit: Having some issues with moving files, and not having squished moons.

Currently looks like this, so I have a bit of work yet. But getting closer



At least the phase is right

Last edited by schettj; 02-06-2009 at 10:39 AM.
  #7 (permalink)  
Old 02-06-2009, 07:21 PM
schettj's Avatar
morsus mihi
Offline
Pocket PC: iPhone 4
Carrier: AT&T
Threadstarter
Location: Not from around these parts
 
Join Date: Oct 2006
Posts: 3,017
Reputation: 3616
schettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIP
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Re: Idea... any interest in moon phase in TF3d?

Ok, worked out the technical details on the file move/renames, and found that if you're using a ManilaHD version the images need to be width-compressed to 80% of original size to avoid "Fat Moon"

So, here we are. Sadly I have 23 more moons to resize. But after that this should be released!

  #8 (permalink)  
Old 02-07-2009, 04:25 PM
schettj's Avatar
morsus mihi
Offline
Pocket PC: iPhone 4
Carrier: AT&T
Threadstarter
Location: Not from around these parts
 
Join Date: Oct 2006
Posts: 3,017
Reputation: 3616
schettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIPschettj is still contributing even after becoming a VIP
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Re: Idea... any interest in moon phase in TF3d?

Yay, it's done!

I am going to make a new thread since this one was more "what if" then anything else. Guess we can nuke this topic Mods...
  #9 (permalink)  
Old 02-08-2009, 01:37 PM
MaryGladys's Avatar
PPCGeeks Regular
Offline
Pocket PC: HTC Touch Pro2
Carrier: Sprint
Location: Flooooooreeeeeeduh
 
Join Date: Oct 2008
Posts: 186
Reputation: 245
MaryGladys is keeping up the good workMaryGladys is keeping up the good workMaryGladys is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Idea... any interest in moon phase in TF3d?

Hey! I would be interested in this! It looks awesome, SCHETTJ! Looks like you already have it posted! Anxious to try it!
__________________
---
MG
Closed Thread

  PPCGeeks > Windows Mobile > Windows Mobile Hacks/Tweaks > Pocket PC Themes


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 12:01 AM.


Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com