StarryOrbits File Format

From Micasim

Jump to: navigation, search


Project StarryOrbits
Project Lead Dave Wilson
Project Homepage StarryOrbits


Format

StarryOrbits data is stored in a compressed text file arranged like so:


V (= version - currently 1)

N (= number of bodies)

T (= start time)

dt (= time between each animation frame)

m0 red0 green0 blue0 (= mass and RGB colors of body 0)

m1 red1 ...

m(N-1) red(N-1) green(N-1) blue(N-1) (= mass and RGB colors of body N-1)

x00 y00 z00 (= position of body 0 at frame 0)

x10 y10 z10 (= position of body 1 at frame 0)

.....

x(N-1)0 y(N-1)0 z(N-1)0 (= position of body N-1 at frame 0)


xyz data for rest of frames.

.........


Note the space between each number.

Floating point numbers are best stored in scientific notation for accuracy.

The RGB components for each star color should be in the range of 0.0 to 1.0. Color will be assigned randomly if no RGB data is present.


Compression

The file is compressed using gzip and has a .sof extension (StarryOrbits File).


Example

As an example, below is the start of Arturo Nakasone's 8 body simulation file.

1

8

0.0

1.562500e-02

1.250000e-01

1.250000e-01

1.250000e-01

1.250000e-01

1.250000e-01

1.250000e-01

1.250000e-01

1.250000e-01

6.774110e-01 2.351160e-01 2.764720e-02

-6.495770e-02 -2.213400e-01 7.780760e-01

-1.161540e+00 1.254110e-01 -1.088180e-02

.......

Personal tools