Git Product home page Git Product logo

processing-flow-field's Introduction

Processing Flow Field

I followed Dan Shiffman's awesome Perlin Noise video series and followed along with this challenge in p5.js. Finding my browser crippled by the drawing complexity, I decided to re-write the sketch in Java for Processing.

Download Processing and open this directory to play around with the Sketch!

processing-flow-field's People

Contributors

daneden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

processing-flow-field's Issues

Error with size() when running

I had an error when running this initially with the size() cannot be used here, see https://processing.org/reference/size_.html โ€”

I figured out in some cases size() must be called in settings() example below:

void settings() { size(1000, 760, P2D); }

ArrayOutOfBounds solution

Great code!
I actually did the exact same thing, also after watching Shiffman's tutorial on youtube.
I encountered the exact same problem as you with the "ArrayOutOfBounds"- yaddi yadda.
Funny thing is I actually came up with the same solution as you but later came up with an alternative one;
in the "edges()" function in the Particle class, you make sure that the particles never reach the edges of the screen. like this:
instead of:
if (x > width) { x = 0; }
you write this:
if (x > width - 1 ) { x = 1; }

Although Im still curious as to why Shiffman didn't expericen the same problem as we did. Have you found out anything about it? I figure it has something to do with some difference between Processing and p5js, but I have no clue...

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.