P-152: Virtual World Concept Update 168: Planet-sized Terrain: Part 47
by PhoenixGames on Sep.04, 2016, under Astral Realms, P-0, Software and Games, Spiritus Astrum
I have made quite a lot of progress with the current issue that I have been working on.
I believe I am now correctly converting from Cartesian to Spherical Coordinates, and I have also implemented Rodrigues’ forumula in my code. After checking my numbers, I believe everything is now working correctly.
I also discovered that it is not actually necessary to convert to spherical coordinates in order to use Rodrigues’ formula, it will work with Cartesian coordinates too.
I can now correctly rotate the nodes using this formula. I have not completely solved the problem however, since the formula is rotating about the nodes local space, and not about the actual radius of the world.
I tried scaling the nodes to the world center, rotating them, and then scaling them back to the radius of the sphere, but I had some issues with this.
I have now returned to my initial plan of finding an offset value that corresponds to an x-axis movement of 10,000 units, and using this offset value to move the terrain nodes along the z-axis. This is not an optimal solution, but it could work well enough in the short term, until I can find a better solution.
The below images simply show various attempts at node rotations in gnuplot, and in the engine, confirming that I am using Rodrigues’ formula correctly.