markschnabel / parametric-equations

Cool animation created using parametric equations. Built using the Java version of Processing.

Home Page:https://www.openprocessing.org/sketch/578241

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parametric Equations

This repository contains programs written in Processing (a teaching language based upon Java for creating code art). The programs take advantage of parametric equations and trigonometric functions to create interesting spiral-like graphics.

What is a parametric equation?

Parametric equations are incredibly similar to the famous equation: y = mx + b also known as slope-intercept form or a linear equation. In the equation y = mx + b values of x are plugged in and values of y are returned.
A parametric equation is incredibly similar in the sense that variables are derived from plugging in the value of another variable.
In the case of parametric equations variables x and y are both determined by plugging in a variable t to some equation. Example: x = 2t, y = t^2

Implementation into the program

Since parametric equations produce x and y values, these values could correspond to points on a cartesian plane. The programming language Processing comes with many features that are centered around creating art with code. One of these features is Processing's "draw" function which is essentially a mainloop for the program. The program continuously iterates over the code contained within the draw function "drawing" whatever it is told to on the screen. In this particular program lines are drawn using the x and y values generated by parametric equations. The equations utilize sin() and cos() functions to produce x and y coordinates that formulate wave-like lines. The variable t is incremented each iteration of the loop so that the equations continuously produce new values to assign to x and y and change the position of the lines drawn.

View the code in action

Link: https://www.openprocessing.org/sketch/578241

The code has been uploaded to https://www.openprocessing.org/ a website which allows Processing developers to upload their Processing programs or sketches where they can then be run in the browser for easy sharing.

Aids for completing this project

This project was done with the help of this youtube video: https://www.youtube.com/watch?v=LaarVR1AOvs
Please also consider checking out and supporting the Processing foundation https://processing.org/ or OpenProcessing https://www.openprocessing.org/ as both provide valuable resources to aspiring developers for free.

Other resources for learning about parametric equations or the Processing language:

Processing language video series:
https://www.youtube.com/watch?v=2VLaIr5Ckbs&list=PLRqwX-V7Uu6ZYJC7L-r6rX6utt6wwJCyi
Parametric equations resources:
https://www.youtube.com/watch?v=m6c6dlmUT1c
https://www.youtube.com/watch?v=HmRkwCPcZuI&t=228s
https://www.youtube.com/watch?v=9kKZHQtYP7g&t=29s

About

Cool animation created using parametric equations. Built using the Java version of Processing.

https://www.openprocessing.org/sketch/578241

License:MIT License


Languages

Language:Processing 100.0%