Giter Site home page Giter Site logo

oscillation-sandbox's Introduction

oscillation sandbox

🔗 » VIEW ONLINE

explore oscillations in p5.js and beyond!
expanding on visualizations by: Jérôme Mercier
cc teddavis.org 2021 / gitHub repo


usage

x is analogous to frameCount (grows +1).
algos applied to y in each sketch,
are normalized (0, 1), ie. .5 is height/2.
hover sketch to loop. click to reset.
select algos to edit / copy + paste

applying

shape
// shape example for p5.js
let w = width, h = height;
let xpos = frameCount % w;
let x = xpos*.2
let y = sin(x*.1)*.4
let xshape = w/2 + cos(x*.1)*w/2;
ellipse(xshape, h/2 + y*h, 50);
wave
// wave example for p5.js
let w = width, h = height;
let xpos = frameCount % w;
let x = xpos*.2; // adjust speed
let y = _insert_algo_;
ellipse(xpos, h/2 + y*h, 50);

math

p5.js math reference:
abs() ceil() constrain() dist() exp() floor() lerp() log() mag() map() max() min() norm() pow() round() sq() sqrt() fract() noise() random() acos() asin() atan() atan2() cos() sin() tan() degrees() radians()

contribute

add new algos directly from oscillation-sandbox / issue.

oscillation-sandbox's People

Contributors

ffd8 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.