Polyspiral: Difference between revisions

Added pure SVG polyspiral
(Added Fōrmulæ)
(Added pure SVG polyspiral)
Line 1,981:
#.scr()
<</lang>
 
=={{header|SVG}}==
 
Demo: [https://codepen.io/shephero/full/xxbaWXb codepen]
 
It's possible to render an animated polyspirangle completely declaratively, using SVG/SMIL.
 
It requires building up layers, animated over a rotation transformation. This is verbose, so the code below has been truncated, and the [https://codepen.io/shephero/full/xxbaWXb demo] uses another language ([https://codepen.io/shephero/full/xxbaWXb Pug]) to generate the source.
 
<lang html>
<svg viewBox="0 0 100 100" stroke="#000" stroke-width="0.3">
<g>
<line x1="50" y1="50" x2="54" y2="50"></line>
<animateTransform attributeName="transform" type="rotate" from="-120 50 50" to="240 50 50" dur="2400s" repeatCount="indefinite"></animateTransform>
<g>
<line x1="54" y1="50" x2="58.16" y2="50"></line>
<animateTransform attributeName="transform" type="rotate" from="-120 54 50" to="240 54 50" dur="2400s" repeatCount="indefinite"></animateTransform>
<g>
<line x1="58.16" y1="50" x2="62.48639" y2="50"></line>
<animateTransform attributeName="transform" type="rotate" dur="2400s" repeatCount="indefinite" to="240 58.16 50" from="-120 58.16 50"></animateTransform>
 
<!-- ad nauseam -->
 
</g>
</g>
</g>
</svg>
</lang>
 
=={{header|zkl}}==
Anonymous user