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

Views: 327

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: 1398
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: Rainbow Drawer
Rating: 5
Filesize: 204.78 kB
Downloads: 442
Comments: 1
Ratings: 1
Date added: 2016/01/05 18:40:30
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Car Wash (Updated)
Rating: 5
Filesize: 185.46 kB
Downloads: 2291
Comments: 2
Ratings: 1
Date added: 2010/02/24 01:15:08
Made with: Phun
Rating: rated 5
download
Title: Sine Wave Drawer
Rating: 5
Filesize: 274.89 kB
Downloads: 721
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: 36.61 kB
Downloads: 300
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: 29 kB
Downloads: 206
Comments: 0
Ratings: 1
Date added: 2015/11/19 02:50:57
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