Page 1 of 2

Lines between stars?

Posted: 07.10.2006, 02:10
by Reiko
Is it possible to make lines that would connect stars? For example a line going from sol to aCent and then one from there to another star? This would be for the purpose of drawing a route between stars. :)

Posted: 07.10.2006, 03:05
by Chuft-Captain
This is actually how constellations are shown in Celestia. (Toggle constellations on/off with the "/" key, or Menu: Render->View Options )

The file that defines this is ../data/asterisms.dat

You can replace (or add to) the contents of asterisms.dat with your own "constellations"(but don't forget to take a backup copy first):
Try this:

Code: Select all

"Reiko's search for Jodie Foster ;-)"
[
[ "Sol" "Alf Cen" "Barnard's Star" "Aldebaran" "Vega"]
]


Make sure you enable constellations and Constellation Labels.
NOTE: Constellation lines are only visible from a distance. You won't see them from close up.

If this is not what you want, try searching for "rulers" or "graticules" on the forum.

Posted: 07.10.2006, 04:45
by LordFerret
"Reiko's search for Jodie Foster"... LOL! :D

I'm going to try that, because having read the book I've always wondered! Thanks for posting that (and good question/suggestion Reiko!). :D

Posted: 07.10.2006, 11:35
by Reiko
Thank you! I will give them a try :)

Posted: 07.10.2006, 18:23
by abramson
Regarding Reiko's question:

Would it be possible to have the line's conneting stars in an asterism going right up to the star, instead of stopping far from it? I have been reading the source, but can't find where this is defined.

Thanks,

Guillermo

Posted: 07.10.2006, 19:30
by selden
I don't think you'll find anything explicit in the code. It looks to me to be a precision and/or depth clipping issue.

If you look at such a star from a distance, the lines go right into it (well, they're drawn behind it, actually). They only get clipped if you're close to the star.

Here's an example, looking at Alpha Orionis from a distance, magnified:

Image
.

Posted: 07.10.2006, 19:50
by abramson
Thanks, Selden. You are probably right.

I wanted to have asterism lines that could be seen from a viewpoint close to the stars to implement a visualization of star parallax: defining a "star" at the position of the Earth, and in the same orbit, and with a line connecting it to a nearby star, showing the variation of the observing line as the year goes by. I will have to find something else.

Guillermo

Posted: 07.10.2006, 20:40
by selden
It seems to me that a grid at a large distance beyond the star might be appropriate. Then you look toward the star when the earth is at one side of its orbit and again when the earth is at the other side, and you'll see the star move relative to the grid.

You could use a graticule object defined as a DSC Nebula with the same RA and DEC as the star but placed at 1e9LY and with some appropriate radius so that it's visible at appropriate magnifications.

Some graticules (grids) are available at
http://www.lepp.cornell.edu/~seb/celest ... cules.html
and Cham has provided some circular and rectangular grids at
http://nho.ohn.free.fr/celestia/Cham/

Posted: 07.10.2006, 22:36
by phoenix
I'll bet the problem with asterisms is a depth-sorting issue because star-orbits draw perfectly right through the star with chris new depth-sorting code.

Posted: 09.10.2006, 07:45
by Reiko
Chuft-Captain wrote:This is actually how constellations are shown in Celestia. (Toggle constellations on/off with the "/" key, or Menu: Render->View Options )

The file that defines this is ../data/asterisms.dat

You can replace (or add to) the contents of asterisms.dat with your own "constellations"(but don't forget to take a backup copy first):
Try this:

Code: Select all

"Reiko's search for Jodie Foster ;-)"
[
[ "Sol" "Alf Cen" "Barnard's Star" "Aldebaran" "Vega"]
]


Make sure you enable constellations and Constellation Labels.
NOTE: Constellation lines are only visible from a distance. You won't see them from close up.

If this is not what you want, try searching for "rulers" or "graticules" on the forum.

I don't know what I'm doing wrong but I can't seem to make that work. I even tried using that exact same code you posted. I made sure I had constellations turned on and I zoomed way out but none of the lines will show up. :( :?:

Posted: 09.10.2006, 12:45
by abramson
Reiko wrote:I don't know what I'm doing wrong but I can't seem to make that work.


It works all right, though, Reiko. Did you remember to activate the display of asterisms by pressing the / key?

Guillermo

Posted: 09.10.2006, 14:04
by Reiko
abramson wrote:
Reiko wrote:I don't know what I'm doing wrong but I can't seem to make that work.

It works all right, though, Reiko. Did you remember to activate the display of asterisms by pressing the / key?

Guillermo


Yes and I double checked by going into the menu and making sure the little box next to constellations was checked.

Everytime I make any changes to the asterisms file they all stop working. For example if I go in there and just delete the very last constellation on the list then none of them will show up anymore. :?:

Posted: 09.10.2006, 14:25
by cartrite
Reiko wrote:
Everytime I make any changes to the asterisms file they all stop working. For example if I go in there and just delete the very last constellation on the list then none of them will show up anymore.


What are you using to edit the file? If you are using Wordpad, files are sometimes corrupted. Try using Notepad instead.

cartrite

Posted: 09.10.2006, 14:48
by Reiko
cartrite wrote:Reiko wrote:
Everytime I make any changes to the asterisms file they all stop working. For example if I go in there and just delete the very last constellation on the list then none of them will show up anymore.

What are you using to edit the file? If you are using Wordpad, files are sometimes corrupted. Try using Notepad instead.

cartrite


Thank you! That did the trick but in my case the opposite was true. I was originally using notepad and decided to switch to wordpad after reading your post and it works now :) YAY!

Posted: 09.10.2006, 14:56
by cartrite
Reiko wrote:
I was originally using notepad and decided to switch to wordpad after reading your post and it works now

That's strange. When you used Notepad, what was the value for Encoding ?
That option is visible if you used "Save As..."

Also When you used Notepad, did you have Word Wrap on?

cartrite

Posted: 09.10.2006, 15:26
by Chuft-Captain
Reiko wrote:I don't know what I'm doing wrong but I can't seem to make that work. I even tried using that exact same code you posted. I made sure I had constellations turned on and I zoomed way out but none of the lines will show up. :( :?:

How far out is "way out"?? :lol:
--- You may need to be at least 0.5-1.0 lyrs from Sol before this constellation will begin to display. To be sure, goto the star Spica, then press H, then C to select and centre Sol.
You should see something like this view from Spica:
Image

Everytime I make any changes to the asterisms file they all stop working. For example if I go in there and just delete the very last constellation on the list then none of them will show up anymore.

What operationg system are you using? If windows, then you may be accidentally saving the file with the wrong file suffix if you are hiding known file extensions in exporer.
To show file extensions, go to Tools->Folder Options in the Explorer Menu, then on the View Menu look for an option "Hide extensions for known file types". Make sure this IS NOT checked. (As below)
Make sure you haven't accidentally saved it as asterisms.dat.txt
If so, just rename it getting rid of the .txt
Image

Posted: 09.10.2006, 21:12
by Reiko
cartrite wrote:Reiko wrote:
I was originally using notepad and decided to switch to wordpad after reading your post and it works now
That's strange. When you used Notepad, what was the value for Encoding ?
That option is visible if you used "Save As..."

Also When you used Notepad, did you have Word Wrap on?

cartrite


Yes the word wrap was turned on and the encoding was ANSI

Posted: 09.10.2006, 21:15
by Reiko
Chuft-Captain wrote:
Reiko wrote:I don't know what I'm doing wrong but I can't seem to make that work. I even tried using that exact same code you posted. I made sure I had constellations turned on and I zoomed way out but none of the lines will show up. :( :?:

How far out is "way out"?? :lol:
--- You may need to be at least 0.5-1.0 lyrs from Sol before this constellation will begin to display. To be sure, goto the star Spica, then press H, then C to select and centre Sol.
You should see something like this view from Spica:
Image

Everytime I make any changes to the asterisms file they all stop working. For example if I go in there and just delete the very last constellation on the list then none of them will show up anymore.
What operationg system are you using? If windows, then you may be accidentally saving the file with the wrong file suffix if you are hiding known file extensions in exporer.
To show file extensions, go to Tools->Folder Options in the Explorer Menu, then on the View Menu look for an option "Hide extensions for known file types". Make sure this IS NOT checked. (As below)
Make sure you haven't accidentally saved it as asterisms.dat.txt
If so, just rename it getting rid of the .txt


Thank you it's working now. It turned out whenever I used notepad to edit the file it wouldn't work anymore but when I use wordpad it seems to work just fine :)

Posted: 09.10.2006, 21:24
by cartrite
Word Wrap was on in Notepad. I think that's what caused the corruption problems. I run Windows and Linux on the same computer. Linux has a text editor called emacs. My Linux system sees all my Windows directories. Whenever I have a problem file, I open it with emacs and there is a ^M character at the end of every line. Those characters cause problems. You can't see them with Wordpad or Notepad.

Sometimes I can use Wordpad to edit files. I haven't found out why it sometimes corrupts files.
I never had a problem with Notepad and I have Word Wrap off. ANSI Encoding.

Possible reason for many HEADACHES??????????/

cartrite

Posted: 09.10.2006, 21:38
by Reiko
cartrite wrote:Word Wrap was on in Notepad. I think that's what caused the corruption problems. I run Windows and Linux on the same computer. Linux has a text editor called emacs. My Linux system sees all my Windows directories. Whenever I have a problem file, I open it with emacs and there is a ^M character at the end of every line. Those characters cause problems. You can't see them with Wordpad or Notepad.

Sometimes I can use Wordpad to edit files. I haven't found out why it sometimes corrupts files.
I never had a problem with Notepad and I have Word Wrap off. ANSI Encoding.

Possible reason for many HEADACHES??????????/

cartrite


It seems you are right! I turned the wordwrap off and notepad works fine now :D