Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Gravity Simulator - Sun and Earth Orbital Motion - Episode 1

Let's Code Physics via YouTube

Overview

Learn to create a gravitational motion simulator in this coding tutorial focused on modeling the Sun-Earth system. Explore the Euler-Cromer method, visualize the Earth's size relative to the Sun, and gain insights into index tracking and error handling. Utilize VPython to build the simulation, with code available for download. Discover how to initialize objects, calculate gravitational forces, and implement conservation of angular momentum. Follow along as the tutorial guides you through the entire process, from setup to testing, ensuring a comprehensive understanding of simulating celestial mechanics.

Syllabus

Intro
Bouncy Ball
Recent Collision
Earth and Sun
Initialize
Sun
Velocity
Earth
Conservation of Angular Momentum
Gravitational Force
Calculation Saver
Velocity List
Code Window
Once Over
Testing
Sun and Earth

Taught by

Let's Code Physics

Reviews

Start your review of Gravity Simulator - Sun and Earth Orbital Motion - Episode 1

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.