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

Views: 370

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: Devil drawer
Rating: 5
Filesize: 5.03 kB
Downloads: 195
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: 379
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: 20.35 kB
Downloads: 727
Comments: 0
Ratings: 1
Date added: 2023/02/13 06:00:36
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Sine Wave Drawer
Rating: 5
Filesize: 274.89 kB
Downloads: 749
Comments: 2
Ratings: 1
Date added: 2020/09/12 11:02:56
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Drawer
Rating: 5
Filesize: 29 kB
Downloads: 223
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: 180
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