
Learn to build Python animations from scratch across one-, two-, and three-dimensional motion, with a clear structure, step-by-step code, exercises, and mp4 exports with labeled arrows.
Learn to use Linux terminal, Mac OS terminal, and Windows command prompt to run Python programs, navigate folders with cd, clear the screen, and manage desktop files.
Install Python and the libraries NumPy and map plot lib with tested versions across Windows ten 1 to 20.04 and macOS Big Sur to avoid compatibility issues.
Install python on Windows 11, choose a compatible older version, add to path, verify with hello world, then install numpy, matplotlib, cvxopt, sympy, control, moviepy, websockets, and util for animations.
Learn to install Python 3.8 and numpy on Ubuntu 20.04, verify versions, add the dead snakes PPA if needed, install pip and matplotlib, and run Python scripts from the terminal.
Explore animating an airplane’s horizontal motion with x(t)=800 t, y=2 km, and speed Δx/Δt=800 km/h, graphing x vs time, y constant, and the speed.
Explore how to create Python animations with matplotlib by importing pyplot, gridspec, and animation, using the animation function to update frames, and using GS to split three subplots.
Create time, x, and y arrays for a python animation using numpy. Define time from 0 to 2 hours with 0.005 hour steps, then set x=800*time and y=2 kilometers.
Define a figure with size, dpi, and normalized RGB colors, slice it into a subplot with G.S., and animate a line by repeatedly calling update_plot to move left to right.
build a moving line animation in Python by updating a plot with a line object and slicing x and y arrays to reveal frames as num increases.
This lecture guides you to define a line object and wire it into an update_plot function to animate a moving trajectory, with data setting and axis limits for efficiency.
explains how to structure a matplotlib animation by creating figure objects from a class template, configuring axes and color, and using an update function with frames and blit to render.
Construct a figure, add a subplot grid, and use Griesbeck templates to create gs objects with colors, then assign individual line objects per subplot to drive animation.
Explain how a figure and subplots are named and sliced into nine or four rectangles, and how update and set_data control animated lines in Thig.
Learn to speed up a line's x motion by modifying X = 800*time, adjusting time arrays, and handling frame amounts with int conversions to keep animation frames integer.
understand how index errors arise when the frame amount exceeds the array length in python animations, covering zero-based indexing and the setup from importing libraries to func animation.
Learn to animate a fixed-length airplane composed of five line objects in Python, using set_data to move lines with precise initial and final coordinates while managing line width.
discover how to fix a line's length while increasing its width using solid, underscore, cap style settings, so the line widens without changing its original length.
Explore moving a fixed-length diagonal line by indexing x and y arrays with num, computing start and end coordinates, and updating the plot function to animate the line.
This lecture demonstrates constructing line-based animations in Python by building skyscrapers and a fuselage airplane from line objects, adjusting coordinates and the update plot function order to control layering.
Define wing and fuselage coordinates using x bar, y bar, and offsets, then plot the line to visualize the wing. Exercise building a symmetric second wing and run the program.
Construct and visualize an airplane with two wings by defining line objects for wings and tail, updating coordinates and plots, and exploring symmetry and tail dimensions in Python.
Construct a flying airplane from five lines by computing tail coordinates with X bar, Y bar, and a 0.15 kilometers vertical offset, for symmetric parts four and five.
Learn to customize tick marks in matplotlib by using xticks and yticks with numpy's range to select specific values, automate tick calculation, and ensure inclusion of end points.
Customize axis labels, set x and y names with font sizes, add a subplot title with its own font size, and enable a grid that auto-adjusts to axis intervals.
Learn to add and customize text on a Matplotlib subplot for Python animations, including text objects, boxes, colors, and dynamic updates.
Modify the moving line by replacing the x array with a dot array to produce sparse red points every 80 kilometers, using a zero-initialized array and a for loop.
Explain Python plotting of a plane trajectory using dot and y arrays on the x y plane, showing big dots and the small dots between them.
Explore Python animations by building a plane trajectory with dot arrays, dividing coordinates by 1000, and rendering big and small dots to visualize motion.
Avoid common animation pitfalls by understanding Python local scope: don't modify outer variables inside update plot function; precompute data in advance and use a ready array to drive animation.
speed up an airplane animation in python by tenfold, adjusting the x direction function, frame amount, and dot arrays, while exploring the second subplot with time axis and grid.
Define and place the second subplot as an object named ax2, position it in a 2x2 grid, set axis limits, labels, grid, and legend options for time versus x distance.
Define a black dotted vertical line in the first subplot that moves with the airplane along the x-axis, naming it zero underscore vertical and setting its x and y.
Create the third subplot showing speed as Delta X over Delta T, with a constant 800 km/h line and an animated moving line with a vertical marker.
Define a speed line in the third subplot and plot delta X over delta T at 800 km/h, then add a vertical line while preserving dpi resolution for precision animations.
Create and position a division line and text objects for x distance, time, and speed in the 3rd subplot, update values with rounding and safeguards for smooth Python animations.
Explore quadratic and cubic airplane motion using parabolic x equals 400 time squared and cubic x equals 200 time cubed, adjusting a to keep 1600 km at t equals 2.
Apply derivatives to a Python animation's speed function for a parabolic path. Show that the derivative isn’t a horizontal line and how to extract velocity from time arrays.
Animate three airplanes racing from 0 to 2 hours with distinct trajectories at 0.5, 1.5, and 2.5 kilometers, using separate functions and subplots.
Create separate x, y, altitude, and speed arrays for three airplanes, copy and adapt blocks for each, and plot red, blue, and green trajectory lines to animate simultaneous flight.
Explore square root function and its derivative in python animations, avoid division by zero and denominator pitfalls, and refine legends with rounding, as you prepare to simulate free-fall on Earth, Mars, and Moon.
Invite students to share a one- or two-sentence review to help improve the Python engineering animations course, and thank them for their engagement.
Explore the physics of free fall by simulating objects dropping from 100 meters on Earth, Mars, and the Moon, highlighting gravity accelerations, velocity, and the role of derivatives in motion.
Derive position as a function of time using y0, v0, and g in y(t)=y0+v0t+1/2 gt^2, and analyze velocity and acceleration for Earth, Mars, and Moon with animated plots.
Create a 12-second earth gravity animation in Python using matplotlib and numpy, drawing a five-meter circle whose center moves with altitude and rotates through 360 degrees.
Create a Python function to generate circle coordinates from a radius, converting degrees to radians and computing x and y arrays with cosine and sine, ready for animation.
Demonstrate building a circle object from many line segments to form the Earth, then animate its fall by updating y coordinates while keeping x fixed in a 3x4 subplot.
Create a velocity function animation with subplots for Earth, Mars, and the Moon, using velocity arrays and line objects, and stop when the circle hits the ground.
Extend the Earth animation to Mars and the Moon by duplicating position, velocity, and acceleration logic using planet-specific gravities and shared time arrays for three subplots.
Animate blue and red trains oscillating in x with sine and cosine. Delay the green and purple cars moving in y via quadratic and linear functions to avoid danger zones.
Learn to introduce a four-second delay in the car’s y-position by shifting the inverse parabola y = 13 − 2t^2 to the right, with time nonnegative.
Shift a time function by replacing t with (t minus delay) and squaring the whole expression; for example, right shift by four seconds yields y = 13 − 2(t − 4)^2.
Apply delays to prevent car-train collisions by keeping cars at rest until two or six seconds, then drive with piecewise functions for green and purple cars.
Learn how sine and cosine govern motion in animations. Visualize A/R and B/R as cosine alpha and sine alpha on the unit circle from 0 to 2 pi.
Use sine and cosine with radians to describe oscillations, scale with amplitudes, and map red and blue train motion along the x dimension.
Learn to animate with time by expressing alpha as a function of time, using 2π f t, and control oscillation speed with frequency in hertz through sine and cosine waves.
Explore how alpha equals two pi f t to define cycles per second in radians, and show how frequency speeds oscillations while amplitude sets magnitude, preparing animation code.
Define the frame amount and build the animation scaffolding by creating a figure with four subplots, plotting blue and red sinusoidal trains over time, and fine-tuning axes and legend.
Build the animation code to plot two cars with piecewise functions using four line objects, control transparency, and align axes to visualize motion on a subplot.
Create and animate trains and cars in a second subplot by defining danger zones with four lines, configuring axes and scales, and adding text boxes for car labels.
Learn to build Python animation code for engineering animations by configuring axis ranges, removing zeros with concatenated axes, and implementing an update plot function to drive the animation.
Build and animate two line objects, blue and red, using time and train arrays with a sinusoidal function driving point positions, then add green and purple car animations.
Build the purple car animation with time blocks and color layering, tune blue and red trains to oscillate between -20 and 20 in 3s and -5 to 5 in 12s.
Animate water levels in three cylindrical tanks of radius five meters, modeling volume in cubic meters as a function of time with piecewise functions and delays.
Create per-tank time arrays and apply piecewise equations with delays and sine-based shifts to drive the water tank animation. This enables a single line object per tank for easier animation.
Build a water tank animation in Python by creating three subplots and animated lines for tank one, two, and three, with colors, labels, a legend, and time and volume axes.
Animate a water tank by updating the plot function to move a red vertical line using a zero array and a for loop, and troubleshoot why it doesn't render.
Create a new subplot and line objects for tanks one to three, wired to the update function. Set axis limits to 38–50 s and 47–53 m³ to show zoomed view.
Learn to keep water levels in tanks stable against line width and dpi changes by using rectangle patches and dynamic height control with set_height in matplotlib.
Model x and y motion as functions of time, set starting points and velocities, and combine them to animate a landing airplane in the xy plane.
Learn to create a 2d animation in python by building arrows and animating an airplane with a dashed trajectory in a 2x2 subplot, with 0–10 s at 0.02 s steps.
Explore parametric equations by visualizing X and Y as functions of time across subplots, building a two-dimensional position vector and animating motion on the x–y plane.
Create a 2D plane animation by assembling four line objects for the body, wings, and tails, then animate a dashed trajectory driven by time and coordinates.
Create moving vector arrows in Python by defining arrow start points and delta horizontal and delta vertical, and include head length and color to visualize dynamic trajectories.
Replace the y function with a sinusoid of amplitude 500 meters and offset 1000 meters, while keeping x as 1000 plus 200 times time, creating a 10-second cycle.
Explore a plane’s sinusoidal forward motion on the x–y plane, with 200 m/s x velocity and 500 m amplitude y oscillation at 0.1 Hz, implemented via code that switches functions.
Create circular motion using polar coordinates with radius and alpha, then convert to Cartesian x and y for Python animation, including center shifts and cosine sine relationships.
Learn to design 3d rotational spirals by starting in cylindrical coordinates and moving to Cartesian coordinates, using radius, alpha, and time to drive x, y, and z.
Build a 3d animation by updating the XY and Z data of the plane trajectory, animating a spiral with cosine and sine motion, and experimenting with radius, frequency, and offsets.
Build the python animation for a two-joint robot by defining time and position arrays, joint angles, and the equations for delta x and delta y.
Build the animation code for a two-joint robot by defining a 3x3 subplot grid, a fixed baseline, and animated joint lines with a trajectory and centered axes labeled in meters.
Develop animation code for a two-joint robot by building and labeling subplots, plotting alpha as a function of time, and customizing x/y ticks to display pi multiples.
Build the final subplot for alpha two as a function of time and explain adjusting left, bottom, right, top, wspace, and hspace to minimize free space in the animation.
Design and implement the animation for a two-joint robot, updating x1, y1 and x2, y2 coordinates, attaching joint two to joint one, and plotting the evolving trajectory at one hertz.
Develops a time-based animation of a two-joint robot, plotting R1 and alpha1 as functions of time, and demonstrates joint rotations at 1 Hz with respect to the inertial ground.
Build the animation code for a 3-joint robot by calculating joint positions with R values, frequencies, and angles, updating x and y coordinates over time.
Tune the x and y scales using a reference circle to ensure horizontal and vertical dimensions match in the animation, avoiding ellipse distortions.
Explore how a magnetic train on tilted rails demonstrates control systems, using tangential gravity and a controlled force to catch a cube by driving the error toward zero over time.
Explore how control theory regulates the train's output to match the reference by using a plant and a controller in a 50 Hz feedback loop.
Explore how a controller uses a control input to drive motion along rails by calculating net force, acceleration, velocity, and position using the trapezoidal rule.
Explain how a python pid-controlled train simulation catches cubes on an inclined rail, detailing imports, inputs, a set X Ralfe function, and preallocated arrays for time, position, velocity, and errors.
Explain how nested loops orchestrate trials and time steps, perform zero-based indexing, compute PID components, and use trapezoidal integration to derive x and y positions along rails.
Show how to simulate a train catching a cube by evaluating horizontal and vertical conditions, using center-point calculations, trial-and-error thresholds, and a PID controller to synchronize motion.
Explore building a Python animation that simulates a train on rails, plotting displacement, velocity, acceleration, horizontal error, and its integral and derivative over time across three trials.
How would you like to have an idea for a scientific animation and be able to actually create it and show it to other people? How would you like being able to code a program that gives you that technical animation? How would you like to present technical data as a movie? In order to achieve that, it is important to know a programming language that can create technical animations and it is essential to know certain Mathematical concepts for that.
Python has a great library called Matplotlib and it gives us an amazing opportunity to create scientific animations easily and in a very neat way. If you know how to use it and you know some math, then you have the ability to create very impressive animations and visualize data in a very creative way. Imagine how great it would be to present your scientific data to your coworkers or partners in the form of a movie. They say, that a picture is worth 1000 words. Well, perhaps an animation is worth 1000 pictures. I guess that is why videos are the primary tool to convince people of something.
In this course you will not only learn how to use the infrastructure of Python animations in Matplotlib, you will also master the mathematics that you need for creating technical animations. We will animate airplanes, 3 joint robots, water tanks, autonomous vehicles, trains on rails, a UAV drone, free falling objects on different planets, etc. While doing that, we will learn Mathematical concepts such as Functions, Derivatives, Vectors, Physics for free falling objects, Trigonometry, Time delays, Circular motion in 2 and 3D dimensions and even a short Intro to a fascinating field of Control Systems.
If you want to learn all these interesting and exciting concepts and know how to apply them to create impressive technical animations, then ENROLL in this course and let's get started. I'm looking forward to seeing you there!
Best Regards,
Mark Misin