PGD Home

P-152: Virtual World Concept Update 168: Planet-sized Terrain: Part 47

by 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.

P152_DEBUG 31/08/2016 , 05:04:49 AM Torque 3D MIT - P152

P152_DEBUG
31/08/2016 , 05:04:49 AM
Torque 3D MIT – P152

P152_DEBUG 31/08/2016 , 04:39:11 AM Torque 3D MIT - P152

P152_DEBUG
31/08/2016 , 04:39:11 AM
Torque 3D MIT – P152

wgnuplot 30/08/2016 , 09:55:01 PM Gnuplot (window id : 0)

wgnuplot
30/08/2016 , 09:55:01 PM
Gnuplot (window id : 0)

wgnuplot 30/08/2016 , 11:09:34 PM Gnuplot (window id : 0)

wgnuplot
30/08/2016 , 11:09:34 PM
Gnuplot (window id : 0)

wgnuplot 30/08/2016 , 11:08:16 PM Gnuplot (window id : 0)

wgnuplot
30/08/2016 , 11:08:16 PM
Gnuplot (window id : 0)

wgnuplot 30/08/2016 , 09:09:58 PM Gnuplot (window id : 0)

wgnuplot
30/08/2016 , 09:09:58 PM
Gnuplot (window id : 0)

wgnuplot 30/08/2016 , 10:03:47 PM Gnuplot (window id : 0)

wgnuplot
30/08/2016 , 10:03:47 PM
Gnuplot (window id : 0)

Facebooktwitterredditpinterestlinkedinmail

Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!