Code Monkey home page Code Monkey logo

prosvg's Introduction

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 .

prosvg's People

Contributors

mtirado1 avatar

Stargazers

BS avatar Kyle Hovey avatar Erica Jaclyn avatar Noah Rahm avatar

Watchers

 avatar

prosvg's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.