Page 1 of 1

How to code a "true binary planet"

Posted: 04.09.2013, 18:49
by arakish
Hello All,

Unless my memory fails, this is my first post to these forums.

I have been browsing the forums looking for help on how to code a binary planet. Yes, I know it is not actual coding, but that is how I look at it. I am not referring to the double planets or circumbinary planets I have seen posted here. I am referring to "true binary planets."

The best idea I can give on this phenomenon is to read the Rocheworld Series written by Dr. Robert L. Forward, particulary the first two books Flight of the Dragonfly (later republished as Rocheworld) and Return to Rocheworld.

A true binary planet is basically a double planet that formed as a single world but in two parts. What I want to know is how can I code this into Celestia? A true binary planet has a combined "spin" and "rotation" as I refer to them. The "spin" is actually what would the planet's rotation axis if the two parts had formed as a single planet. The "rotation" is actually the barycenter about which each rotates. The two attached images help to demonstrate this.

The code inserted below is my attempt at producing this effect I saw in another "extra". Only problem is that this attempt is completely ignored by Celestia. The only difference is that I changed names to fit my Sareylan system. The "extra" is the Vulcan add-on for the star 40 Eri A made by Jestr in Star Trek section of the Celestia Motherlode. Jestr's Vulcan add-on works, but my attempt to copy it does not. Additionally, Jestr's email listed at the Motherlode no longer seems valid.

I know there are quite a few commented out lines in the code below. The reason is that some may be used at a later time as I continue working on refining the Sareylan system. The lines that will not be used will be deleted, but I am leaving them in until that time.

Any help is greatly appreciated.

Code: Select all

ReferencePoint "Tyinbra-Makadran" "Sareylan" {
    CustomOrbit "Tyinbra-Makadran"
    EllipticalOrbit {
        Period 0.702027245
        SemiMajorAxis 0.821498
        MeanLongitude 0
        }
    Visible True
    Clickable True
    }

"Tyinbra" "Sareylan"
{
    Class "planet"  #terran (greenhouse inferno)
#    Mesh "filename"
    Texture "venuslike.*"
    NightTexture "venuslikenight.*"
#    BumpMap "filename"
#    BumpHeight 2.5
    Color [ 0.7 0.7 0.5 ]
#    SpecularTexture "filename"
#    SpecularColor [ r g b ]
#    SpecularPower 25.0
#    HazeColor [ r g b ]
#    HazeDensity 0.8
    Radius 3076.901
    Oblateness 0.0017
#    Beginning 2446482.0
#    Ending 2451989.77083
    InfoURL "URL|URI"
   
    Atmosphere {
        Height 80
        Lower [ 0.5 0.5 0.3 ]
        Upper [ 0.7 0.7 0.5 ]
        Sky [ 0.9 0.9 0.7 ]
#        Sunset [ r g b ]
        CloudHeight 40
        CloudSpeed 80
#        CloudMap "filename"
#        CloudShadowDepth 1.0
        }
   
    OrbitFrame { EquatorJ2000 { Center "Sareylan/Tyinbra-Makadran" } }
    BodyFrame { EclipticJ2000 { Center "Sareylan/Tyinbra-Makadran" } }
   
    EllipticalOrbit {
        Period 0.002027245
        SemiMajorAxis 5000.821498
        Eccentricity 0.00268
        Inclination 0.00
        MeanLongitude 0
#        AscendingNode 123.45
#        LongOfPericenter 123.45
#        MeanAnomaly 123.45
#        Epoch 2345678.12345
        }
   
    RotationPeriod 30.915
#
#    UniformRotation {
#        Period 23.93447117
#        Inclination -23.4392911
#        MeridianAngle 280.147
#        }
#
    Obliquity 56.96
#    LongOfRotationAxis 123.45
#    RotationOffset 123.45
#    PrecessionRate 123.45
#    Orientation [ 180 1 0 0 ]
#    EquatorAscendingNode 123.45
    Albedo 0.7312
}

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

"Makadran" "Sareylan"
{
    Class "planet"  #terran (greenhouse inferno)
#    Mesh "filename"
    Texture "venuslike.*"
    NightTexture "venuslikenight.*"
#    BumpMap "filename"
#    BumpHeight 2.5
    Color [ 0.7 0.7 0.5 ]
#    SpecularTexture "filename"
#    SpecularColor [ r g b ]
#    SpecularPower 25.0
#    HazeColor [ r g b ]
#    HazeDensity 0.8
    Radius 3076.901
    Oblateness 0.0017
#    Beginning 2446482.0
#    Ending 2451989.77083
#    InfoURL "URL|URI"
   
    Atmosphere {
        Height 80
        Lower [ 0.5 0.5 0.3 ]
        Upper [ 0.7 0.7 0.5 ]
        Sky [ 0.9 0.9 0.7 ]
#        Sunset [ r g b ]
        CloudHeight 40
        CloudSpeed 80
#        CloudMap "filename"
#        CloudShadowDepth 1.0
        }
   
    OrbitFrame { EquatorJ2000 { Center "Sareylan/Tyinbra-Makadran" } }
    BodyFrame { EclipticJ2000 { Center "Sareylan/Tyinbra-Makadran" } }
   
    EllipticalOrbit {
        Period 0.002027245
        SemiMajorAxis 5000.821498
        Eccentricity 0.00268
        Inclination 0.00
        MeanLongitude 0
#        AscendingNode 123.45
#        LongOfPericenter 123.45
#        MeanAnomaly 123.45
#        Epoch 2345678.12345
        }
   
    RotationPeriod 30.915
#
#    UniformRotation {
#        Period 23.93447117
#        Inclination -23.4392911
#        MeridianAngle 280.147
#        }
#
    Obliquity 56.96
#    LongOfRotationAxis 123.45
#    RotationOffset 123.45
#    PrecessionRate 123.45
#    Orientation [ 180 1 0 0 ]
#    EquatorAscendingNode 123.45
    Albedo 0.7312
}


Another idea I had was to create a single object in two parts, convert it to a CMOD file. The only problem I can think of is how to give the object a double-axis rotation?

rmfr

Attached images giving better idea of the double axis spins.

Re: How to code a "true binary planet"

Posted: 17.09.2013, 01:18
by Fenerit
Hi! A quick way unfitted for Oblateness. H -> Denebola -> tyinbra.

tyinbra-makadran.zip

Re: How to code a "true binary planet"

Posted: 18.09.2013, 19:25
by arakish
Fenerit,

Thanks. I tried the SSC you uploaded, but it did not work. I haven't read up on the new UniformRotation, OrbitFrame, BodyFrame, FixedPosition things to know how to use them. Thus, I am stuck with using the older things that are being deprecated. I certainly hope they won't be programmed out. Those things I have understood since Celestia v1.1? I've been playing with Celestia for quite a while, but never have created mine own system 'til now. In the Sareylan system I wanted a binary planet like the one in Dr. Foward's Rocheworld series. Just have not been able to figure out how to get the spin to match for both lobes.

I have figured out a method to get the bodies to corotate about a common point, but just cannot seem to get the spin right.

Code: Select all

"TMBary" "Sareylan" {    #ReferencePoint
    Class "invisible"
    EllipticalOrbit {
        Eccentricity 0.00038746
        Period 0.702027245
        SemiMajorAxis 0.821498
        MeanLongitude 0
        ArgOfPercenter 238
        AscendingNode 172
        Inclination 1.946784
        }
    Visible true
    Clickable true
    }

"Tyinbra" "Sareylan/TMBary" {
    Class "moon"  #terran (greenhouse inferno)
    Texture "venuslike.*"
    NightTexture "venuslikenight.*"
#    BumpMap "filename"
#    BumpHeight 2.5
    Color [ 0.7 0.7 0.5 ]
#    HazeColor [ r g b ]
#    HazeDensity 0.8
    Radius 3076.901
    Oblateness 0.0017
#    InfoURL "URL|URI"
   
    Atmosphere {
        Height 80
        Lower [ 0.5 0.5 0.3 ]
        Upper [ 0.7 0.7 0.5 ]
        Sky [ 0.9 0.9 0.7 ]
#        Sunset [ r g b ]
        CloudHeight 40
        CloudSpeed 80
#        CloudMap "filename"
#        CloudShadowDepth 1.0
        }
   
    EllipticalOrbit {
        Period 0.002027245
        SemiMajorAxis 5000.821498
        Eccentricity 0.00268
        Inclination 0.00
        MeanLongitude 180
#        AscendingNode 123.45
#        ArgOfPericenter 123.45
        }
   
    RotationPeriod 0.04865388
    Obliquity 90
    Albedo 0.7312
}

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

"Makadran" "Sareylan/TMBary"
{
    Class "moon"  #terran (greenhouse inferno)
    Texture "venuslike.*"
    NightTexture "venuslikenight.*"
#    BumpMap "filename"
#    BumpHeight 2.5
    Color [ 0.7 0.7 0.5 ]
#    HazeColor [ r g b ]
#    HazeDensity 0.8
    Radius 3076.901
    Oblateness 0.0017
#    InfoURL "URL|URI"
   
    Atmosphere {
        Height 80
        Lower [ 0.5 0.5 0.3 ]
        Upper [ 0.7 0.7 0.5 ]
        Sky [ 0.9 0.9 0.7 ]
#        Sunset [ r g b ]
        CloudHeight 40
        CloudSpeed 80
#        CloudMap "filename"
#        CloudShadowDepth 1.0
        }
   
    EllipticalOrbit {
        Period 0.002027245
        SemiMajorAxis 5000.821498
        Eccentricity 0.00268
        Inclination 0.00
        MeanLongitude 0
#        AscendingNode 123.45
#        ArgOfPericenter 123.45
        }
   
    RotationPeriod 0.04865388
    Obliquity 90
    Albedo 0.7312
}


I know I am leaving some commented stuff in the code. Someday I will get around to using it. Also, need to read up on those new UniformRotation, OrbitFrame, BodyFrame, FixedPosition things.

Again, thanks for the help. Also, thanks for any additional help anyone offers.

rmfr

Re: How to code a "true binary planet"

Posted: 18.09.2013, 23:34
by Fenerit
arakish wrote:Fenerit,

Thanks. I tried the SSC you uploaded, but it did not work. I haven't read up on the new UniformRotation, OrbitFrame, BodyFrame, FixedPosition things to know how to use them.

8O

Please, could you test the example below? It use ScriptedOrbit to accomplish the mutual orbiting the same common point and the UniformRotation to get the 90 degrees spin. If these directives doesn't works then you must have an old Celestia version. Type sareylan and goto there. In this cases of tapping, it must be selected the barycenter, or the selected planet will be rest against the star's background while the other will spin around.

sareylan.zip

Re: How to code a "true binary planet"

Posted: 02.12.2013, 20:34
by arakish
Sorry I have been gone for quite a while. Was having trouble just getting back here. Seems like there was a block for this webforum or something.

I solved the problem by simply tidally locking the two planets together. Thanks for the help, although nothing seemed to work.

Thanks again.

rmfr

Re: How to code a "true binary planet"

Posted: 03.12.2013, 08:32
by Doors
Just found the forums again.
Don't know what happened to shatters.net, but google found the IP address while I was searching for celestia info.

As for the Roche World.

You could try using the asteroid Kleopatra as a model or a template.
I know it is just an asteroid, but it has about the right shape.
From what I could find it was broken up then set to spinning.
The spin elongated it until one moon broke off which gave it a wobble breaking the second off.
What remains is a wobbling double lobe object.
It is already in Celestia's database, and perhaps the cmod you want could be made from its.
I am looking at it now and the shape is somewhat close.

Doors.