Sierpinski pentagon: Difference between revisions
Content deleted Content added
m →{{header|Sidef}}: modified the code to work with Sidef 2.30 |
|||
Line 259: | Line 259: | ||
(sides**order).range.each { |i| |
(sides**order).range.each { |i| |
||
var vector = ([vertices |
var vector = ([vertices["%#{order}d" % i.base(sides) -> chars]] »*« orders «+») |
||
var points = (vertices »*» orders[-1]*(1-scaling_factor) »+» vector »reals»() «%« '%0.3f') |
var points = (vertices »*» orders[-1]*(1-scaling_factor) »+» vector »reals»() «%« '%0.3f') |
||
say ('<polygon points="' + points.join(' ') + '"/>') |
say ('<polygon points="' + points.join(' ') + '"/>') |