Monday, September 30, 2019
Wednesday, September 25, 2019
Near Star Map
Monday, September 23, 2019
World map with triangles
Now with triangles, need to randomly choose a different triangle pair, flip them, and jitter the vertices, within reason... I now have the triangle pairs flipping randomly and it makes for a weird effect! 8-P
Canvas
Sunday, September 22, 2019
Friday, September 20, 2019
Wednesday, September 18, 2019
Tuesday, September 17, 2019
Coding Projects
So, what I want to create is a star sector map drawing page, which I have, not perfect but it's a first pass. Then I want to have star systems and an animation displaying the orbiting planets, in 2D to keep it simple. Finally, I want to generate a simple low-poly world map, again in 2D, either a rectilinear longitude and latitude map or an XY side view of a 3D globe without the fancy rendering tricks I can learn to do...
The world map is best generated XYZ, a cube-sphere for what I ultimately have in mind, but a long/lat rectangle mapped to a UV sphere is something I have done many times before. I don't have a noise function in plain vanilla javascript but I can do midpoint displacement (diamond square) by long and lat for a nice height map of the long/lat points, divide the long/lat quads into triangles and average the vertices to find a height for each triangle, placing it above or below sea level.
Drawing landmass... this is just a polygon drawn around an origin from a random starting angle to a random stopping angle. The rectangle is 520 by 260 pixels because the blog text block seems to be that wide and this looks okay. The star sector was 500 pixels square, a 20 light year cube with about 30 stars.
Canvas
The world map is best generated XYZ, a cube-sphere for what I ultimately have in mind, but a long/lat rectangle mapped to a UV sphere is something I have done many times before. I don't have a noise function in plain vanilla javascript but I can do midpoint displacement (diamond square) by long and lat for a nice height map of the long/lat points, divide the long/lat quads into triangles and average the vertices to find a height for each triangle, placing it above or below sea level.
Drawing landmass... this is just a polygon drawn around an origin from a random starting angle to a random stopping angle. The rectangle is 520 by 260 pixels because the blog text block seems to be that wide and this looks okay. The star sector was 500 pixels square, a 20 light year cube with about 30 stars.
Monday, September 16, 2019
Landmass
Drawing landmass... this is just a polygon drawn around an origin from a random starting angle to a random stopping angle. The rectangle is 520 by 260 pixels because the blog text block seems to be that wide and this looks okay. The star sector was 500 pixels square, a 20 light year cube with about 30 stars.
Canvas