{"id":2112,"date":"2011-01-02T01:28:04","date_gmt":"2011-01-01T16:28:04","guid":{"rendered":"http:\/\/www.cobaltbombalphaomega.com\/?p=573"},"modified":"2011-01-02T01:28:04","modified_gmt":"2011-01-01T16:28:04","slug":"processing%e3%81%a7%e3%81%8a%e7%b5%b5%e3%81%8b%e3%81%8d13%ef%bc%88%ce%b1%ef%bc%89","status":"publish","type":"post","link":"https:\/\/inage.ksd6700.net\/?p=2112","title":{"rendered":"Processing\u3067\u304a\u7d75\u304b\u304d13\uff08\u03b1\uff09"},"content":{"rendered":"<p><script type=\"application\/processing\">\nvoid setup() \n{\n  size(540, 334);\n  background(255,255,255);\n  noStroke();\n  smooth();\n  fill(208, 19, 69);\n  drawCircle(width\/2, height\/2, 80, 6);\n}<\/p>\n<p>float value  = 8.;<\/p>\n<p>void drawCircle(float x, float y, int radius, int level) \n{                    \n  float tt = 126 * level\/value  ;\n  drawCobaltLogo(x, y, radius*2, radius*2);      \n  if(level > 1) {\n    level = level - 1;\n    int num = int(random(2, value  ));\n    for(int i=0; i<num; i++) {\n      float a = random(0, TWO_PI);\n      float nx = x + cos(a) *value   * level;\n      float ny = y + sin(a) * value   * level;\n      drawCobaltLogo(nx, ny, radius\/3, level);\n    }\n  }\n}\n\nvoid drawCobaltLogo(int x,int y,int w,int h)\n{\n  int r = w;\n\n  for(int i = 0 ; i < 3 ; i++)\n  {\n    float theta = map(i,0,3,0,TWO_PI);\n    float delta = theta + (TWO_PI \/ (2 * 3));\n    fill(208, 19, 69);\n    arc(x,y,r,r,theta,delta);\n  }\n\n  fill(255);\n  stroke(255);\n  strokeWeight(5);\n  ellipse(x,y,r\/5,r\/5);\n}\n<\/script><br \/>\n\u3042\u3051\u307e\u3057\u3066\u304a\u3081\u3067\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002<\/p>\n<p>\u300c\u4eca\u5e74\u306f\u3001\u4eca\u307e\u3067\u306e\u30b3\u30d0\u30eb\u30c8\u3092\u66f4\u65b0\u3059\u308b\u300d\u610f\u5473\u3092\u8fbc\u3081\u3066\u307f\u307e\u3057\u305f\u3002\u3042\u3068\u306f\u5143\u65e5\u306a\u306e\u3067\u65e5\u306e\u4e38\u3002<\/p>\n<p>\u53c2\u8003<br \/>\n\u30fb<a href=\"http:\/\/processing.org\/learning\/basics\/recursion2.html\">Recursion2<\/a><br \/>\n\u30fb<a href=\"http:\/\/www.cobaltbombalphaomega.com\/?p=536\">Processing\u3067\u304a\u7d75\u304b\u304d10\u3000\u300c\u30b3\u30d0\u30eb\u30c8\u30de\u30fc\u30af\u300d<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>void setup() { size(540, 334); background(255,255,255); noStroke(); smooth(); fill(208, 19, 69); drawCircle(wi [&#8230;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"_links":{"self":[{"href":"https:\/\/inage.ksd6700.net\/index.php?rest_route=\/wp\/v2\/posts\/2112"}],"collection":[{"href":"https:\/\/inage.ksd6700.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/inage.ksd6700.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/inage.ksd6700.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/inage.ksd6700.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2112"}],"version-history":[{"count":2,"href":"https:\/\/inage.ksd6700.net\/index.php?rest_route=\/wp\/v2\/posts\/2112\/revisions"}],"predecessor-version":[{"id":2172,"href":"https:\/\/inage.ksd6700.net\/index.php?rest_route=\/wp\/v2\/posts\/2112\/revisions\/2172"}],"wp:attachment":[{"href":"https:\/\/inage.ksd6700.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/inage.ksd6700.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/inage.ksd6700.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}