summaryrefslogtreecommitdiff
path: root/graphics/asymptote/examples/star.asy
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/examples/star.asy')
-rw-r--r--graphics/asymptote/examples/star.asy13
1 files changed, 13 insertions, 0 deletions
diff --git a/graphics/asymptote/examples/star.asy b/graphics/asymptote/examples/star.asy
new file mode 100644
index 0000000000..3a7afb2529
--- /dev/null
+++ b/graphics/asymptote/examples/star.asy
@@ -0,0 +1,13 @@
+size(100);
+import math;
+
+int n=5;
+path p;
+
+int i=0;
+do {
+ p=p--unityroot(n,i);
+ i=(i+2) % n;
+} while(i != 0);
+
+filldraw(p--cycle,red+evenodd);