Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a draft of a Python version of the code of this video: https://www.youtube.com/watch?v=8lDF0acgRdI&list=PLn0OLiymPak1b2aYULx6hDVU7wSGEUJqw&index=17 | |
# Disclaimer: The output looks similar-enough to me. Certainly there are off-by-one differences and there might be other differences too | |
import math | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# Part 1. Setup | |
SIMULATION_DURATION = 500 # Simulation time in ms | |
dt = 0.01 # descretization in ms |