Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // DeCasteljau Algorithm implementation
- function DCJ() {
- return {
- bezier3: function(t, a, b, c) {
- var ab = {x: ((b.x-a.x) * t) + a.x,
- y: ((b.y-a.y) * t) + a.y};
- var bc = {x: ((c.x-b.x) * t) + b.x,
- y: ((c.y-b.y) * t) + b.y};
- var abbc = {x: ((bc.x-ab.x) * t) + ab.x,
- y: ((bc.y-ab.y) * t) + ab.y};
- return abbc;
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement