Skip to content

Newtonian physics meet functional programming, what a perfect match!

Notifications You must be signed in to change notification settings

arinal/elm-newtonian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elm-newtonian

A solar system

Finally, a solar system animation in your browser! Every planet movement is calculated using Newtonian gravity equation.

This application is simple, meant to be an ideal case study if you want to start learning elm.

Getting started

If elm hasn't been installed in your system, install it here

Afterwards, type this on your terminal:

$ git clone https://github.com/arinal/elm-newtonian.git
$ cd elm-newtonian
$ elm-reactor
elm-reactor 0.18.0
Listening on http://localhost:8000

Browse to http://localhost:8000/Main.elm and witness a realtime calculation of the greatest fundamental nature law ever invented in classical physics!

The planets don't have a nice fixed orbital track, you're free to edit their locations and initial velocities. Take a look at init inside Main.elm and play around with each planet's initial parameters (mass, velocity, position, etc).

About

Newtonian physics meet functional programming, what a perfect match!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages