Cartesian or Polar Coordinates to store intergalactic objects in DB?

In summary, using Cartesian coordinates for storing data in a 3D space may be more efficient, as it is the first coordinate system that the user is likely to be familiar with. However, if the data is to be used for purposes other than rendering it to a GUI, such as calculations related to motion or rotation, then polar coordinates may be a better choice.
  • #1
Can Not
1
0
So I'm wondering, should I use Cartesian or Polar Coordinates to store intergalactic objects in DB?

I'm currently prototyping a game idea that can be oversimplified as a spaceship simulator in infinite space. I'm considering grouping objects together so that they have a "parent super-space" as follows:

A cluster would be an object where the parent space is the universe.
A galaxy's parent space is a cluster.
A solar system's parent space is a galaxy.
A star/planet's parent space is a solar system.
Any other smaller object would occupy the sub space of any of the above.

For example, if a planet left a solar system, then it would be in the galaxy's subspace. The user will be able to fly their ship anywhere they feel like.

My reasoning for this is that I think it would be a lot harder to maintain the illusion of "real enough gravity" if things were stored in Cartesian coordinates.

I think there would be a draw back in calculating distances between 2 game objects, but if they are not in the same subspace then I could probably just estimate with the distances between their subspaces.

Would you pick Cartesian or Polar coordinates for this kind of project?
 
Technology news on Phys.org
  • #2
I presume you are talking about 3D, right? In which case, Polar coordinates do not apply.

I personally prefer Cartesian as they are the first ones I learned from before I knew anything...I have been measuring width, height, and depth of stuff for a while now...it just seems a lot more natural and straight forward and easily relate-able to the physical world.

X,Y,Z is always X,Y,Z...spherical/cylindrical coordinates have more than one way to be represented and their values have periodicity which may add complexity to handling values.

But that is just me...

...then again, if you are going to be keeping track of planets orbiting about their suns, and solar systems about their galaxy's center...maybe polar is good enough for that alone and then keep track of the orientation of the respective local coordinate systems and be prepare to do transformation, etc.

bla, bla, bla
 
  • #3
The best way to store data is 100% based on how you will use the data.
If you are going to be traveling among these objects and rendering them to the GUI from different locations, then that would strongly favor Cartesian.
 
  • #4
The data should be stored in 3D Cartesian coordinates, that is really the only sensible solution.

Real data observed from our solar system is available as RA, Dec and red shift.
That will be converted only once from polar to rectangular with heavy use of trig functions.
The computation then becomes matrix or vector arithmetic, trig functions can be avoided.

The database would have a hierarchical structure where the position of objects would be the sum of a few 3D vectors from an origin. Entire clusters could be moved by changing one 3D vector.

Velocity and rotation can also be implemented in the 3D space.
 
  • #5


I would recommend using Cartesian coordinates for storing intergalactic objects in a database. While both Cartesian and Polar coordinates have their own advantages and disadvantages, Cartesian coordinates would be more suitable for this project for several reasons.

Firstly, Cartesian coordinates are more commonly used in scientific applications, making it easier to find resources and support for implementing them in a game. This could save time and resources in the development process.

Secondly, Cartesian coordinates allow for easier calculations of distances between objects. As mentioned in the question, calculating distances between objects in Polar coordinates can be more complex and may require additional estimations. In a game where accuracy and realism are important, using Cartesian coordinates can help maintain the illusion of "real enough gravity" without compromising on accuracy.

Lastly, Cartesian coordinates allow for more precise positioning of objects. This could be beneficial in a game where the user can fly their spaceship anywhere they want, as it would allow for more accurate placement of objects in relation to each other.

In conclusion, while both Cartesian and Polar coordinates have their own merits, I would recommend using Cartesian coordinates for storing intergalactic objects in a database for this project. It would provide more practical and efficient solutions for maintaining accuracy and realism in the game.
 

1. How do Cartesian coordinates differ from polar coordinates?

Cartesian coordinates use a system of x and y axes to pinpoint the location of an object, while polar coordinates use a distance and angle from a fixed point to locate an object.

2. Which coordinate system is better for storing intergalactic objects in a database?

It ultimately depends on the specific needs and purposes of the database. Cartesian coordinates may be more intuitive for some users, while polar coordinates may be more useful for objects with a circular or spherical shape.

3. Can both Cartesian and polar coordinates be used together in a database?

Yes, it is possible to use both coordinate systems in a database. This can be helpful when dealing with complex or irregularly shaped objects.

4. How are intergalactic objects represented in a database using Cartesian or polar coordinates?

Intergalactic objects can be represented by a set of coordinates that correspond to their location in space. For example, a star could be represented by its distance and angle from a fixed point in polar coordinates or its x, y, and z coordinates in Cartesian coordinates.

5. Are there any limitations to using Cartesian or polar coordinates for storing intergalactic objects in a database?

One limitation of using Cartesian coordinates is that they may not accurately represent the true distance between objects when dealing with very large distances. Polar coordinates may also have limitations when dealing with objects that are not circular or spherical in shape.

Similar threads

Replies
13
Views
2K
  • Calculus and Beyond Homework Help
Replies
24
Views
1K
Replies
2
Views
1K
  • General Math
Replies
7
Views
1K
Replies
8
Views
1K
  • Differential Equations
Replies
3
Views
249
  • Astronomy and Astrophysics
Replies
1
Views
1K
  • Differential Geometry
Replies
9
Views
3K
  • Introductory Physics Homework Help
Replies
1
Views
908
  • Special and General Relativity
Replies
8
Views
912
Back
Top