58
edits
| No edit summary | |||
| Line 131: | Line 131: | ||
| you can find the code [http://pastebin.com/etYe2LxU here] | you can find the code [http://pastebin.com/etYe2LxU here] | ||
| =Gideon Bielewski= | |||
| <gallery> | |||
| File:patternBild1Bielewski.png| one status | |||
| File:patternBild2Bielewski.png| another status | |||
| </gallery> | |||
| <source lang="c"> | |||
| //sets the rotationspeed of the pattern | |||
| float rotationVal = 0.5; | |||
| //these numbers change the complexity of the pattern | |||
| float parts = 2; //take a number between 1-10 | |||
| float parts2 = 2; //take a number between 1-10 | |||
| //these numbers change the complexity of the form | |||
| float manipulation = 100; //take a number between 1-200 | |||
| float manipulation2 = 200; //take a number between 1-200 | |||
| //changes the impact of a mouseClick | |||
| int mouseVal = 60; | |||
| //mouseVal > value | |||
| //sets the starting transformation value | |||
| int value = 30; | |||
| void setup(){ | |||
|  size(1000, 500,P3D);  | |||
|  //frameRate = 24;  | |||
| } | |||
| void draw(){  | |||
|  translate(width*0.5, height*0.5, mouseX); | |||
|  background(255); | |||
|  for(int i = 0; i < 10 ; i++){ | |||
|  rotate(rotationVal* -mouseX/20); | |||
|  translate(0, 10); | |||
|  pattern(); | |||
|  rotate(rotationVal* -mouseY/20); | |||
|  translate(0, 10, mouseY/20); | |||
|  pattern(); | |||
|  } | |||
| } | |||
| void mouseClicked() { | |||
|   if (value == mouseVal) { | |||
|     value = 0; | |||
|   } else { | |||
|     value = mouseVal; | |||
| } | |||
| } | |||
| void pattern(){ | |||
|   for(int i = 0; i < parts2 ; i++){ | |||
|     pattern1(); | |||
|     translate(value,mouseX); | |||
|   } | |||
| } | |||
| void pattern1(){ | |||
|  for(int i = 0; i < parts ; i++){ | |||
|     rotate(manipulation); | |||
|     rotate(manipulation2); | |||
|     line (0,10*i, 100, 0); | |||
|     line (0,10*i, 100, 100); | |||
|     pushMatrix(); | |||
|     rotate(rotationVal/8); | |||
|     popMatrix(); | |||
|   }  | |||
| }  | |||
| </source> | |||
| ==Group B== | ==Group B== | ||
edits