**Rectangular (Cartesian) Coordinates**

Building star systems logically leads to wanting to associate them to one another—into stellar empires or federations or coalitions, etc., or perhaps two or more allied or competing groups....

And that, then, also causes the Worldbuilder to want to answer questions like "How far is it between Star A and Star B?"

The most straightforward method for placing star systems in a 3-dimensional space—and easily being able to answer questions like the one above—is to use a 3-dimensional rectangular (or Cartesian) coordinate system.

And that, then, also causes the Worldbuilder to want to answer questions like "How far is it between Star A and Star B?"

The most straightforward method for placing star systems in a 3-dimensional space—and easily being able to answer questions like the one above—is to use a 3-dimensional rectangular (or Cartesian) coordinate system.

Before people start emailing me over this, let me state here-and-now that I am fully aware of cylindrical and spherical coordinates and—while both are perfectly adequate for describing the position of points in a 3-dimensional space—both have singular complications that make them less than ideal for Worldbuilding purposes:

1. Although there are equations for converting between all three coordinate systems, converting from spherical or cylindrical coordinates to rectangular coordinates can lead to ambiguity related to the quadrant in which the x- and y-values of the rectangular coordinates fall.

2. Even if one exclusively uses cylindrical or spherical coordinates to describe the location of points in a 3D space, it is necessary to convert to the rectangular coordinate system to calculate the straight-line distance between any two points, so why not just describe the space using rectangular coordinates in the first place?

Rectangular (or Cartesian) coordinates are noted by the familiar

This system has several advantages:

1. All the coordinates are straight-line measures, in the same units;

2. The direction of the specified point is intuitive based on the signs of the coordinates:

a. A point with all positive coordinates (2, 2, 2) is "ahead" and to the "left" relative to the positive direction of the x-axis and "up" relative to the (

b. A point with a negative

c. Any point with a negative

3. It is a relatively simple matter to calculate the distance between any two points within the volume (see below), using the Pythagorean theorem.

Henceforth in this discussion I will refer to this system as the R-type coordinate system.

*x*and*y*values of the 2-dimensional Cartesian plane, as well as a third value,*z*, denoting the point's distance above or below that (*x, y*) plane.This system has several advantages:

1. All the coordinates are straight-line measures, in the same units;

2. The direction of the specified point is intuitive based on the signs of the coordinates:

a. A point with all positive coordinates (2, 2, 2) is "ahead" and to the "left" relative to the positive direction of the x-axis and "up" relative to the (

*x*,*y*) plane;b. A point with a negative

*y*-coordinate (2, -2, 2) is "ahead" and to the "right" relative to the positive direction of the*x*-axis, and “up" relative to the (*x*,*y*) plane;c. Any point with a negative

*z*-coordinate is "down" relative to the (*x*,*y*) plane, etc.

3. It is a relatively simple matter to calculate the distance between any two points within the volume (see below), using the Pythagorean theorem.

Henceforth in this discussion I will refer to this system as the R-type coordinate system.

**Orienting The Z-Axis To Find The Center**

**Spiral Galaxies**

The

For spiral galaxy types, the

Some potential (but not exhaustive) options for orienting the

The

*z*-axis of the R-type system is best set as identical to the rotational axis of the spiral galaxy types. By convention, galactic "north" is determined by whichever direction results in an anti-clockwise rotation for the galaxy, so the positive direction of the*z*-axis would be oriented toward galactic "north". Then, the logical choice for the center of the coordinate system is the location where the rotational axis passes through the rotational plane, placing it at the center of the disk, whether or not a singular gravimetric mass (SMBH) exists at that point.For spiral galaxy types, the

*x*-axis of the R-type system will be oriented somewhat arbitrarily. The*x*-*y*plane may be clearly defined by the rotational plane of the galaxy, but in which direction the positive x-axis points is not automatically selected by this fact. Thus, the orientation of the*x*-axis is largely up to the needs/desires/preferences of the Worldbuilder.Some potential (but not exhaustive) options for orienting the

*x*-axis might include:- A line connecting the center of the spiral galaxy to the home star of the primary civilization;
- The direction of the galaxy's peculiar motion as it travels through intergalactic space;
- The line connecting the barycenter of the galaxy to the barycenter of its largest companion galaxy (projected to the invariable plane, if the companion is on an inclined orbit).

The

*y*-axis will, then, simply be oriented at right angles to both the*x*- and*z*-axes.**Elliptical and Lenticular Galaxies**

Contrary to spiral galaxies, the stars in these types of galaxies often have wildly varying orbital planes around the center of mass. So, it is best to put the origin point at the common barycenter, and orient the

The

*z*-axis to the pole-to-pole axis (see the section above on galaxy types). Thus, the*x*-axis is perhaps best oriented along one of the semi-diameters, toward whatever point the Worldbuilder desires.The

*y*-axis, finally, will naturally fall along the semi-diameter perpendicular to the*x*-axis.**Irregular and Peculiar Galaxies**

There may not be a rotational axis of any sort in the case of irregular/peculiar galaxies; indeed, many of the stars may follow non-Keplarian orbits. Thus, the center of the coordinate system will fall on—or close to—the geometric center of the volume. The

The

*z*-axis for these galaxies will not align with a rotational vector, and so it is perhaps best aligned with the shortest physical dimension of the volume. The*x*-axis can then be associated as closely as possible to the longest of the three dimensions of the volume. The positive direction of the*x*-axis for these types of galaxies, then, is limited to two choices, but otherwise is up to the preference of the mapmaker.The

*y*-axis, by extension, will fall perpendicular to the*x*-axis, though not usually parallel to—nor necessarily identical with—the medial dimension of the volume.**Local-Area Coordinates**

For smaller regions within a larger context (a spiral arm, a region of an elliptical/lenticular, or a subset of an irregular/peculiar galaxy), a particular star or other distinguishing object, such as a black hole, pulsar, etc., can serve as a good "neutral" center point. (In many fictional universes and game systems, pulsars are used as navigational “landmarks”.)

In local areas, it is perhaps best to orient the x-axis direction first, and let the

In local areas, it is perhaps best to orient the x-axis direction first, and let the

*z*-axis be determined by the perpendicular to the (*x, y*) plane.**For Spiral And Elliptical/Lenticular Galaxies**

For local areas in spiral and elliptical/lenticular galaxies, the most logical orientation for the

*x*-*y*plane is the rotational plane of the galaxy, with the*z*-axis determined by the perpendicular to that plane (galactic "north" and “south"). The direction in which the*x-*axis points is then arbitrarily chosen by the Worldbuilder.**For Irregular/Peculiar Galaxies**

For local areas in irregular/peculiar galaxies, the most logical orientation for the

*x*-*y*plane is the plane formed by the longest and second-longest dimensions of the larger galaxy, with the*z*-axis determined by the perpendicular.**Calculating The Distance Between Two Points**

Calculating the straight-line distance between two points in the rectangular system is simply a matter of using the three-dimensional expansion of the Pythagorean Theorem:

**Example**

Ann has chosen to use the R-type system to specify the locations in a local area of her galaxy. She has decided upon a political unit called the Ranasite Empire, centered on the star Ranas. The first colony of the Ranasite Empire is located on Trusam B, which has coordinates (11, 17, 12), as measured from Ranas in units of lightyears. The farthest currently colonized world is Entor, at coordinates (23, 32, 44).

A drawback of the rectangular coordinate system is that it does not straightforwardly specify the straight-line distance from the origin to a particular point in the volume, so before we calculate the distance between Trusam B and Entor, let's calculate the straight-line distance from Ranas to Trusam B and also from Ranas to Entor.

Ranas’ coordinates for these two calculations would be (0, 0, 0), and would correspond to x2, y2, and z2, so we only need to provide Trusam B’s coordinates to the equation, namely (11, 17, 12).

A drawback of the rectangular coordinate system is that it does not straightforwardly specify the straight-line distance from the origin to a particular point in the volume, so before we calculate the distance between Trusam B and Entor, let's calculate the straight-line distance from Ranas to Trusam B and also from Ranas to Entor.

Ranas’ coordinates for these two calculations would be (0, 0, 0), and would correspond to x2, y2, and z2, so we only need to provide Trusam B’s coordinates to the equation, namely (11, 17, 12).

**From Ranas to Trusam B:**

**From Ranas to Entor:**

**From Trusam B to Ranas:**

Here, we have to provide both sets of coordinates to the equation such that (x1, y1, z1,) = (11, 17, 12) and (x2, y2, z2) = (23, 32, 44).

Thus, the straight-line distance between Trusam B and Entor is just shy of 37 light years.

**Relocating The Origin In A 3D Rectangular Coordinate System**

In a 2-dimensional rectangular (Cartesian) coordinate plane, a point is said to lie in one of four quadrants, depending on its orientation to the origin point (where the x- and y-axes cross).The distance between any two points is found by using the 2-dimensional version of the Pythagorean Theorem. So, using Point A and Point C from the illustration at left: |

If the origin is moved to another point, subtract the original coordinates of the new origin from all the other coordinates to get their new coordinates from the new origin.

For instance, to move the origin to Point A (into Quadrant I), subtract (Ax, Ay) from all other points (the former origin point becomes the new Point A):

For instance, to move the origin to Point A (into Quadrant I), subtract (Ax, Ay) from all other points (the former origin point becomes the new Point A):

The former Point A has now become the origin, and the former origin is now Point A, and has moved in to Quadrant III. Point B has moved from Quadrant II into Quadrant III. Point C is still in Quadrant III, but is now twice as far from the origin, and Point D remains in Quadrant IV, having moved closer to the y-axis and farther from the x-axis.

This works consistently, no matter which quadrant is moved into; thus, the same procedure works for three-dimensional coordinates, as well.

If we add a

This works consistently, no matter which quadrant is moved into; thus, the same procedure works for three-dimensional coordinates, as well.

If we add a

*z*-coordinate to Point B, such that it is now located at (-12, -2, -6), and a*z*-coordinate to Point D, such that it is now located at (2, -12, -9), the distance between them becomes:Whereas in 2-dimensional space, the two points were 17.2047 units apart (see above), in the extended 3-dimensional space, they are separated by 0.2595 additional units, due to both of them having acquired

If Ann has more than a few star systems in the Ranasite Empire, doing these calculations and conversions by hand will rapidly become time-consuming and tedious, so it is highly recommended that as you create and place star systems, you keep a database or a spread sheet of their coordinates, so that shifting origins and calculating distances between stars can be automated.

*z*-coordinates.

If Ann has more than a few star systems in the Ranasite Empire, doing these calculations and conversions by hand will rapidly become time-consuming and tedious, so it is highly recommended that as you create and place star systems, you keep a database or a spread sheet of their coordinates, so that shifting origins and calculating distances between stars can be automated.