Skip to content

Instantly share code, notes, and snippets.

@componieri
Created April 23, 2014 13:03
Show Gist options
  • Select an option

  • Save componieri/11214441 to your computer and use it in GitHub Desktop.

Select an option

Save componieri/11214441 to your computer and use it in GitHub Desktop.
int steps = 7;
PVector [] pointset = new PVector [3];
void setup (){
size(700, 500);
smooth();
background(0, 0, 0);
int points = 1;
stroke(255);
strokeWeight(7);
int oldx = 0;
int oldy = 0;
int _x = 0;
int _y = 0;
pointset[0] = new PVector(0,height/2);
pointset[1] = new PVector(width/5, 0+height/3);
pointset[2] = new PVector(width/5,(2*height/3));
for(int i = 0; i < pointset.length;i++){
point(pointset[i].x,pointset[i].y);
}
line(pointset[0].x,pointset[0].y,pointset[1].x,pointset[1].y);
line(pointset[0].x,pointset[0].y,pointset[2].x,pointset[2].y);
// for(int x = 0; x <= steps; x++) {
// for(int y = 1; y <= points; y++) {
// int posx = x + x * (width / steps);
// int posy = (height / points) * y - ((height / points) / 2);
//
// line(posx,posy,oldx,oldy);
//
// point(posx, posy );
//
// oldx = posx;
// oldy = posy;
//
//
// // linie 1: punkt bei 200
// // linie 2: 2 punkte bei 100 und 300
// // linie 3: 4 punkte bei 50 / 150 / 250 / 350
// // linie 4: 8 punkte bei 25 / 75 / 225 ...
// // punkt davor ´-subtrahiert die hälfte (punkt 1) und addiert die hälfte (punkt 2)
// }
//
// points = points * 2;
//
// // line(x + x * (width / steps), 0, x + x * (width / steps), height);
// }
}
void draw() {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment