{"id":326,"date":"2012-11-06T06:43:32","date_gmt":"2012-11-06T06:43:32","guid":{"rendered":"http:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/?p=326"},"modified":"2012-11-06T06:44:29","modified_gmt":"2012-11-06T06:44:29","slug":"first-processing-picture","status":"publish","type":"post","link":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/2012\/11\/06\/first-processing-picture\/","title":{"rendered":"First Processing Picture"},"content":{"rendered":"<p>This was my first image in Processing. BeginShape and vertex were used to make and fill unusual shapes such as the pheonix&#8217;s body. For loops were used to create the shape of the wizard&#8217;s staff, the alternating squares on the shield, and the magic orb.The orb was created by making a set of ellipses decreasing in size and red value. No stroke was included so it would look like a spherical gradient. I chose this image due to my interest in the fantasy, mythology, and the middle ages. I also liked how the center of the shield looked almost like it could be a glass ornament.<\/p>\n<p><script type=\"application\/processing\">\r\n\/\/Info: http:\/\/processingjs.org\/reference\r\nsize(500,500);\r\nbackground(40,0,0);\r\n\r\n\/\/wizard's staff\r\nfill(159,59,9);\r\nbeginShape();\r\nvertex(400,160);\r\nint currentX = 420;\r\nint currentY = 160;\r\nvertex(currentX,currentY);\r\nint stage = 0;\r\nfor(int k = 0; k < 11; k = k + 1) {\r\n  if(stage == 0){\r\n    stage = 1;\r\n    currentY = currentY + 30;\r\n  }\r\n  else{\r\n    stage = 0;\r\n    currentY = currentY + 30;\r\n    currentX = currentX - 30;\r\n  }\r\n  vertex(currentX,currentY);\r\n}\r\n\r\ncurrentX = currentX - 20;\r\nvertex(currentX,currentY);\r\nstage = 0;\r\nfor(int k = 0; k < 11; k = k + 1) {\r\n  if(stage == 0){\r\n    stage = 1;\r\n    currentY = currentY - 30;\r\n  }\r\n  else{\r\n    stage = 0;\r\n    currentY = currentY - 30;\r\n    currentX = currentX + 30;\r\n  }\r\n  vertex(currentX,currentY);\r\n}\r\nendShape(CLOSE);\r\n\r\n\/\/staff's glowing orb\r\nfill(255,255,0,225);\r\n\/\/ellipse(410,100,60,60);\r\nint radius = 100;\r\nnoStroke();\r\nfloat i = 0;\r\nfor (int r = radius; r > 0; r = r - 10) {\r\n  fill(255, i, 0);\r\n  ellipse(410, 100, r, r);\r\n  i = i + 30;\r\n}\r\n\r\nstroke(4);\r\n\r\n\/\/The sword that is behind the sheild\r\nfill(160);\r\nbeginShape();\r\nvertex(400,400);\r\nvertex(400,420);\r\nvertex(340,420);\r\nvertex(340,450);\r\nvertex(310,450);\r\nvertex(310,370);\r\nvertex(340,370);\r\nvertex(340,400);\r\nendShape();\r\nfill(200);\r\nellipse(420,410,60,60);\r\nfill(0,0,255);\r\nellipse(420,410,30,30);\r\nfill(0,0,255);\r\nellipse(325,410,25,25);\r\nfill(50);\r\nbeginShape();\r\nvertex(310,390);\r\nvertex(40,390);\r\nvertex(0,410);\r\nvertex(40,430);\r\nvertex(310,430);\r\nendShape();\r\nline(0,410,310,410);\r\n\r\n\r\n\/\/design on backround of inside of shield\r\nfill(100,100);\r\nbeginShape();\r\nvertex(10,130);\r\nvertex(150,50);\r\nvertex(300,130);\r\nvertex(10,350);\r\nvertex(290,350);\r\nvertex(300,350);\r\nvertex(150,410);\r\nendShape(CLOSE);\r\nfill(200,50);\r\nbeginShape();\r\nvertex(10,130);\r\nvertex(300,350);\r\nvertex(300,130);\r\nendShape(CLOSE);\r\nfill(10,100);\r\nbeginShape();\r\nvertex(150,50);\r\nvertex(150,410);\r\nvertex(300,240);\r\nendShape(CLOSE);\r\nfill(240,100);\r\nbeginShape();\r\nvertex(150,50);\r\nvertex(10,240);\r\nvertex(150,410);\r\nendShape(CLOSE);\r\n\r\nfill(255,255,255);\r\n\/\/top of the sheild\r\nbeginShape();\r\nvertex(10,130);\r\nvertex(150,50);\r\nvertex(300,130);\r\nvertex(290,130);\r\nvertex(150,60);\r\nvertex(20,130);\r\nendShape(CLOSE);\r\n\r\n\/\/2 sides of the sheild, checkered blue and white\r\nint y = 1;\r\nfor(i = 130; i<350;i = i + 10){\r\n  if(y==1){\r\n    y = 0;\r\n    fill(0,0,255);\r\n  }\r\n  else{\r\n    y=1;\r\n    fill(255,255,255);\r\n  }\r\n  rect(10,i,10,10);\r\n}\r\n\r\nfor(i = 130; i<350;i = i + 10){\r\n  if(y==1){\r\n    y = 0;\r\n    fill(0,0,255);\r\n  }\r\n  else{\r\n    y=1;\r\n    fill(255,255,255);\r\n  }\r\n  rect(290,i,10,10);\r\n}\r\n\r\n\/\/bottom of the sheild, continuing in white\r\nbeginShape();\r\nvertex(10,350);\r\nvertex(150,410);\r\nvertex(300,350);\r\nvertex(290,350);\r\nvertex(150,400);\r\nvertex(20,350);\r\nendShape(CLOSE);\r\n\r\n\/\/pheonix emblem in shield\r\n\r\n\/\/the pheonix's right wing\r\nfill(255,0,0,100);\r\nbeginShape();\r\nvertex(40,190);\r\nvertex(30,180);\r\nvertex(30,150);\r\nvertex(50,130);\r\nvertex(140,220);\r\nvertex(150,240);\r\nvertex(50,140);\r\nvertex(40,170);\r\nendShape();\r\nfill(255,127,0,100);\r\nbeginShape();\r\nvertex(40,190);\r\nvertex(50,180);\r\nvertex(50,240);\r\nvertex(70,260);\r\nvertex(90,240);\r\nvertex(90,290);\r\nvertex(110,310);\r\nvertex(130,290);\r\nvertex(120,270);\r\nvertex(150,240);\r\nvertex(50,140);\r\nvertex(40,170);\r\nendShape();\r\nline(50,180,70,170);\r\nline(90,240,110,230);\r\n\r\n\/\/body and head\r\nfill(255,0,0,100);\r\nbeginShape();\r\nvertex(140,220);\r\nvertex(140,200);\r\nvertex(130,200);\r\nvertex(110,190);\r\nvertex(130,170);\r\nvertex(150,170);\r\nvertex(170,190);\r\nvertex(170,220);\r\nvertex(170,240);\r\nvertex(190,270);\r\nvertex(180,290);\r\nvertex(130,290);\r\nvertex(120,270);\r\nvertex(150,240);\r\nendShape();\r\n\r\n\/\/eye and beak\r\nfill(0,0,255,200);\r\nellipse(135,185,7,7);\r\nfill(255,255,0,100);\r\nbeginShape();\r\nvertex(130,200);\r\nvertex(110,190);\r\nvertex(130,170);\r\nendShape();\r\n\r\n\/\/circle design sititng on the pheonix's head\r\nfill(255,50,0,40);\r\nellipse(140,140,60,60);\r\nfill(100,255,0,40);\r\nellipse(140,140,40,40);\r\nfill(255,255,255,40);\r\nellipse(140,140,20,20);\r\nfill(0,0,255,50);\r\nellipse(140,100,20,20);\r\nfill(255,255,255,50);\r\nellipse(140,100,10,10);\r\n\r\n\/\/the pheonix's left wing\r\nfill(255,0,0,100);\r\nbeginShape();\r\nvertex(270,160);\r\nvertex(260,140);\r\nvertex(170,240);\r\nvertex(170,220);\r\nvertex(260,130);\r\nvertex(280,140);\r\nvertex(280,170);\r\nvertex(270,180);\r\nendShape();\r\nfill(255,127,0,100);\r\nbeginShape();\r\nvertex(270,160);\r\nvertex(260,140);\r\nvertex(170,240);\r\nvertex(190,270);\r\nvertex(180,290);\r\nvertex(200,310);\r\nvertex(220,290);\r\nvertex(220,240);\r\nvertex(240,260);\r\nvertex(260,240);\r\nvertex(260,170);\r\nvertex(270,180);\r\nendShape();\r\nline(220,240,200,230);\r\nline(260,170,250,170);\r\n\r\n\/\/tail\r\nfill(255,0,0,100);\r\nbeginShape();\r\nvertex(130,290);\r\nvertex(110,350);\r\nvertex(130,370);\r\nvertex(150,350);\r\nvertex(170,380);\r\nvertex(190,350);\r\nvertex(210,370);\r\nvertex(220,350);\r\nvertex(180,290);\r\nendShape();\r\n\r\n\/\/feet\r\nfill(255,255,0,100);\r\nbeginShape();\r\nvertex(130,290);\r\nvertex(130,310);\r\nvertex(120,310);\r\nvertex(120,330);\r\nvertex(130,330);\r\nvertex(130,320);\r\nvertex(140,320);\r\nvertex(140,330);\r\nvertex(150,330);\r\nvertex(150,310);\r\nvertex(140,310);\r\nvertex(140,290);\r\nendShape();\r\nbeginShape();\r\nvertex(170,290);\r\nvertex(170,310);\r\nvertex(160,310);\r\nvertex(160,330);\r\nvertex(170,330);\r\nvertex(170,320);\r\nvertex(180,320);\r\nvertex(180,330);\r\nvertex(190,330);\r\nvertex(190,310);\r\nvertex(180,310);\r\nvertex(180,290);\r\nendShape();\r\n\r\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This was my first image in Processing. BeginShape and vertex were used to make and fill unusual shapes such as the pheonix&#8217;s body. For loops were used to create the shape of the wizard&#8217;s staff, the alternating squares on the &hellip; <a href=\"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/2012\/11\/06\/first-processing-picture\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/326"}],"collection":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/comments?post=326"}],"version-history":[{"count":3,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/326\/revisions"}],"predecessor-version":[{"id":328,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/326\/revisions\/328"}],"wp:attachment":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/media?parent=326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/categories?post=326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/tags?post=326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}