Reiko,
this map is exactly the one defined in my previous model (with some color variations).
As a small tutorial, here's how I find the proper ecliptic cartesian coordinates to build a CMOD file. First, I need the standard ecliptic coordinates of a star :
RA (in degrees),
Dec (in degrees) and
Distance (in LY). The exact coordinates used by Celestia can be found in Celestia's database, in the file "
stars.txt" (a large file available on CVS), or in the file "
nearstars.stc". Then I apply the following formulae to get the cartesian coordinates :
Code: Select all
x = distance * sin(90?° - Dec) * cos(RA)
y = - distance * sin(90?° - Dec) * sin(RA)
z = - distance * cos(90?° - Dec)
The x, y, z numbers are then used in the ascii CMOD file. Here's the part of the CMOD which defines the mesh itself (you also need a material header, as in the example given in a previous post) :
Code: Select all
mesh
vertexdesc position f3 end_vertexdesc
vertices 2
0 0 0
x y z
linelist 1 2
0 1
end_mesh
The
vertices line defines the number of points declared in the list (2, in the example given above). The first point has coordinates 0, 0, 0, which is our Sun. The
linelist command line defines the color to be used (color number 1, in the example above, which is a color defined in the material header), and the number of points to connect (2 in the example). The list itself (0 1 in the example above) defines a connection between point number 0 (our Sun) and point number 1 (of coordinates x, y, z).
Once the CMOD file is done, you need to define a DSC file, like the one I gave in a previous post. This is important to orient properly the model in Celestia, since there's a difference between the equatorial coordinates and the ecliptic coordinates :
Code: Select all
Nebula "Name"
{
Mesh "model.cmod"
Axis [ 1 0 0 ]
Angle 66.5607089 # Important, since the equatorial grid has an inclination of 23.5?° (approx), relative to the ecliptic grid.
Position [ 0 0 0 ]
Radius 100 # Should be the same value used for the invisible mesh defined in the CMOD file, to center the model in Celestia. See the example given in a previous post.
}
I hope this may help people to build their own CMOD file.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"