Anonymous user
Pentagram: Difference between revisions
m
→{{header|zkl}}: tweak
(→{{header|Tcl}}: added zkl) |
m (→{{header|zkl}}: tweak) |
||
Line 519:
Generate an SVG file to STDOUT. Redirect to a file to capture and display it.
<lang zkl>const DIM=200, SIDES=5, A=360/SIDES, R=DIM.toFloat();
vs:=[0.0..360-A,A].
#<<<
0'|<?xml version="1.0" standalone="no" ?>
Line 529:
.fmt(DIM*2, DIM*2).println();
var vertices=vs.pump(List,fcn(a){ R.toRectangular(a
SIDES.pump(String,pline).println(); // the line pairs that draw the pentagram
|