Simulate + Animate Simple Pendulum in Python

preview_player
Показать описание
Learn how to simulate and animate a pendulum, and make a variety of different plots:
- Theta, Theta dot vs Time
- Theta vs Theta dot (Phase Diagram)
- Animate a Pendulum
- Multiple Animations
- Custom matplotlib colors

===============================
========= Video Chapters =========
0:00 - Intro
0:25 - Simulation
2:17 - Time Domain Plot
3:20 - Animate Time Domain
5:02 - Phase Diagram Plot
6:04 - Animate Phase Diagram
7:23 - Animate Pendulum
8:57 - Animate Everything!
10:23 - Custom Colors
===============================
Рекомендации по теме
Комментарии
Автор

the best explanation on how to animate a simple pendulum with python i 've ever watched :) thanks a lot

lauraphy
Автор

Not sure what happened with the audio in the second clip! Subscribe so I can buy a new mic!

logandihel
Автор

awesome i was using matlab but this is useful too

riccvven
Автор

on phase diagram i've got a deprecation warning: MatplotlibDeprecationWarning: Setting data with a non sequence type is deprecated since 3.7 and will be remove two minor releases later phase_dot.set_data(theta_deg[i], theta_dot_deg[i]) <==solved by putting some brackets[ ] : phase_dot.set_data([theta_deg[i]], [theta_dot_deg[i]]), on both lines.

theskydreamer
Автор

i've got an small issue with the snippet: animate theta, theta_dot vs time where the animation would render(.mp4) but the graph in the browser(notebook, colab) would be empty, solved by putting plt.show() after anim.save(...) line

theskydreamer
Автор

hi, you said solve ode but what does it outputs?

hariharanramamurthy
Автор

Is this like math or something i dont understand

Rapha_Carpio
Автор

[WinError 2] The system cannot find the file specified.
Any help?
Getting this error for this line
ani.save('time_domain.mp4', writer=ffmpeg_writer)

jackdawsonanderson