'Catmull-Rom Spline'에 해당되는 글 1건

  1. 2010/03/03 Actionscript 3 - Catmull-Rom Spline curve code



more..


사용방법은.. 곡선을 이을 포인트(x,y쌍) 배열을 매개변수로 넘긴다. $n 은 보간 정도..

ex)
var points : Vector.<Number> = Vector.<Number>(50,50,100,200,200,100,300,300);
var path : Vector.<Number> = CatmullRomSpline.curve(points,20) ;

path[2*i] -> x
path[2*i+1] -> y

Posted by 웹눈