//_______BEDIENUNGSANLEITUNG_______ // SHORTCUTS // // UP = RADIUS +10 // DOWN = RADIUS -10 // LEFT = WENIGER KREISE // RIGHT = MEHR KREISE // M = D†NNERE LINIEN // , = DICKERE LINIEN // . = KLEINERE VARIANZ // - = GR…SSERE VARIANZ // C = FARBIG / SCHWARZ WEISS // F = FILL / NO FILL // S = SICHERT BILD ALS PDF IM PROJEKTORDNER // Aktiviert PDF-Export import processing.pdf.*; //Definiert benštigte Variablen int grossx=400; int grossy=400; float mx=0; float my=0; float delay; float u = 0.0; float v = 0.0; float p = 0.0; int end = 760; int big = (grossx+grossy)/4; int vari = (grossx+grossy)/8; int stro = (grossx+grossy)/400; color c1 = color(255); boolean col1 = true; boolean col2 = true; boolean history1 = false; boolean history2 = false; boolean fill1 = false; boolean fill2 = false; //Bedienung via Tasteneingaben void keyPressed() { if (keyCode== RIGHT){ end=end +100; } if (keyCode== LEFT){ end=end -100; } if (keyCode== UP){ big=big +((grossx+grossy)/160); } if (keyCode== DOWN){ big=big -((grossx+grossy)/160); } if (keyCode== 47){ vari=vari +5; println("VARIANZ = " + vari); } if (keyCode== 46){ if(vari>=5){ vari=vari -5; } println("VARIANZ = " + vari); } if (keyCode== 77){ if (stro>1){ stro=stro -1; } println("STROKEWIGHT = " + stro); } if (keyCode== 44){ stro=stro +1; println("STROKEWIGHT = " + stro); } if (keyCode== 83){ beginRecord(PDF,"kreise.pdf"); size(grossx, grossy); smooth(); strokeWeight(stro); stroke(c1); println ("SAVED AS PDF"); } if (keyCode== 67){ if (col1 == false){ col2 = true; println(c1); println("COLOR MODE ON"); } if (col1 == true){ col2 = false; color c1 = color(255); println("COLOR MODE OFF"); } col1 = col2; } if (keyCode== 72){ if (history1 == false){ history2 = true; println("HISTORYMODE ON"); } if (history1 == true){ history2 = false; println("HISTORYMODE OFF"); } history1 = history2; } if (keyCode== 70){ if (fill1 == false){ fill2 = true; println("FILL ON"); } if (fill1 == true){ fill2 = false; println("FILL OFF"); } fill1 = fill2; } } void setup() { // Schreibt das ganze Zeugs auch noch in die Konsole println(" ***BEDIENUNGSANLEITUNG***"); println(""); println(" SHORTCUTS"); println(""); println(" UP = RADIUS +10"); println(" DOWN = RADIUS -10"); println(" LEFT = WENIGER KREISE"); println(" RIGHT = MEHR KREISE"); println(" M = D†NNERE LINIEN"); println(" , = DICKERE LINIEN"); println(" . = KLEINERE VARIANZ"); println(" - = GR…SSERE VARIANZ"); println(" C = FARBIG / SCHWARZ WEISS"); println(" S = SICHERT BILD ALS PDF IM PROJEKTORDNER"); size(grossx, grossy); background(0); smooth(); strokeWeight(stro); frameRate(20); } void draw (){ if(history1 == false){ background(0); } //Schleife die die verschiedenen Kreise zeichnet for(int k=0; k u){ u = u+mx; } if(mouseX < u){ u = u-mx; } if(mouseY > v){ v = v+my; } if(mouseY < v){ v = v-my; } // €ndert Farbe der Linie, Fill, Liniendicke color c1 = color(random(0,255),random(0,255),random(0,255)); if (col1 == true){ stroke(color (c1)); } if (col1 == false){ stroke(255); fill(255); } if( fill1== true) { if(col1==true){ fill(c1); } if(col1==false){ fill(255); } } if( fill1== false) { noFill(); } strokeWeight(stro); // ZEICHNET DEN KREIS arc(u, v,p,p,0,TWO_PI); // SORGT F†R UNSICHTBARE KANTEN UND ZEICHNET NOTWENDIGE TEILKREISE arc(u-grossx, v, p,p,0,TWO_PI); arc(u-2*grossx, v, p,p,0,TWO_PI); arc(u+grossx, v, p,p,0,TWO_PI); arc(u+2*grossx, v, p,p,0,TWO_PI); arc(u, v-grossy, p,p,0,TWO_PI); arc(u, v-2*grossy, p,p,0,TWO_PI); arc(u, v+grossy, p,p,0,TWO_PI); arc(u, v+2*grossy, p,p,0,TWO_PI); arc(u+grossx, v+grossy, p,p,0,TWO_PI); arc(u-grossx, v-grossy, p,p,0,TWO_PI); arc(u+grossx, v-grossy, p,p,0,TWO_PI); arc(u-grossx, v+grossy, p,p,0,TWO_PI); arc(u+2*grossx, v+2*grossy, p,p,0,TWO_PI); arc(u-2*grossx, v-2*grossy, p,p,0,TWO_PI); arc(u+2*grossx, v-2*grossy, p,p,0,TWO_PI); arc(u-2*grossx, v+2*grossy, p,p,0,TWO_PI); } endRecord(); }