of_iphone_earth

over the last week ive been playing around with openFrameworks on the iphone and getting a handle on openGL ES for a work project. its been lots of fun and suprisingly tricky to find decent resources, especially when mapping textures and geo coordinates onto a sphere. ive developed a nice basic example which i think is a good start for anyone tackling an earth application on the iphone using openFrameworks or even working with Objective C.
the example contains code for drawing a sphere in openGL ES and giving it an earth texture which is provided in the source. theres a Trackball class which allows you to intuitively rotate the textured sphere and a CurveHop class which draws a curved ribbon from location to location as it hops along on the surface of the earth. theres a cool little trick you can do in google maps to get the latitude and longitude of any location, so you can add it into the curve hop chain. just search for a location in google maps and copy the following code into your address bar,
javascript:void(prompt(”,gApplication.getMap().getCenter()));
this will bring up a popup with the latitude and longitude of the center of the map.
download the source code.
About this entry
You’re currently reading “of_iphone_earth,” an entry on julapy
- Published:
- 07.20.09 / 11pm
- Category:
- processing


















3 Comments
Jump to comment form | comments rss [?] | trackback uri [?]