Planetary Orbits, using Matrix Library

92 views
Skip to first unread message

Bert Mariani

unread,
Sep 20, 2023, 12:38:05 PM9/20/23
to The Ring Programming Language
Hello Mahmoud et ALL

Planetary-Orbits-1.ring

This is another contribution to the Orbital Mechanics section
It uses the Matrix Library for the Transforms of the view display

Attached is: 
     Planetary-Orbits-ZIP.zip
          - Planetary-Orbits-1.rin
          - Planet images are in the zip file
                 - Icarus-Asteroid , and Halley-Comet, Ceres-Asteroid-Belt

Basic instructions:
 - Select a Planet to display in the drop-down menu at the top-left
 - Click on Start/Calc to calculate the orbit points into a matrix array
 - Click on DrawMatrix to draw the planetary orbit.

 - There are 2 check-boxes
        - OneDraw:  on => one orbit only,   off => multiple orbits,  
                                        Fixed Size to show Eccentricity
         - MultiOrbits: on => log scaled display of multiple planets

 - View
        - Top down view of orbits when "RotationAngle" X = 0 degrees
        -  Tilted view of orbits when "RotationAngle" X = 60 degrees
        -  X, Y, Z angle can be used to vary the display

======================================
Screen Captures 

Note the Eccentricity of Mercury compared to Earth
Icarus is an Asteroid that gets closer to the Sun than Mercury and beyond Mars
PlanetSnap1.jpg

Foci (Focus) of the Elliptical orbit are drawn in Red
PlanetSnap2.jpg

Top-Down view from North of the entire Solar System

PlanetSnap3.jpg

View is tilted 60 degrees in X-Axis for another perspective
Pluto get closed than Neptune for part of its eccentric orbit
Halley's Comet travels Way beyond Pluto.
Halley's orbital period has varied between 74 and 79 years since 240 BC
Last seen in 1986

PlanetSnap4.jpg
Planetary-Orbits-ZIP.zip

Mahmoud Fayed

unread,
Sep 20, 2023, 11:43:30 PM9/20/23
to The Ring Programming Language
Hello Bert

Very nice work, Thanks for sharing :D

Suggestion: Adding a button called (Play) or (Animation)
Once we click on this button
The application adds the planets one by one (Setting values, Calc., & Drawing)
So, we can see the great results (screen shots) that you shared automatically without setting parameters.

Greetings,
Mahmoud

Bert Mariani

unread,
Sep 28, 2023, 2:04:00 PM9/28/23
to The Ring Programming Language
Planet-2Snap1.jpgHello Mahmoud et ALL

Updated version 2      Planetary-Orbits-2.ring
Attached is:                 Planetary-Orbits-ZIP.zip

It can draw Single Planet and Overlay other planets to compare orbit eccentricity
    - Select Planet,  Start/Calc, DrawOrbit
    - OneDraw checkbox controls how may planets are overladed

It can draw the Inner Planets, Outer Planets or ALL Planets using the checkboxes
    -  DrawALLOrbits will draw multiple orbits    ( OneDraw = off )

It now includes Animation.
    - Animation  button will start the planet/s  moving through their orbits at proper relative speed.

It can Tilt the View Angle for 3D using the X-Axes  or Rotate the display using the Z-axis around the center point

=============================
Inner Planets + Animation
InnerPlanets = on,  OuterPlanets = off,  DrawALLOrbits,  Animation

Planet-2Snap1.jpg

Outer Planets + Animation
InnerPlanets = off   OuterPlanets = on,  DrawALLOrbits,  Animation
View angle  X=60  Z=10

Planet-2Snap2.jpg

ALL Planets + Animation
InnerPlanets = on,  OuterPlanets = on,  DrawALLOrbits,  Animation
Planet-2Snap3.jpg

Single Planet - Overlay  ---  OneDraw = off
Select Planet, StartCalc, DrawOrbit
X Axis = 0,  Z-Axis = 0  for top-down view of orbit eccentricity

Plant-2Snap5.jpg

Mahmoud Fayed

unread,
Sep 28, 2023, 2:29:03 PM9/28/23
to The Ring Programming Language
Hello Bert

The simulation looks beautiful :D
Thank you very much for the update.

Note: The message doesn't include the attached source code files
 
Greetings,
Mahmoud

Bert Mariani

unread,
Sep 28, 2023, 8:30:53 PM9/28/23
to The Ring Programming Language
Hello Mahmoud et ALL

Sorry ... forgot to attach. Mea culpa !
Here it is.

Attached:   Planetary-Orbits-2-ZIP.zip
Planetary-Orbits-2-ZIP.zip

Mahmoud Fayed

unread,
Sep 29, 2023, 2:56:45 AM9/29/23
to The Ring Programming Language
Hello Bert

The file: SolarSystem3.jpg is missing

Greetings,
Mahmoud

Ilir Liburn

unread,
Sep 29, 2023, 4:54:19 AM9/29/23
to The Ring Programming Language
Hello Mahmoud,

you need to extract new archive over old one. New archive doesn't contain images.

New version is much faster, making orbit calculation instantly. Excellent work Bert.

Greetings,
Ilir

Bert Mariani

unread,
Sep 29, 2023, 8:35:39 AM9/29/23
to The Ring Programming Language
Hello Mahmoud, Illir et ALL

"You need to extract new archive over old one"
All the images were updated to "png" which can be made transparent using Paint 3D

Attached:  Planetary-Orbits-2-ZIP.zip

====================
 Planetary-Orbits-2.ring
 Ceres4.png
 Earth4.png
 Halley4.png
 Icarus4.png
 Jupiter4.png
 Mars4.png
 Mercury4.png
 Neptune4.png
 Pluto4.png
 Saturn4.png
 SolarSystem4.png   ( background image at top of screen )
 Sun4.png
 Uranus4.png
 Venus4.png
======================

As they say in French:
   " Ma tête était dans la lune "
     My head was in the moon
Planetary-Orbits-2-ZIP.zip

Mahmoud Fayed

unread,
Sep 29, 2023, 2:43:18 PM9/29/23
to The Ring Programming Language
Hello Bert

Thank you very much.

Keep up the GREAT WORK :D

Greetings,
Mahmoud

Reply all
Reply to author
Forward
0 new messages