Making an exact interstellar structure
Posted: 07.04.2008, 02:05
I'm trying to represent the universe of the venerable hard sf rpg 2300AD in Celestia. The game used the Gliese catalogue (2nd ed, 1969) for star positions and a nontrivial "geography" of possible travel routes (due to distance-limited FTL). After a weekend of hacking I have some rather appealing results (link1, link2):
The travel routes are right now prisms my Matlab software writes to a cmod file. This gives them a very cool 3D feel, but I'm pretty certain there ought to be a simpler way of connecting the dots! Is there a way of creating a user-defined "constellation" that links the right stars? Or a script method to add the proper lines?
In lieu of that, I must clearly get the coordinate transformations just right. I have a database of star positions (which includes stars with incorrect positions that must be retained for the game assumptions - the game is not only an alternate timeline today but an alternate interstellar geography!). Right now my stars and my routes do not align as they should. The star positions are stored in a simple xyz coordinate system that I convert to RA,Dec with little problem. The nebula object that contains the routes uses the original xyz coordinates. After some mental rotation I managed to get the right 90 degree rotation, but the stars I add do not align with the corners. The difference seems to be a few degrees. I have a nagging suspicion that this is due to a different epoch. Any ideas?
{Original Ra, Dec data in 1969 epoch} -> [spherical to cartesian] -> {XYZ coordinates I have} -> [cartesian to spherical] -> {Ra,Dec,Dist in .stc file (interpreted in current epoch)} -> Celestia
(The positions are a bit off compared to the real positions due to changed epoch, but since I do not care for the real stars in this application this is not a problem.)
{XYZ as above} -> [90 degree rotation of axes] -> {.cmod xyz coordinates} -> Celestia
(If I have a star at location (1,0,0) it ought to end up at Dec: 0, Ra: 0, Dist: 1 and my mesh ought to point at this spot too since I do not rotate it)
Overall, if this approach turns out to be stupid, what would be the best way of creating a 3d object that touches exact spherical coordinates in interstellar space? Or conversely, how to get stars to touch the right locations in a multi-lightyear 3d object?
The travel routes are right now prisms my Matlab software writes to a cmod file. This gives them a very cool 3D feel, but I'm pretty certain there ought to be a simpler way of connecting the dots! Is there a way of creating a user-defined "constellation" that links the right stars? Or a script method to add the proper lines?
In lieu of that, I must clearly get the coordinate transformations just right. I have a database of star positions (which includes stars with incorrect positions that must be retained for the game assumptions - the game is not only an alternate timeline today but an alternate interstellar geography!). Right now my stars and my routes do not align as they should. The star positions are stored in a simple xyz coordinate system that I convert to RA,Dec with little problem. The nebula object that contains the routes uses the original xyz coordinates. After some mental rotation I managed to get the right 90 degree rotation, but the stars I add do not align with the corners. The difference seems to be a few degrees. I have a nagging suspicion that this is due to a different epoch. Any ideas?
{Original Ra, Dec data in 1969 epoch} -> [spherical to cartesian] -> {XYZ coordinates I have} -> [cartesian to spherical] -> {Ra,Dec,Dist in .stc file (interpreted in current epoch)} -> Celestia
(The positions are a bit off compared to the real positions due to changed epoch, but since I do not care for the real stars in this application this is not a problem.)
{XYZ as above} -> [90 degree rotation of axes] -> {.cmod xyz coordinates} -> Celestia
(If I have a star at location (1,0,0) it ought to end up at Dec: 0, Ra: 0, Dist: 1 and my mesh ought to point at this spot too since I do not rotate it)
Overall, if this approach turns out to be stupid, what would be the best way of creating a 3d object that touches exact spherical coordinates in interstellar space? Or conversely, how to get stars to touch the right locations in a multi-lightyear 3d object?