Skip to content

mtirado1/prosvg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProSVG - Programmatic SVG with Python

Demo

This module works using Python's native xml module, with functions and classes to intuitively create SVG graphics

One of the goals of this module is to easily plot mathematical functions using svg <path> tags.

Script used to generate the image above

Animations

Programmatic SVG Basic Transformations Plotting Functions Parametric Equations 3D Animations 3D Equations

With a focus on geometry and mathematics, svg objects can be animated with this module.

View the complete animation

How it Works

Similar to 3blue1brown's manim, the animation module renders the svg file as an image and pipes it to ffmpeg.

  1. Increase animation time by dt
  2. Update svg objects (transformations, movement, etc.)
  3. If an animation has exceeded its runtime, it will be removed from the object
  4. Convert svg to png using CairoSVG
  5. Pipe png image to FFmpeg
  6. Repeat until the animation ends

Installation

  1. Clone and cd into the repository
  2. Run pip install .

About

Programmatic SVG images and animations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages