9. November 2010
Source code: import processing.pdf.*; void setup() { size(400,400,PDF,"ornament.pdf"); // def. fenstergroesse smooth(); // aktiviere antialiasing strokeWeight(15); // linienbreite } void draw() { background(255); // def. hintergrundfarbe for(int x = 0; x <= width; x+=50) { for(int y = 0; y <= height; y+=50) { pushMatrix(); translate(x,y); scale(.1); muster(); // funtions aufruf popMatrix(); } } exit(); } // funktion void muster() { smooth(); strokeWeight(12); noFill(); arc(0, 0, 70, 70, 0, PI/2); //viertelkreise in den Ecken arc(0, 0, 70, 70, PI/2, PI); arc(0, 0, 70, 70, PI, TWO_PI-PI/2); arc(0, 0, 70, 70, TWO_PI-PI/2, TWO_PI); ellipse(250,250,120,120); //mittelkreis triangle(50,150,100,100,150,150); //Dreiecke triangle(50,350,100,400,150,350); triangle(350,150,400,100,450,150); triangle(350,350,400,400,450,350); line(0,250,50,250); line(250,0,250,50); line(250,500,250,450); line(500,250,450,250); line(0,200,0,300); line(200,0,300,0); }