The Orion's Arm Universe Project Forums
Fortran route drawing for Celestia - Printable Version

+- The Orion's Arm Universe Project Forums (https://www.orionsarm.com/forum)
+-- Forum: Offtopics and Extras; Other Cool Stuff (https://www.orionsarm.com/forum/forumdisplay.php?fid=2)
+--- Forum: General Off-topic Discussion (https://www.orionsarm.com/forum/forumdisplay.php?fid=10)
+--- Thread: Fortran route drawing for Celestia (/showthread.php?tid=3082)



Fortran route drawing for Celestia - selden - 08-16-2017

I'm not at all sure where this should be posted since it's not OA specific. Maybe the "worldbuilding tools" forum might be more appropriate?

Anyhow,...

I wrote a command-line Fortran program to do most of the hard work in creating route lines between locations in Celestia (e.g. between stars and galaxies). I built it using Cygwin's gfortran under Win7, but I think the executable will work under most 64 bit versions of Windows. (I included the cygwin .DLLs that seem to be needed.) Essentially, you provide it with a .CSV containing RA,Dec and Distances of the endpoints plus the desired color for each of the routes that you want to see. It creates a .CMOD and .DSC for that set of routes.

See the included routes_readme.txt for details.

https://www.classe.cornell.edu/~seb/celestia/files/routes.zip
(1.7 MB expands to 4.7 MB)

[attachment=1124]

[attachment=1125]


RE: Fortran route drawing for Celestia - stevebowers - 08-16-2017

This should come in useful for any expansion of the Celestia Wormhole map. Thanks!


CELX route drawing for Celestia - selden - 08-17-2017

Here's a rather different approach, which I think might be a lot more convenient, since it's rather small and should be usable by anyone who has a copy of Celestia v1.6.1 or later. It should work under all operating systems, although I've only verified it under Windows 7.

nroutes.celx, provided below, uses Celestia itself to create the route .cmod, so no additional software is needed: neither a Fortran compiler nor Cygwin runtime libraries, for example.

https://www.classe.cornell.edu/~seb/celestia/files/nroutes.zip (9KB expands to 15KB)

Like routes.f, nroutes.celx reads a .csv file to define the routes, but instead of having to calculate the RA, Dec and distances yourself, you specify object names which are known to Celestia and the script extracts their coordinates from Celestia to create the .cmod file.

For example, a line in the the .csv file specifying a route between Alpha Centauri and Sirius could look like this:

ALF Cen,Sirius,1.0,1.0,0.0, alpha cen to sirius

The names can be any of the synonyms known to Celestia for any of its objects.

A tradeoff is that the structure of the .csv is much more restrictive, and the script does not try to verify that you've entered the correct names or used the right line format. Either the script or Celestia will crash if the data is too badly messed up. In principle a lot of error detection could be added, but I just didn't feel like spending the time on it. Maybe some future version could do that. Or maybe someone else could make the appropriate changes to the script. Anyhow, see the accompanying readme file for details.