{"provider_name":"Hatena Blog","url":"https://mzp.hatenadiary.org/entry/20070527/bezier","published":"2007-05-27 00:00:03","author_url":"https://blog.hatena.ne.jp/mzp/","version":"1.0","categories":["Ruby","30\u5206\u30d7\u30ed\u30b0\u30e9\u30e0"],"height":"190","title":"bezier.rb","author_name":"mzp","blog_title":"\u307f\u305a\u3074\u30fc\u65e5\u8a18","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmzp.hatenadiary.org%2Fentry%2F20070527%2Fbezier\" title=\"bezier.rb - \u307f\u305a\u3074\u30fc\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","blog_url":"https://mzp.hatenadiary.org/","image_url":null,"width":"100%","description":"30\u5206\u30d7\u30ed\u30b0\u30e9\u30e0\u3001\u305d\u306e39\u3002\u30d9\u30b8\u30a8\u66f2\u7dda\u3002\u3054\u305e\u3093\u3058\u306e\u901a\u308a\u30d9\u30b8\u30a8\u66f2\u7dda\u306f\u30014\u3064\u306e\u5236\u5fa1\u70b9\u3092\u3082\u3068\u306b\u66f2\u7dda\u3092\u66f8\u304f\u305f\u3081\u306e\u624b\u6cd5\u3002\u5404\u5236\u5fa1\u70b9\u3092\u305d\u308c\u305e\u308c\u3001(x0,y0),(x1,y1),(x2,y2),(x3,y3)\u3068\u3059\u308b\u3068 \u3068\u3044\u3046\u5f0f\u306et\u306b0.0,0.1,...,1.0\u3068\u3044\u3046\u5024\u3092\u4ee3\u5165\u3057\u3066\u3001\u5f97\u3089\u308c\u308b\u70b9\u3092\u9806\u306b\u30d7\u30ed\u30c3\u30c8\u3057\u3066\u3044\u3051\u3070\u3001\u30d9\u30b8\u30a8\u66f2\u7dda\u304c\u5f97\u3089\u308c\u308b\u3002\u305f\u307e\u305f\u307e\u3001\u308b\u3073\u307e\u3067SDL\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u3066\u3044\u305f\u306e\u3067\u3001SDL\u3067\u3084\u3063\u3066\u307f\u308b\u3002 require \"sdl\" def bezier(t,p0,p1,p2,p3) (1.0-t)*p0 + 3*t*(1.0-t)**2*p1 + 3*t*t*(1.0-t)*p2 + t**3*p3 en\u2026","provider_url":"https://hatena.blog"}