{"id":246,"date":"2007-02-14T14:52:00","date_gmt":"2007-02-14T14:52:00","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=246"},"modified":"2017-01-29T14:01:26","modified_gmt":"2017-01-29T05:01:26","slug":"%ea%b0%84%eb%8b%a8%ed%95%9c-%ed%94%84%eb%9e%99%ed%83%88-%ea%b7%b8%eb%9e%98%ed%94%bd-%ec%a4%91-%ed%95%98%eb%82%98%ec%9d%b8-l-system%ec%9d%98-%ec%9d%91%ec%9a%a9","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=246","title":{"rendered":"\uac04\ub2e8\ud55c \ud504\ub799\ud0c8 \uadf8\ub798\ud53d \uc911 \ud558\ub098\uc778 L-System\uc758 \uc751\uc6a9"},"content":{"rendered":"<p>\uac04\ub2e8\ud55c \ucf54\ub4dc\uc9c0\ub9cc \uadf8 \uacb0\uacfc\ub294 \uad49\uc7a5(?)\ud558\uae30\ub85c \uc18c\ubb38\ub09c \ud504\ub799\ud0c8 \uadf8\ub798\ud53d \uc911\uc5d0 \ub098\ubb34 \ubaa8\uc591\uc744 \uadf8\ub824\ub0b4\ub294 L-System\uc744 \uc791\uc131\ud574\ubcf4\uc558\ub2e4. \uc544\ub798\ub294 \uadf8 \ucf54\ub4dc..<\/p>\n<pre>void DrawLSystem(SDL_Surface *screen, int l, int d, int n)\r\n{\r\n    float dx = l * sin(d * (M_PI\/180.0));\r\n    float dy = l * cos(d * (M_PI\/180.0));\r\n\r\n    if(n < 7) \r\n        LineRel(screen, -dx, -dy, 0, 255, 0); \r\n    else \r\n        LineRel(screen, -dx, -dy, 100, 120, 0); \r\n\r\n    if(n > 0) {\r\n        DrawLSystem(screen, l*0.6, d+random()%40+30, n-1);\r\n        DrawLSystem(screen, l*0.6, d-random()%40-30, n-1);\r\n        DrawLSystem(screen, l*0.7, d+random()%30, n-1);\r\n    }\r\n\r\n    MoveRel(dx, dy)\r\n}<\/pre>\n<p>SDL_Surface\ub294 \uc815\ud655\ud55c \ube44\uad50\ub294 \uc544\ub2c8\uc9c0\ub9cc Windows\uc5d0\uc11c\ub294 HDC\uc5d0 \ud574\ub2f9\ud55c\ub2e4.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/1\/1025371161.png\" alt=\"\" width=\"510\" height=\"397\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/1\/1244159698.png\" alt=\"\" width=\"510\" height=\"397\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/1\/1333160191.png\" alt=\"\" width=\"510\" height=\"397\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/1\/1213969114.png\" alt=\"\" width=\"510\" height=\"397\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/1\/1243350109.png\" alt=\"\" width=\"510\" height=\"397\" \/><br \/>\n\uadf8 \uacb0\uacfc\uc774\ub2e4. \uc0c1\ub2f9\ud55c \uc9e7\uc740 \ucf54\ub4dc\uc5d0 \ube44\ud574\uc11c \uadf8 \uacb0\uacfc\ub294 \uc790\ubabb \ud654\ub824\ud558\ub2e4. \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uac04\ub2e8\ud55c \ucf54\ub4dc\uc9c0\ub9cc \uadf8 \uacb0\uacfc\ub294 \uad49\uc7a5(?)\ud558\uae30\ub85c \uc18c\ubb38\ub09c \ud504\ub799\ud0c8 \uadf8\ub798\ud53d \uc911\uc5d0 \ub098\ubb34 \ubaa8\uc591\uc744 \uadf8\ub824\ub0b4\ub294 L-System\uc744 \uc791\uc131\ud574\ubcf4\uc558\ub2e4. \uc544\ub798\ub294 \uadf8 \ucf54\ub4dc.. void DrawLSystem(SDL_Surface *screen, int l, int d, int n) { float dx = l * sin(d * (M_PI\/180.0)); float dy = l * cos(d * (M_PI\/180.0)); if(n < 7) LineRel(screen, -dx, -dy, 0, 255, 0); else LineRel(screen, -dx, &hellip; \n\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=246\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;\uac04\ub2e8\ud55c \ud504\ub799\ud0c8 \uadf8\ub798\ud53d \uc911 \ud558\ub098\uc778 L-System\uc758 \uc751\uc6a9&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-246","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=246"}],"version-history":[{"count":3,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/246\/revisions"}],"predecessor-version":[{"id":3673,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/246\/revisions\/3673"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=246"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}