I have my double-star

All about writing scripts for Celestia in Lua and the .cel system
Topic author
sernie73
Posts: 4
Joined: 10.02.2004
With us: 20 years 9 months
Location: Germany
Contact:

I have my double-star

Post #1by sernie73 » 21.06.2004, 21:11

Hello everybody

I guess I solved the problem with my double star now. If you also want to have one, just copy the following codes in a stc- and ssc-file:

Code: Select all

#######################
#hip600001.stc
#######################
# HIP 600001
#######################
600001 "Ernies DoubleStar" {
   RA      88.0
   Dec      15.04
   Distance   0.8
   SpectralType   "G2"
   AbsMag      65.0
}

#######################

Code: Select all

#########################
# hip600001.ssc
#########################
# 1. Sonne
##########
"Sonne 1" "HIP 600001" {
   Texture         "white-dwarf.jpg"
   Emissive      true
   Color         [0.9 1 0.9]
   BlendTexture      true
   Radius         969000      # km
   Atmosphere
   {   Height      15000
      Lower      [ 0.95 1 0.95 ]
      Upper      [ 0.35 0.35 0.35 ]
      Sky      [ 0.3 0.3 0.3 ]
   }
   EllipticalOrbit
   {   Period      0.000668      # Jahre
      SemiMajorAxis   0.6      # AE's
      Eccentricity   0.003      # Bahnexzentrit?t
      Inclination   6.340      # Neigung der Bahnachse
      MeanAnomaly   0
   }
   RotationPeriod   18.0         # Stunden
   Obliquity   0.5         # Neigung Planetenachse
   Albedo      0.99
}
##########
# 2. Sonne
##########
"Sonne 2" "HIP 600001" {
   Texture         "white-dwarf.jpg"
   Emissive      true
   Color         [1 0.4 0.1]
   BlendTexture      true
   Radius         19250000
   Atmosphere
   {   Height      35000
      Lower      [ 0.95 1 0.95 ]
      Upper      [ 0.35 0.35 0.35 ]
      Sky      [ 0.3 0.3 0.3 ]
   }
   EllipticalOrbit
   {   Period      0.000668
      SemiMajorAxis   0.03
      Eccentricity   0.0028
      Inclination   6.34
      MeanAnomaly   180
   }
   RotationPeriod   4.4
   Obliquity   0.3
   Albedo      0.99
}
#########################

As you see I am from Germany. The comments are helpfull for me, so they are in German.

The period of the orbits is not quite true, it shoud be 6.26e-7 years. This is 19.8 sec !!!!! Maybe I calculated it wrong, so I took 6.68e-4 years.
If you travel to my system, you will see nothing. You are only 0.06m away from the gravity center. So scoll back until a distance of about 2 AU. If you speed up to 1000x you will see both stars rotate.

If you like, I have another system created called HIP 600000. Just email me for a copy of the zip-file. It will be a complete starsystem with planets, moons, moons of moons, some sattelites and a small comet.
Present time I'm working on a guided tour throughout the whole system, perhaps in a few days (or months) this tour will be included in the zip.

mfg
Ernie
There are no problems, there are only solutions.

Ernie

Double-Star

Post #2by Ernie » 21.06.2004, 23:37

Howdy!

Please make some changes to the ssc-script to see the atmospheres of the sun:

Sonne 1: Atmosphere, Height 1500000
Sonne 2: Atmosphere, Height 150000000
Lower [1 0.4 0.2]

This will work. :D

Ernie

ElPelado
Posts: 862
Joined: 07.04.2003
With us: 21 years 7 months
Location: Born in Argentina
Contact:

Post #3by ElPelado » 22.06.2004, 08:31

I tryed my self too, and I have a problem: If the starts ar far from the center of gravity and you go with the cammera far from it too, the planets/stars dissapear... so you can see the binary system only when you are close to the center star
---------X---------
EL XENTENARIO
1905-2005

My page:
http://www.urielpelado.com.ar
My Gallery:
http://www.celestiaproject.net/gallery/view_al ... y-Universe

Avatar
piellepi M
Posts: 124
Joined: 25.09.2003
Age: 69
With us: 21 years 1 month
Location: Rome, Italy

Post #4by piellepi » 22.06.2004, 10:53

Hi !!! :D
I have tried your double star and I confirm that in order to see something you must keep pressed the "End" key on the keyboard for a looooooooooooong time 8O just to arrive at a distance of, say, a couple of light years! :)
My question is: is it my Celestia or did you realize that the Luminosity of "Ernies DoubleStar" is strange?
The value (in my computer at office) is

0.000000000000000000000000855x Sun 8O 8O 8O 8O :? :? :? :?

Yes, 24 zeros!!

Perhaps there is something strange in the absolute magnitude value: I'm a amateur astronomer, but sincerely i'm not an expert in such a matter! :roll:

Thanks a lot for your contribution
Pierluigi

Avatar
piellepi M
Posts: 124
Joined: 25.09.2003
Age: 69
With us: 21 years 1 month
Location: Rome, Italy

Post #5by piellepi » 22.06.2004, 12:37

Again here!! :D
I played a while with different values for AbsMag of "Ernies DoubleStar" in the stc file and I found something that left me even more confused :(
I changed that value, first, to 15.0 and then finally to 1 .
With this value you are projected directly (without the risk to fall asleep pressing "End" :D ) to a distance of 2.7 ly and now the star has a luminosity of "34.0x Sun". Now pressing "L" a few times you can witness the double star ! 8O
Selden or other Celestia Gurus, what are the effects of changing the Absolute Magnitude in Celestia behavior?
Thank a lot!!!

Pierluigi

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 21 years 11 months

Post #6by granthutchison » 22.06.2004, 13:57

Celestia works out the luminosity of a star from its AbsMag, or its AppMag and Distance. From that, it calculates the size the star must be to produce the energy output specified. By specifying a very very low AbsMag, Ernie forces Celestia to produce a tiny, invisible star to act as a centre of gravity for his double star system.
Another way to produce a similar effect is to place the centre of gravity as an "invisible" object in orbit around a normal central star, and then to place the companion star and any outer planets in orbit around that centre of gravity. The relative motions are the same, but many people find the lop-sided appearance annoying, and dislike the fact that one star looks like a star and the other like an emissive planet.

Grant

Ernie

Double-Star

Post #7by Ernie » 22.06.2004, 14:06

Howdy piellepi

Yes, the value with the 24 zeros is correct. It is also displayed here. As I know the greater the AbsMag-Statement, the darker the star is. As I have taken a G2-Star, Celestia calculates with known parameters. That means the darker the star the smaller it is. If I zoom to the center called HIP 600001, I can have a distance of 1 meter(!) and my star is a small circle. So a G2-star with AbsMag of 65 seems to be calculated as a less than 1m-diameter-star(!!!).

That sounds really good, I think. But it seems to be logical.

The only reasun for this "pocket"-star HIP 600001 is to create a gravity center. The other two stars are meant as planets (according to the meaning of the ssc-file), but I changed their character to suns. So when I travel or <g>oto my doublestar, Celestia reaches a distance (depending on the weather in Germany :D ) from 0.8 meters to a few kilometers. This means I only can see my micro-sun. I have to zoom out a lot. First both orbits appear, then - the gravity center is inside the big red star - I leave the first star and it gets visible. In a distance of about 2 AU I can see the whole system, what exists present time.

Another problem is this (maybe for ElPelado): My system is only 0.8 ly away. So the big red star should be seen very clearly from earth (my second system HIP 600000 works correctly. This star could be seen even by daylight. It's also 0.8 ly away). I think as the Center-star is so small, Celestia thinks, there is no light coming to earth. As "Sonne 1" and "Sonne 2" are calculated as Planets, there is no reason to calculate their light, if they can be seen from earth.

This could be a good reason for some programmers to think about planets which are taken as suns!

I also tried another thing: I created two suns with the stc-file. Both were clearly seen on th earths sky. But they were not taken as a physical doublestar. So I think that only objekts in the stc-files are produced as little white spots on the nightsky. Planets are "falling under the table", as we Germans say. They were only displayed if you are traveling in the particular sunsystem.

Today evening I will try one (or more) screenshots of my doublestar. I hope I can place them here, otherways I will create a little gallery and post it.

piellepi: with your last posting you are right. The smaller the AbsMag the bigger the star is. As HIP 600001 completely is hidden inside "Sonne 2" (the red one) it never will be visible. Celestia seems to take a "standart"-distance to the objekt you travel to. So I get a distance of about double the diameter of my micro-star. So with your AbsMag of 15.0 the star is much more bigger, so the distance also is bigger. And so you get 2.7 ly. Could be possible, couldn't it?

In the next future I will try a tripple-system!

Greetings from sunny Germany
Ernie

Ernie

Double Star

Post #8by Ernie » 22.06.2004, 14:12

Hi Grant !!!

That's real a good idea! If I take the "real" star as the big one and the gravitycenter as planet, so the second star will be the moon of the invisible planet (how to make him invisible?). So the real star also could be seen on the earth nightsky! The small star is invisible, like in the real universe.

I will try that! I think it's only a logical problem for the stc- and ssc-file-programmer to tak a sun like a moon, but it should work.

Thanks again.

Ernie

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #9by selden » 22.06.2004, 14:22

Ernie,

For the invisible barycenter "planet", you can specify

Class "invisible"

and Celestia won't draw anything there.
Selden

Ernie

Double Star

Post #10by Ernie » 22.06.2004, 18:40

Howdy!

selden: :D thx for invisibility. It works great.

granthutchison: :( Sorry, but your idea doesn't work here. I've defined the big red one as sun, that works as usual. The gravity center is an invisible planet. This also works. Then I established my second sun as a moon of this planet/center. But it seems as if Celestia can't display moons which have "Emissive true". Only normal moons/satellites are displayed. Of course there is "something" moving around. When I mark it, the marker circles around my center. But no sun is to be seen. So I have to go back to my last construction.

Ernie

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 21 years 11 months

Re: Double Star

Post #11by granthutchison » 22.06.2004, 19:01

Ernie wrote:Then I established my second sun as a moon of this planet/center. But it seems as if Celestia can't display moons which have "Emissive true". Only normal moons/satellites are displayed. Of course there is "something" moving around. When I mark it, the marker circles around my center. But no sun is to be seen. So I have to go back to my last construction.
Try setting the Radius of your invisible centre to be the same or larger than the radius of the emissive sun you're using. Celestia assumes that objects can't have moons much bigger than themselves, and so tends to supress such objects.

Grant

Ernie

Double Star

Post #12by Ernie » 22.06.2004, 21:59

Howdy!

Since hours I'm trying every possible combinations of data. Many things happened but not what I liked to happen.

1. I tried some size-experiments (thx to granthuchison). Well, Ididn't try Jupiter orbiting Eros :D , but at least the gravity center was nearly as big as the red sun (a M1-star: Beteigeuze) It's moon had the size of our sun. Everything went very well.

1. According to my calculations there is no need to make the gravity center invisible. It is inside the bid red all the time. Nevertheless I tried it out (thx to selden). The pseudo-planet really disappeared. But with it it's orbit display also disappeared and with it all orbits of the moons of this planet.

2. I can make the gravity center and the moon (my second sun) as big as I want. I found no size-limit. As long as the moon is not Emissive, it orbits wonderfull. As soon as I define Emissive True it also vanishes from the screen.

So my opinion still is that Celestia can display planets as suns but no moons. Perhaps when Celestia finds a '/' in the Name-statement no sun is possible. Also when one planet/moon is defined as invisible, it's orbit and all subordinated orbits are also suppressed.

Btw: How can I post a picture here? I know I have to use the [img]-%20and[/img]-statement but what is between it? I have the picture on my HD F:\Spiele\Celestia\

Greetings from Ernie to all who are fighting with problems

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 21 years 11 months

Re: Double Star

Post #13by granthutchison » 22.06.2004, 22:09

Ernie wrote:So my opinion still is that Celestia can display planets as suns but no moons. Perhaps when Celestia finds a '/' in the Name-statement no sun is possible. Also when one planet/moon is defined as invisible, it's orbit and all subordinated orbits are also suppressed.
I'm not sure why you're having so much trouble with this. If it helps, here's a working version from my own nearby stars add-on, which places an invisible centre of gravity in orbit around 33 Lib, and then two emissive planets in orbit around that. There's no visibility problem with the objects or their orbits.

Code: Select all

"33 Lib BC" "33 Lib"
{
   Class "invisible"
   Radius 1e6

   EllipticalOrbit {
      Period          2130
      SemiMajorAxis   191
      Eccentricity   0.2
      Inclination   142.6
      AscendingNode   191.6
      ArgOfPericenter 309.2
      MeanAnomaly     52.6
   }

   Obliquity               90.7
   EquatorAscendingNode    30.5

}

"33 Lib B" "33 Lib/33 Lib BC"
{
   Texture "mstar.jpg"   # M1V
   Radius 450000      #

   Color   [ 1 0.7 0.7 ]

   Emissive true

   EllipticalOrbit {
      Period          308.9     # 0.8457yr
      SemiMajorAxis   66000000  # appropriate for mass ~0.55
      Eccentricity   0.7559
      ArgOfPericenter 221.9
      MeanAnomaly     45.2
   }

   RotationPeriod   300 # plausible guess
}

"33 Lib C" "33 Lib/33 Lib BC"
{
   Texture "mstar.jpg"   # M3V
   Radius 300000      #

   Color   [ 1 0.7 0.7 ]

   Emissive true

   EllipticalOrbit {
      Period          308.9      # 0.8457yr
      SemiMajorAxis   103500000  # appropriate for mass ~0.35
      Eccentricity   0.7559
      ArgOfPericenter 41.9
      MeanAnomaly     45.2
   }

   RotationPeriod   160 # plausible guess
}


Grant

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #14by selden » 22.06.2004, 23:15

Grant,

I'm sorry to say that there are indeed problems with the visibility of the orbit paths for 33 Lib.
:(

In Celestia v1.3.1 final, in v1.3.2pre8, and in the latest cvs build, the orbit paths are visible only if the invisible barycenter, 33 Lib BC, is selected. Then the barycenter's orbit path is red and the orbit paths of 33 Lib B and 33 Lib C are drawn in blue.

When I select either 33 Lib B or 33 Lib C, all three orbit paths immediately disappear.
(Added later: they also vanish if I select 33 Lib itself.)


However, I am not having the "Emissive true" problems that Ernie reports.
Selden

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 21 years 11 months

Post #15by granthutchison » 22.06.2004, 23:34

selden wrote:I'm sorry to say that there are indeed problems with the visibility of the orbit paths for 33 Lib.
That one's been around since invisible objects were introduced, but I confess I clean forgot about it - I think Chris wanted to suppress the orbit for invisible objects so that they would remain as invisible as possible unless specifically selected by the user. The pain is that the orbits of visible objects in orbit around the invisible object are also suppressed. (I don't know whether that would be an easy thing or a difficult thing to fix.)
But I took from Ernie's phrase
The pseudo-planet really disappeared. But with it it's orbit display also disappeared and with it all orbits of the moons of this planet.
that he'd tried revisiting his pseudoplanet after rendering it invisible - it's orbiting inside Betelgeuse so would need a GoTo to observe it at all. In which case he's encountering a different problem.
Am I mistaken about what you were doing, Ernie?

Grant

Ernie

Problems

Post #16by Ernie » 23.06.2004, 07:19

Hi Grant!

I've read your question. I'm sorry not to answer now. It is Wednesday morning 9am here and I have to go for work. In the evening - 7pm local time - I will be back. Then we can discuss about it.

Greetings from rainy Germany
Ernie

Ernie

The same as yesterday

Post #17by Ernie » 23.06.2004, 18:12

Howdy!

I'm back again. Since noon my car is beeing repaired :x , so I had time enough to "play" with my double star 2nd edition. The results were the same every time I changed something. As Selden also said, invisible objects have an invisible orbit and every subordinated object also got invisible. I tried it with planets, moons, satellites. Maybe it is the specific version of Celestia (I'm using 1.3.1), I don't know. Btw, in eMule I found 1.3.1-1, is this the newest version?

Oddly enough the ssc-file what granthutchison gave me a few messages above worked absolute correct. 8O

It's true, in my constellation the gravity center is inside the Big Red all the time. Beteigeuse has much more mass as the Small White. But what if both stars are the same mass? Then the gravity center would be in the exact middle of them. And then I have to make it invisible. That was the original idea for producing an invisible object.

Well, I guess the problem of invisibility and it's consequences are well known now. I will "play" on with celestia, presently I'm adding some satellites and spaceships to my original HIP 600000. But I will not forget my double star.

Many thanks to Selden and Granthutchison. :D

Greetings from thunderstorming Germany
Ernie

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #18by selden » 23.06.2004, 18:19

If you don't mind seeing the orbit that the barycenter follows, you can use a transparent object instead of the invisible Class.

For details, see http://www.lepp.cornell.edu/~seb/celestia/hutchison/empty.html
Selden

danielj
Posts: 1477
Joined: 15.08.2003
With us: 21 years 3 months

Re: I have my double-star

Post #19by danielj » 24.06.2004, 18:22

Do this code only works in Celestia 1.3.2 pre?Because I try to put in Celestia 1.3.1-1 and the program didn?t even open.So,1.3.1 may not support it

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 21 years 11 months

Post #20by granthutchison » 24.06.2004, 18:48

Ernie's code should work as far back as 1.3.1pre3. Prior to that, the star name in Ernie's stc isn't accepted, so the system just doesn't exist when you open Celestia - but Celestia still opens without problems.
This can be fixed simply by deleting the star name:

Code: Select all

#######################
#hip600001.stc
#######################
# HIP 600001
#######################
600001 {
   RA      88.0
   Dec      15.04
   Distance   0.8
   SpectralType   "G2"
   AbsMag      65.0
}

#######################
after which Ernie's code works at least as far back as 1.3.0.

Grant


Return to “Scripting”