SankalpBhatnagar-13-9-65
Hello, this is Part 2 of my Project 1 (Guantlet) where I was to reproduce the 1965 Plotter work, 13/9/65 Nr.2, by Frieder Nake in my own preferred programming enviornment. I chose Processing. Striving for an accurate reproduction definitely took me quite a while. Enjoy!
You can take a look at my code below:
void setup() { size(899,935); background(255,255,255); background(255,255,255); smooth(); noFill(); strokeWeight(2); } void draw() { smooth(); background(255,255,255); drawInitialSquare(); drawCircles(); //ALL Horizontal Lines drawHorizontalLine(20,60,184,43,557,38,620,45,822,24,880,21,880,21,880,21); //first line drawHorizontalLine(20,184,191,186,341,200,421,196,585,207,687,178,881,174, 881,174); //second line drawHorizontalLine(21,274,184,255,345,266,423,253,584,249,632,262,880,261,880,261); //third line drawHorizontalLine(20,349,244,345,436,339,586,323,627,336,690,330,830,340,882,348); //fourth line drawHorizontalLine(20,394,186,394,345,379,586,385,629,374,696,378,836,363,881,353); //fifth line drawHorizontalLine(20,517,186,516,344,498,426,481,584,478,633,460,689,448,882,450); //sixth line drawHorizontalLine(21,575,335,569,426,571,584,564,633,557,688,560,828,545,881,555); //seventh line drawHorizontalLine(22,674,204,666,422,657,585,633,628,629,693,627,830,640,882,630); //eighth line drawHorizontalLine(23,761,184,753,344,739,426,733,586,742,693,730,823,737,882,734); //ninth line //ALL Diagonal Clusters drawDiagonalsBetween(10,448,16,568,16,448,40,568,39); //between top and first left to right drawDiagonalsBetween(20,20,60,184,43,20,184,191,186); //between first and second left to right drawDiagonalsBetween(10,437,40,579,39,447,197,526,203); drawDiagonalsBetween(10, 587, 43, 629, 45, 587, 207, 622, 196); drawDiagonalsBetween(20,691,40,880,21,691,178,881,174); drawDiagonalsBetween(17,587,207,627,197,587,251,627,261); //between second and third left to right drawDiagonalsBetween(20,699,178,881,174,699,262,881,261); drawDiagonalsBetween(30,20,275,181,257,20,348,175,345); //between the third and fourth left to right drawDiagonalsBetween(15, 343,267,420,255,343,342,425,339); drawDiagonalsBetween(15,468,254,583,249,477,335,576,323); drawDiagonalsBetween(30,629,262,688,262,629,336,688,330); drawDiagonalsBetween(10,693,263,810,261,715,332,794,338); drawDiagonalsBetween(20,20,350,170,348,20,394,182,394); //between the fourth and fifth left to right drawDiagonalsBetween(20,343,343,420,341,342,378,427,381); drawDiagonalsBetween(10,346,380,392,381,349,495,426,479);//between the fifth and sixth left to right drawDiagonalsBetween(10,630,375,688,379,630,459,688,449); drawDiagonalsBetween(20,697,380,827,365,693,448,820,448); drawDiagonalsBetween(10,195,515,339,500,201,572,338,568);//between the sixth and seventh left to right drawDiagonalsBetween(10,349,497,423,482,360,569,421,569); drawDiagonalsBetween(20,587,478,629,463,590,563,629,558); drawDiagonalsBetween(15,21,575,174,573,21,674,130,669);//between the seventh and eigth left to right drawDiagonalsBetween(15,337,569,426,572,338,660,427,656); drawDiagonalsBetween(20,631,558,693,562,630,628,693,627); drawDiagonalsBetween(10,235,665,337,661,195,753,329,741);//between the eigth and ninth left to right drawDiagonalsBetween(10,453,654,576,634,436,733,582,742); drawDiagonalsBetween(20,719,733,826,739,701,878,828,876); //between the ninth and bottom //ALL Vertical Clusters drawVerticalsBetween(10,655,42,684,40, 655,262,684,262); //between first and third lines left to right drawVerticalsBetween(15,341,200,421,196,341,266,421,253); //between second and third lines left to right drawVerticalsBetween(20,20,184,164,186,20,274,164,258); drawVerticalsBetween(15,530,204,555,206,530,250,555,249); drawVerticalsBetween(10,594,326,623,335,494,410,623,374); //between fourth and fifth left to right drawVerticalsBetween(20,709,332,828,341,709,376,828,365); drawVerticalsBetween(30,444,339,532,329,444,479,532,479); //between fourth and sixth left to right drawVerticalsBetween(10,186,395,229,391,186,514,229,510); //between fifth and sixth left to right drawVerticalsBetween(20,256,388,334,381,258,506,334,499); drawVerticalsBetween(30,834,365,882,353,834,546,882,556);//between fifth and seventh left to right drawVerticalsBetween(20,201,573,305,571,201,665,305,661); //between seventh and eigth left to right drawVerticalsBetween(30,336,570,425,571,336,660,425,657); drawVerticalsBetween(30,438,572,579,566,438,654,579,633); drawVerticalsBetween(15,341,660,427,656,341,738,427,732); //between eigth and ninth left to right drawVerticalsBetween(30,704,628,811,639,704,730,811,736); drawVerticalsBetween(20,831,640, 882,631,831,735,882,733); drawVerticalsBetween(10,586,633,628,630,586,877,633,877); //between eighth and bottom left to right noLoop(); println("Finished."); exit(); } //initial square void drawInitialSquare() { line(20,20,880,13); line(20,20,23,882); line(23,882,883,876); line(883,876,880,13); } void drawHorizontalLine(int a, int A, int b, int B, int c, int C, int d, int D, int e, int E, int f, int F, int g, int G, int h, int H) { line(a,A,b,B); line(b,B,c,C); line(c,C,d,D); line(d,D,e,E); line(e,E,f,F); line(f,F,g,G); line(g,G,h,H); } void drawVerticalsBetween(float n,float a, float A, float b, float B, float c, float C, float d, float D) { for(float i=a; i<b ; i=i+random(1,n)) { float temp1= findY(i,a,A,b,B); float temp2= findY(i,c,C,d,D); line(i,temp1,i,temp2); } } void drawDiagonalsBetween(float n, float a, float A, float b, float B, float c, float C, float d, float D) { for (int i = 0; i < n; i++) { float x1 = random(a,b); float x2 = random(c,d); float y1 = findY(x1,a,A,b,B); float y2 = findY(x2,c,C,d,D); line(x1,y1,x2,y2); } } float findY(float X, float xi, float yi, float xf, float yf) { float s= (yf-yi)/(xf-xi); float Y= s*(X-xi)+yi; return(Y); } void drawCircles() { ellipse(69,59.5,39,39); ellipse(839,81,66,66); ellipse(232,237,83,83); ellipse(269,422,44,44); ellipse(376,435,128,128); ellipse(26,477,6,6); ellipse(236,663,131,131); ellipse(328,734,42,42); } |
Comments Off on SankalpBhatnagar-13-9-65