{"id":1691,"date":"2007-03-24T18:28:07","date_gmt":"2007-03-24T09:28:07","guid":{"rendered":"http:\/\/r-dimension.xsrv.jp\/classes_j\/?p=1691"},"modified":"2011-05-03T02:35:25","modified_gmt":"2011-05-02T17:35:25","slug":"beauty","status":"publish","type":"post","link":"https:\/\/r-dimension.xsrv.jp\/classes_j\/beauty\/","title":{"rendered":"\u30b3\u30fc\u30c9\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u66f8\u304f\u3068\u3044\u3046\u3053\u3068"},"content":{"rendered":"<p>\u307e\u305a\u306f\u3001\u4ee5\u4e0b\u306e2\u3064\u306e\u30b3\u30fc\u30c9\u3092\u898b\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<p><!--more--><\/p>\n<pre lang=\"java\" line=\"1\">\r\nint MAX = 20;\r\nint count = 0;\r\n\r\nCircle[] circles = new Circle[MAX];  \r\n\r\nvoid setup() {\r\nsize(300,300);  \r\nsmooth();\r\nfor (int i = 0; i < MAX; i++) {\r\ncircles[i] = new Circle();\r\n}\r\n}\r\nvoid draw() {\r\nbackground(150);\r\n\r\nfor (int i = 0; i < MAX; i++) {\r\ncircles[i].update();\r\n}\r\n}\r\n\r\nvoid mousePressed() {\r\ncircles[count].x = mouseX;\r\ncircles[count].y = mouseY;\r\ncircles[count].radius = 30.0;  \r\ncount ++;\r\nif(count >= MAX) count = 0;   \r\n}\r\n\r\nclass Circle {\r\nfloat x;\r\nfloat y;\r\nfloat radius;\r\nfloat xspeed;\r\nfloat yspeed; \r\n\r\nCircle() {\r\nxspeed = random(-0.5,0.5);\r\nyspeed = random(-0.5,0.5);\r\nx = width\/2;\r\ny = height\/2;\r\nradius = 30.0;\r\n}\r\nvoid  update() {\r\nif (radius > 0) radius+=random(-1.0, 1.0);\r\nx += xspeed;\r\ny += yspeed;\r\nnoStroke();\r\nfill(0);\r\nellipse(x,y,radius,radius);\r\n}\r\n}<\/pre>\n<pre lang=\"java\" line=\"1\">\r\n\/\/ \u5186\u306e\u751f\u6210\u306e\u30b5\u30f3\u30d7\u30eb\r\n\r\nint MAX = 20;  \/\/\u5186\u306e\u6700\u5927\u5024\r\nint count = 0;  \/\/\u30de\u30a6\u30b9\u30af\u30ea\u30c3\u30af\u306b\u3088\u3063\u3066\u751f\u307e\u308c\u308b\u5186\u306e\u756a\u53f7\r\n\r\n\/\/Circle\u30af\u30e9\u30b9\u306ecircles\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5ba3\u8a00\r\nCircle[] circles = new Circle[MAX];  \r\n\r\nvoid setup() {\r\n  size(300,300);  \r\n  smooth();\r\n                \r\n  \/\/ circles\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u751f\u6210\u3068\u914d\u5217\u306e\u521d\u671f\u5316\r\n  for (int i = 0; i < MAX; i++) {\r\n    circles[i] = new Circle();\r\n  }\r\n}\r\n\r\nvoid draw() {\r\n  background(150);\r\n  \r\n  \/\/\u5e38\u306bcircles[]\u3092\u66f4\u65b0\r\n  for (int i = 0; i < MAX; i++) {\r\n    circles[i].update();\r\n  }\r\n}\r\n\r\n\/\/\u30de\u30a6\u30b9\u30af\u30ea\u30c3\u30af\u306b\u3088\u308b\u30a4\u30d9\u30f3\u30c8\r\nvoid mousePressed() {\r\n    circles[count].x = mouseX;  \/\/circles\u306ex\u5ea7\u6a19\u3092\u30de\u30a6\u30b9\u306ex\u306b\u5909\u66f4\r\n    circles[count].y = mouseY;  \/\/circles\u306ey\u5ea7\u6a19\u3092\u30de\u30a6\u30b9\u306ey\u306b\u5909\u66f4\r\n    circles[count].radius = 30.0;  \/\/\u5186\u306e\u76f4\u5f84\u3092\u8a2d\u5b9a\r\n    \r\n    count ++;   \/\/\u9806\u756a\u306b\u66f4\u65b0\r\n    if(count >= MAX) count = 0;   \r\n}\r\n\r\n\r\n\/\/ Circle \u30af\u30e9\u30b9\u3092\u4f5c\u6210\r\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\r\nclass Circle {\r\n\r\n  float x;  \/\/\u5186\u306ex\u5ea7\u6a19\r\n  float y;  \/\/\u5186\u306ey\u5ea7\u6a19\r\n  float radius;  \/\/\u5186\u306e\u76f4\u5f84\r\n  float xspeed;  \/\/x\u8ef8\u65b9\u5411\u306e\u30b9\u30d4\u30fc\u30c9\r\n  float yspeed;  \/\/y\u8ef8\u65b9\u5411\u306e\u30b9\u30d4\u30fc\u30c9\r\n  \r\n  \/\/\u521d\u671f\u5316\u7528\u306e\u30e1\u30bd\u30c3\u30c9\uff08\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\uff09\r\n  Circle() {\r\n    xspeed = random(-0.5,0.5);  \/\/\u30b9\u30d4\u30fc\u30c9\u3068\u65b9\u5411\u3092\u30e9\u30f3\u30c0\u30e0\u306b\u4f5c\u6210\r\n    yspeed = random(-0.5,0.5);  \/\/\u30b9\u30d4\u30fc\u30c9\u3068\u65b9\u5411\u3092\u30e9\u30f3\u30c0\u30e0\u306b\u4f5c\u6210\r\n    x = width\/2;  \/\/x,y\u306f\u753b\u9762\u306e\u4e2d\u5fc3\u306b\u8a2d\u5b9a\r\n    y = height\/2;\r\n    radius = 30.0;  \/\/\u5186\u306e\u76f4\u5f84\u3092\u8a2d\u5b9a\r\n  }\r\n\r\n  \/\/\u5186\u306e\u63cf\u753b\u66f4\u65b0\u7528\u30e1\u30bd\u30c3\u30c9\r\n  void  update() {\r\n    \/\/\u5186\u306e\u76f4\u5f84\u3092\u30e9\u30f3\u30c0\u30e0\u306b\u5909\u5316\u3055\u305b\u308b\r\n    if (radius > 0) radius+=random(-1.0, 1.0);\r\n    \r\n    \/\/ speed\u3067\u8a2d\u5b9a\u3055\u308c\u305f\u5024\u3092\u8db3\u3059\r\n    x += xspeed;\r\n    y += yspeed;\r\n    \r\n    noStroke();\r\n    fill(0);\r\n    ellipse(x,y,radius,radius);  \/\/\u5186\u3092\u63cf\u753b\r\n  }\r\n}\r\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/pre>\n<p>2\u3064\u306e\u30b3\u30fc\u30c9\u306f\u540c\u3058\u3082\u306e\u3067\u3059\u304c\u3001\u3069\u3061\u3089\u304c\u5206\u304b\u308a\u3084\u3059\u3044\u304b\u306f\u4e00\u76ee\u77ad\u7136\u3067\u3057\u3087\u3046\u3002<br \/>\n\u3053\u308c\u306f\u6975\u7aef\u306a\u4f8b\u3067\u3059\u304c\u3001\u305d\u308c\u3050\u3089\u3044\u3001\u30b3\u30fc\u30c9\u306e\u8aad\u307f\u3084\u3059\u3055\u3068\u3044\u3046\u306e\u306f\u91cd\u8981\u306a\u306e\u3067\u3059\u3002<br \/>\n\u8aad\u307f\u306b\u304f\u3044\u30b3\u30fc\u30c9\u306f\u3001\u81ea\u5206\u3067\u66f8\u3044\u3066\u3044\u3066\u3082\u8aad\u3080\u6c17\u304c\u306a\u304f\u306a\u3063\u3066\u304d\u307e\u3059\u3002\u5236\u4f5c\u8005\u306e\u30e2\u30c1\u30d9\u30fc\u30b7\u30e7\u30f3\u306b\u3082\u5927\u304d\u306a\u5f71\u97ff\u3092\u4e0e\u3048\u307e\u3059\u3002<\/p>\n<p>\u7279\u306b\u6ce8\u610f\u3057\u3066\u6b32\u3057\u3044\u3068\u3053\u308d\u306f\u3001<strong>\u30a4\u30f3\u30c7\u30f3\u30c8<\/strong>\uff08tab\u30ad\u30fc\u3067\u884c\u306a\u3046\uff09\u3067\u3059\u3002{}\uff08\u30d6\u30ec\u30fc\u30b9\uff09\u3067\u9589\u3058\u308b\u3068\u3053\u308d\u306f\u7e26\u306e\u4f4d\u7f6e\u3092\u5408\u308f\u305b\u3066\u66f8\u304f\u306e\u304c\u4e00\u822c\u7684\u3067\u3059\u3002\u7d50\u69cb\u5fd8\u308c\u304c\u3061\u3067\u3059\u304c\u3001\u30b3\u30fc\u30c9\u304c\u8907\u96d1\u306b\u306a\u308c\u3070\u306a\u308b\u307b\u3069\u5206\u304b\u3089\u306a\u304f\u306a\u3063\u3066\u304f\u308b\u306e\u3067\u6c17\u3092\u3064\u3051\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<p>\u306a\u308b\u3079\u304f\u6211\u6d41\u3067\u3084\u3089\u305a\u306b\u3001\u4ed6\u306e\u4eba\u306e\u30b3\u30fc\u30c9\u3082\u53c2\u8003\u306b\u3057\u306a\u304c\u3089\u8aad\u307f\u3084\u3059\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3068\u3044\u3046\u3053\u3068\u306f\u5fd8\u308c\u306a\u3044\u3067\u4e0b\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u307e\u305a\u306f\u3001\u4ee5\u4e0b\u306e2\u3064\u306e\u30b3\u30fc\u30c9\u3092\u898b\u3066\u4e0b\u3055\u3044\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,11],"tags":[],"class_list":["post-1691","post","type-post","status-publish","format-standard","hentry","category-processing","category-11"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/posts\/1691","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/comments?post=1691"}],"version-history":[{"count":3,"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/posts\/1691\/revisions"}],"predecessor-version":[{"id":2493,"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/posts\/1691\/revisions\/2493"}],"wp:attachment":[{"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/media?parent=1691"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/categories?post=1691"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/r-dimension.xsrv.jp\/classes_j\/wp-json\/wp\/v2\/tags?post=1691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}