Flokey82 / genworldvoronoi

Generates a planet with basic climate simulation, city placement, Wavefront OBJ/SVG/PNG export, leaflet server, etc. WIP!
Apache License 2.0
4 stars 1 forks source link

Wind / Currents: Investigate use of vec2s + lat/lon #8

Closed Flokey82 closed 1 year ago

Flokey82 commented 1 year ago

I am concerned that the mixed use of normal vectors and lat/lon might cause issues around the poles (and pretty much everywhere else). We might have to re-think the way we calculate up/down-wind/stream neighbors. Right now we just add the wind vector (x/y) to lat/lon and use this vector to determine the dot product of the wind vector to the direction to the neighbor region, which is in lat/lon :-/

Flokey82 commented 1 year ago

Great suggestion by Redblobgames:

Thought 3: mercator projection is angle preserving which makes me think that your dot product might "just work" with mercator. If you can convert your lat long to mercator instead of xyz then you might be able to take the dot product directly. You might have to adjust for latitude; I'm not sure.

... which is brilliant and definitively an option!