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: 317

Views: 317

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: Rainbow Drawer
Rating: 5
Filesize: 204.78 kB
Downloads: 437
Comments: 1
Ratings: 1
Date added: 2016/01/05 18:40:30
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Opening & Closing Drawer
Rating: 5
Filesize: 271.96 kB
Downloads: 360
Comments: 1
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: 165
Comments: 0
Ratings: 1
Date added: 2016/09/26 15:37:18
Made with: Algodoo v2.0.0 Edu
Rating: rated 5
download
Title: Circle drawer
Rating: 5
Filesize: 7 kB
Downloads: 341
Comments: 0
Ratings: 1
Date added: 2021/11/18 03:47:34
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Drawer
Rating: 5
Filesize: 36.61 kB
Downloads: 290
Comments: 0
Ratings: 1
Date added: 2013/06/25 19:19:48
Made with: Algodoo v2.0.1 Edu
Rating: rated 5
download
Title: drawer
Rating: 5
Filesize: 79.16 kB
Downloads: 151
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