Debian Codegraph @

texmf-dist/doc/latex/luatikz/example/bezier3b.lua

raw
1 tikz.within( '*' )
2
3 local bz =
4 bezier3{
5 p1 = p{ 0, 0 },
6 pc1 = p{ 1, 2 },
7 pc2 = p{ 3, 3 },
8 p2 = p{ 4, 0 },
9 }
10
11 draw{ line_width = 1, bz }
12
13 for t = 0, 1, 0.1
14 do
15 local pt = bz.pt( t )
16 draw{
17 fill = black,
18 circle{
19 at = pt,
20 radius = 0.05,
21 }
22 }
23
24 local phit = bz.phit( t ) + math.pi / 2
25 draw{
26 line{
27 p1 = pt,
28 phi = phit,
29 length = 1,
30 }
31 }
32 end