Mosiac: Geometry Redux

So, as I start to get ready to actually do the Geometry project as mentioned in the earlier Geometry post I’m realizing that I’m making the problem far more difficult than it has to be by trying to do everything graphically.  (Model the sphere and the Weaire-Phelan structure and then isolate their intersection, then reproject onto flat maps as needed.)  There is going to be a lot of computation here, and there’s no need to try and do it all in real-time as I manipulate my globe map.)  Instead, I’ll just do it all with pure geometry, saving the graphics for the very end step.

In pseudo-code/outline form:

1) Generate the vertices and bounding planes for all of the cells under consideration (a box slightly larger than the Earth.)  Also, pick a displacement and polar angle for the Earth in a reproducable way.

2) Loop through the surface of the Earth, in latitude/longitude order with a fairly high precision.  For each point, determine which cell it is inside.  (Testing each cell is the least clever way to do this, but I may not need all that much efficiency here.)  If the point is in the subset of the map that we’re most interested in, assign a color.  Otherwise, maintain a bounding latitude/longitude box for each cell.

3) Output will be a colored map (Mercador projection), suitable for overlaying as a transparency on an actual map of a region, as well as a complete list of all of the surface-intersecting cells and their locations on the globe, bounding-box form.  Can generate other local area maps by re-executing as needed, of course.

Much simpler.  The writing order looks to me like (1) define a single tetrahedron (irregular tetrakaidecahedron), (2) write and test the inside?() function, (3) intersect it with a sphere, writing the main look and output portions, (4) Generate a small [much bigger cells] Weaire-Phelan structure and try with that, and finally (5) Do the full-scale version.  Then I’ll need to generate some maps, which means I’ll need to know about what I want to have inside my local area/prime cell.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: