Exámenes - Dibujo Espiral

En este ejercicio se debe crear un programa que muestre un dibujo SVG de una espiral.

Dibujo Espiral - Comentarios

Dibujo Espiral - Ejemplos de código HTML

  <p>
    <svg version="1.1" xmlns="http://www.w3.org/2000/svg"
         width="220" height="220" viewBox="-110 -110 220 220"
         style="border: black 1px solid">
      <rect x="-100" y="-100" width="200" height="200" fill="#aaa"/>
      <rect x="-50" y="-50" width="150" height="150" fill="#bbb"/>
      <rect x="-50" y="-50" width="100" height="100" fill="#ccc"/>
      <rect x="0" y="0" width="50" height="50" fill="#ddd"/>
      <polyline points="0,0 50,0 50,50 -50,50 -50,-50 100,-50 100,100 -100,100 -100,-100 100,-100"
                fill="none" stroke="red" stroke-width="10"/>
    </svg>
  </p>
  <p>
    <svg version="1.1" xmlns="http://www.w3.org/2000/svg"
         width="260" height="260" viewBox="-130 -130 260 260"
         style="border: black 1px solid">
      <rect x="-120" y="-120" width="240" height="240" fill="#aaa"/>
      <rect x="-60" y="-60" width="180" height="180" fill="#bbb"/>
      <rect x="-60" y="-60" width="120" height="120" fill="#ccc"/>
      <rect x="0" y="0" width="60" height="60" fill="#ddd"/>
      <polyline points="0,0 60,0 60,60 -60,60 -60,-60 120,-60 120,120 -120,120 -120,-120 120,-120"
                fill="none" stroke="red" stroke-width="10"/>
    </svg>
  </p>
  <p>
    <svg version="1.1" xmlns="http://www.w3.org/2000/svg"
         width="420" height="420" viewBox="-210 -210 420 420"
         style="border: black 1px solid">
      <rect x="-200" y="-200" width="400" height="400" fill="#aaa"/>
      <rect x="-100" y="-100" width="300" height="300" fill="#bbb"/>
      <rect x="-100" y="-100" width="200" height="200" fill="#ccc"/>
      <rect x="0" y="0" width="100" height="100" fill="#ddd"/>
      <polyline points="0,0 100,0 100,100 -100,100 -100,-100 200,-100 200,200 -200,200 -200,-200 200,-200"
                fill="none" stroke="red" stroke-width="10"/>
    </svg>
  </p>