Skip to content

ClaireBookworm/generative-art-workshop

Repository files navigation

Horizon: Generative Art Workshop

Thanks for coming to the workshop! To start, go to this editor link: https://editor.p5js.org/. If you want to share your work and code, feel free to make an account, but that's not required at all! Some really cool existing exampels of generative art are L Trees and Chaos!

example image

Here are a few code snippets you can copy and paste or refer to when you play around with it yourself:

function setup() {
  createCanvas(400, 400);
  noLoop();
}
// sausage links code — for loops in for loops
function draw() {
  background('PEACHPUFF');
  var step = 30;
  for (var x=0; x<400; x=x+step) {
    for(var y=0;y<400;y=y+step) {
      strokeWeight (1+x/step); // changes the thickness of the lines
      line(x,y,x+(step/2),y+(step/2)); // draws lines diagonal downards towards the right
      strokeWeight(1+x/step/10);
      line(x+(step/2),y+(step/2),x+step,y+step);
    }
  }
}

If you really want to go above and beyond, here's a link to the editor code for a constantly changing triangle mesh! Code for this should also be in the GitHub along with some other sample code for various exampels I've given.

Here are two codepen links to filled-in versions of the checkerboard by other people! https://codepen.io/Shvembldr/pen/zbqpBp and https://codepen.io/Shvembldr/pen/pYypqd (the corresponding image is also in the slides).

Cheat Sheet from online: image

Here's a link to another one: https://bmoren.github.io/p5js-cheat-sheet/.

About

workshop guide / links / reference — for horizon @ nyc (w/ girl scouts of america & hack club)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published