﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?application progid="SMath Studio Desktop" version="0.99.7030.1435"?>
<worksheet xmlns="http://smath.info/schemas/worksheet/1.0">
  <settings ppi="96">
    <identity>
      <id>06d91635-396e-463c-8a0c-d54f63bb3cbd</id>
      <revision>22</revision>
    </identity>
    <calculation>
      <precision>4</precision>
      <exponentialThreshold>5</exponentialThreshold>
      <trailingZeros>false</trailingZeros>
      <significantDigitsMode>false</significantDigitsMode>
      <roundingMode>0</roundingMode>
      <fractions>decimal</fractions>
    </calculation>
    <pageModel active="true" viewMode="0" printGrid="false" printAreas="true" simpleEqualsOnly="false" printBackgroundImages="true">
      <paper id="8" orientation="Portrait" width="1169" height="1654" />
      <margins left="39" right="39" top="39" bottom="39" />
      <header alignment="Center" color="#a9a9a9">&amp;[DATE] &amp;[TIME] - &amp;[FILENAME]</header>
      <footer alignment="Center" color="#a9a9a9">&amp;[PAGENUM] / &amp;[COUNT]</footer>
      <backgrounds />
    </pageModel>
    <dependencies>
      <assembly name="SMath Studio Desktop" version="0.99.7030.1435" guid="a37cba83-b69c-4c71-9992-55ff666763bd" />
      <assembly name="Math Region" version="0.99.7030.1435" guid="02f1ab51-215b-466e-a74d-5d8b1cf85e8d" />
      <assembly name="PlotRegion" version="1.11.7030.1435" guid="c451c2b5-798b-4f08-b9ec-b90963d1ddaa" />
    </dependencies>
  </settings>
  <regions type="content">
    <region id="0" left="9" top="9" width="169" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">points</e>
          <e type="operand">0</e>
          <e type="operand">2</e>
          <e type="function" args="2">matrix</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="1" left="9" top="36" width="1099" height="293" color="#000000" bgColor="#ffffff" fontSize="10">
      <math optimize="2">
        <description active="true" position="Top" lang="eng">
          <p>Dragon - recursively calculates the points of the Dragon Curve</p>
        </description>
        <input>
          <e type="operand">x0</e>
          <e type="operand">y0</e>
          <e type="operand">x1</e>
          <e type="operand">y1</e>
          <e type="operand">orientation</e>
          <e type="operand">order</e>
          <e type="function" args="6">Dragon</e>
          <e type="operand">c</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="function" args="1">sqrt</e>
          <e type="operator" args="2">/</e>
          <e type="operator" args="2">:</e>
          <e type="operand">xm</e>
          <e type="operand">x0</e>
          <e type="operand">x1</e>
          <e type="operand">x0</e>
          <e type="operator" args="2">-</e>
          <e type="bracket">(</e>
          <e type="operand">c</e>
          <e type="operator" args="2">*</e>
          <e type="operator" args="2">+</e>
          <e type="operator" args="2">:</e>
          <e type="operand">ym</e>
          <e type="operand">y0</e>
          <e type="operand">y1</e>
          <e type="operand">y0</e>
          <e type="operator" args="2">-</e>
          <e type="bracket">(</e>
          <e type="operand">c</e>
          <e type="operator" args="2">*</e>
          <e type="operator" args="2">+</e>
          <e type="operator" args="2">:</e>
          <e type="operand">r</e>
          <e type="operand">x0</e>
          <e type="operand">xm</e>
          <e type="operand">x0</e>
          <e type="operator" args="2">-</e>
          <e type="bracket">(</e>
          <e type="operand">c</e>
          <e type="operator" args="2">*</e>
          <e type="operator" args="2">+</e>
          <e type="operand">ym</e>
          <e type="operand">y0</e>
          <e type="operator" args="2">-</e>
          <e type="bracket">(</e>
          <e type="operand">c</e>
          <e type="operator" args="2">*</e>
          <e type="operator" args="2">-</e>
          <e type="operator" args="2">:</e>
          <e type="operand">s</e>
          <e type="operand">y0</e>
          <e type="operand">xm</e>
          <e type="operand">x0</e>
          <e type="operator" args="2">-</e>
          <e type="bracket">(</e>
          <e type="operand">c</e>
          <e type="operator" args="2">*</e>
          <e type="operator" args="2">+</e>
          <e type="operand">ym</e>
          <e type="operand">y0</e>
          <e type="operator" args="2">-</e>
          <e type="bracket">(</e>
          <e type="operand">c</e>
          <e type="operator" args="2">*</e>
          <e type="operator" args="2">+</e>
          <e type="operator" args="2">:</e>
          <e type="operand">t</e>
          <e type="operand">x0</e>
          <e type="operand">xm</e>
          <e type="operand">x0</e>
          <e type="operator" args="2">-</e>
          <e type="bracket">(</e>
          <e type="operand">c</e>
          <e type="operator" args="2">*</e>
          <e type="operator" args="2">+</e>
          <e type="operand">ym</e>
          <e type="operand">y0</e>
          <e type="operator" args="2">-</e>
          <e type="bracket">(</e>
          <e type="operand">c</e>
          <e type="operator" args="2">*</e>
          <e type="operator" args="2">+</e>
          <e type="operator" args="2">:</e>
          <e type="operand">u</e>
          <e type="operand">y0</e>
          <e type="operand">xm</e>
          <e type="operand">x0</e>
          <e type="operator" args="2">-</e>
          <e type="bracket">(</e>
          <e type="operand">c</e>
          <e type="operator" args="2">*</e>
          <e type="operator" args="2">-</e>
          <e type="operand">ym</e>
          <e type="operand">y0</e>
          <e type="operator" args="2">-</e>
          <e type="bracket">(</e>
          <e type="operand">c</e>
          <e type="operator" args="2">*</e>
          <e type="operator" args="2">+</e>
          <e type="operator" args="2">:</e>
          <e type="operand">order</e>
          <e type="operand">1</e>
          <e type="operator" args="2">&gt;</e>
          <e type="operand">orientation</e>
          <e type="operand">0</e>
          <e type="operator" args="2">≡</e>
          <e type="operand">points</e>
          <e type="operand">points</e>
          <e type="operand">x0</e>
          <e type="operand">y0</e>
          <e type="operand">r</e>
          <e type="operand">s</e>
          <e type="operand">1</e>
          <e type="operand">order</e>
          <e type="operand">1</e>
          <e type="operator" args="2">-</e>
          <e type="function" args="6">Dragon</e>
          <e type="operand">r</e>
          <e type="operand">s</e>
          <e type="operand">x1</e>
          <e type="operand">y1</e>
          <e type="operand">0</e>
          <e type="operand">order</e>
          <e type="operand">1</e>
          <e type="operator" args="2">-</e>
          <e type="function" args="6">Dragon</e>
          <e type="function" args="3">stack</e>
          <e type="operator" args="2">:</e>
          <e type="operand">points</e>
          <e type="operand">points</e>
          <e type="operand">x0</e>
          <e type="operand">y0</e>
          <e type="operand">t</e>
          <e type="operand">u</e>
          <e type="operand">1</e>
          <e type="operand">order</e>
          <e type="operand">1</e>
          <e type="operator" args="2">-</e>
          <e type="function" args="6">Dragon</e>
          <e type="operand">t</e>
          <e type="operand">u</e>
          <e type="operand">x1</e>
          <e type="operand">y1</e>
          <e type="operand">0</e>
          <e type="operand">order</e>
          <e type="operand">1</e>
          <e type="operator" args="2">-</e>
          <e type="function" args="6">Dragon</e>
          <e type="function" args="3">stack</e>
          <e type="operator" args="2">:</e>
          <e type="function" args="3">if</e>
          <e type="operand">points</e>
          <e type="operand">points</e>
          <e type="operand">x1</e>
          <e type="operand">y1</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="function" args="4">mat</e>
          <e type="function" args="2">stack</e>
          <e type="operator" args="2">:</e>
          <e type="function" args="3">if</e>
          <e type="operand">8</e>
          <e type="operand">1</e>
          <e type="function" args="10">line</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="2" left="9" top="360" width="947" height="50" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <description active="true" position="Top" lang="eng">
          <p>dragon - assigns points variable with start point(x0,y0) then appends the Dragon curve. This method minimises the number of plot points.</p>
        </description>
        <input>
          <e type="operand">x0</e>
          <e type="operand">y0</e>
          <e type="operand">x1</e>
          <e type="operand">y1</e>
          <e type="operand">orientation</e>
          <e type="operand">order</e>
          <e type="function" args="6">dragon</e>
          <e type="operand">points</e>
          <e type="operand">points</e>
          <e type="operand">x0</e>
          <e type="operand">y0</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="function" args="4">mat</e>
          <e type="operand">x0</e>
          <e type="operand">y0</e>
          <e type="operand">x1</e>
          <e type="operand">y1</e>
          <e type="operand">orientation</e>
          <e type="operand">order</e>
          <e type="function" args="6">Dragon</e>
          <e type="function" args="3">stack</e>
          <e type="operator" args="2">:</e>
          <e type="operand">points</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">line</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="3" left="36" top="432" width="247" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">M</e>
          <e type="operand">20</e>
          <e type="operator" args="1">-</e>
          <e type="operand">0</e>
          <e type="operand">20</e>
          <e type="operand">0</e>
          <e type="operand">1</e>
          <e type="operand">11</e>
          <e type="function" args="6">dragon</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="4" left="306" top="432" width="247" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">N</e>
          <e type="operand">20</e>
          <e type="operator" args="1">-</e>
          <e type="operand">0</e>
          <e type="operand">20</e>
          <e type="operand">0</e>
          <e type="operand">0</e>
          <e type="operand">11</e>
          <e type="function" args="6">dragon</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="5" left="594" top="432" width="143" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">M</e>
          <e type="function" args="1">length</e>
        </input>
        <result action="numeric">
          <e type="operand">2050</e>
        </result>
      </math>
    </region>
    <region id="6" left="72" top="486" width="880" height="543" color="#000000" bgColor="#ffffff" fontSize="10">
      <plot grid="false" axes="false" type="2d" render="lines" scale_x="1" scale_y="1" scale_z="1" rotate_x="0" rotate_y="0" rotate_z="0" transpose_x="2" transpose_y="-5" transpose_z="0">
        <input>
          <e type="operand">M</e>
          <e type="operand">N</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">sys</e>
        </input>
      </plot>
    </region>
  </regions>
</worksheet>