Browse Search Popular Register Upload Rules User list Login:
Search:
Beziércurve-Drawer

Image:
screenshot of the scene

Author: FRA32

Group: Technical

Filesize: 6.8 kB

Date added: 2015-12-12

Rating: 5

Downloads: 270

Views: 225

Comments: 4

Ratings: 1

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

This scene shows another of my mathematical play-arounds, this time featuring a code that draws a full beziér-curve or cubic interpolation between 4 points.

The Beziércurve is very importand in vector graphics and modelling, since it's one of the most dynamic curve's usable. It always goes from a point A to a point D, while beeing "attracted" by B and C.
Last edited at 2016/07/03 21:52:21 by FRA32
Please log in to rate this scene
edit
Similar scenes
Title: Make your own PROGRAMABLE DRAW!
Rating: 5.5
Filesize: 34.56 kB
Downloads: 1295
Comments: 8
Ratings: 2
Date added: 2013/07/29 13:38:51
Made with: Algodoo before v1.8.5
Rating: rated 5.5
download
Title: Opening & Closing Drawer
Rating: 5
Filesize: 271.96 kB
Downloads: 274
Comments: 0
Ratings: 1
Date added: 2018/11/11 15:31:43
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Devil drawer
Rating: 5
Filesize: 5.03 kB
Downloads: 106
Comments: 0
Ratings: 1
Date added: 2016/09/26 15:37:18
Made with: Algodoo v2.0.0 Edu
Rating: rated 5
download
Title: Car Wash (Updated)
Rating: 5
Filesize: 185.46 kB
Downloads: 2121
Comments: 2
Ratings: 1
Date added: 2010/02/24 01:15:08
Made with: Phun
Rating: rated 5
download
Title: Drawer
Rating: 5
Filesize: 29 kB
Downloads: 139
Comments: 0
Ratings: 1
Date added: 2015/11/19 02:50:57
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: drawer
Rating: 5
Filesize: 79.16 kB
Downloads: 104
Comments: 0
Ratings: 1
Date added: 2016/08/17 20:36:46
Made with: Algodoo v2.1.0
Rating: rated 5
download
Nice demo.

Algodoo already has a lerp function.

p1 = _lerp(scene.my.A, scene.my.B);

can be replaced by

p1 = lerp(scene.my.A, scene.my.B,_t);

Same thing for the other (5) _lerp statements.
Last edited at 2015/12/12 21:46:21 by s_noonan
oh lol, didn't know that :wtf:
Well, at least I can say I invented another lerp function myself xD
Yes, your function works quite well.

For future reference:

math.vec.dist(pt1,pt2) determines the distance between two points.
math.vec.len(v) determines vector length.
Oh, thanks. These will proove to be usefull, no more square root and stuff xD