Giter VIP home page Giter VIP logo

lissajous's Introduction

Lissajous curve

Generating lissajous curves in Processing

What?

Lissajous curves are a particular set of graphs generated by the parametric formula x = A cos(ax), y = B sin(bx). This already looks boring. Look, I am as bored as you. I mean who even likes math?? (I do, but that's not a story for today). Formulas are lame, but sometimes they are special and generate really interesting outcomes, if you know how to produce them. Luckily, this is one of those instances.

How to run the code

Clone the repository on your pc and open it with Processing. It's as easy as that.

Settings

All the variables inside the file named settings.pde can be changed by the final user (you). Feel free to edit them and to experiment a little bit with the final product. Next to each variable there's a comment describing what it does.

Commands

I programmed the code with a few shortcuts:

  1. Press left and right arrow keys to change the animation duration
  2. Press up and down arrow keys to change the initial angle
  3. Press E to record the animation - the output frames will be saved in folder called frames
  4. Press Q to toggle between black and white and colors
  5. Press W to display the current frames per second on the screen
  6. Press R to change the rotation direction (clockwise or anti-clockwise)
  7. Click on the window to reset the animation

Output

This is what you will see when you run the code:

Video

These are some converted GIFs (they look pretty choppy!). Inside the folder /output/videos/ you will find some higher quality videos (all recorded in as-smooth-as-butter 120 fps).

black and white video
colored final midway

Screenshots

Final images black and white final
colored final

Midway screenshots black and white midway
colored final midway

Licensing

This project is distributed under Attribution 4.0 International (CC BY 4.0) license.

lissajous's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

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.