File: makepen.asy

package info (click to toggle)
asymptote 2.15-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 10,732 kB
  • sloc: cpp: 57,310; ansic: 4,491; python: 3,919; perl: 1,557; lisp: 1,363; yacc: 554; makefile: 548; sh: 523; lex: 442
file content (9 lines) | stat: -rw-r--r-- 293 bytes parent folder | download | duplicates (24)
1
2
3
4
5
6
7
8
9
size(200);
pen convex=makepen(scale(10)*polygon(8))+grey;
draw((1,0.4),convex);
draw((0,0)---(1,1)..(2,0)--cycle,convex);

pen nonconvex=scale(10)*
  makepen((0,0)--(0.25,-1)--(0.5,0.25)--(1,0)--(0.5,1.25)--cycle)+red;
draw((0.5,-1.5),nonconvex);
draw((0,-1.5)..(1,-0.5)..(2,-1.5),nonconvex);