Skip to content

Commit ef57baf

Browse files
committed
New function curvePoint()
1 parent 08b83f3 commit ef57baf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

processing.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,6 +1738,10 @@ function buildProcessing( curElement ){
17381738
p.bezierPoint = function bezierPoint(a,b,c,d,t){
17391739
return (1-t)*(1-t)*(1-t)*a+3*(1-t)*(1-t)*t*b+3*(1-t)*t*t*c+t*t*t*d;
17401740
}
1741+
p.curvePoint = function curvePoint(a,b,c,d,t){
1742+
return 0.5*((2*b)+(-a+c)*t+(2*a-5*b+4*c-d)*t*t+(-a+3*b-3*c+d)*t*t*t)
1743+
}
1744+
17411745

17421746
//end
17431747

0 commit comments

Comments
 (0)