Skip to content

Instantly share code, notes, and snippets.

@hpeikemo
Created February 27, 2013 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hpeikemo/5052363 to your computer and use it in GitHub Desktop.
Save hpeikemo/5052363 to your computer and use it in GitHub Desktop.
Connecting, a very simple processing experiment.
int l = 100;
PVector[] p = new PVector[l];
int s = 500;
size(s, s, P2D);
smooth();
background(0xffffff);
for(int i=0;i<l;i++) {
p[i] = new PVector( random(s*3)-s, random(s*3)-s );
}
for(int i=0;i<l;i++) {
for(int j=i+1;j<l;j++) {
if (random(1.0) > 0.50) {
stroke(126,126,126,10+random(30));
line(p[i].x,p[i].y,p[j].x,p[j].y);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment