Skip to content

sulphuric-sudip/Solar-System-Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solar-System-Simulation

http://sudip-neupane.com.np/solar-system-simulation/

A 2D canvas element in HTML & JS is used to draw the elements.

The days of the revolution of a planet and the eccentricity of the planet's orbit are taken as it is in natural form.

The size of the planet and orbital axis is taken such that they seem realistic for viewing.

The shape of orbit of the planet is in eclipse shape. The relation between the minor and major axis:

$$ b = a * \sqrt{1-e^2} $$

we get,

$$ minor_{axis} = major_{axis} * \sqrt{1-planet.eccentricity^2} $$