<spanid="function-documentation"></span><h1>function documentation<aclass="headerlink"href="#module-main"title="Permalink to this headline">¶</a></h1>
<dlclass="class">
<dtid="main.Figures">
<emclass="property">class </em><codeclass="descclassname">main.</code><codeclass="descname">Figures</code><spanclass="sig-paren">(</span><em>im</em>, <em>mode=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Figures"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Figures"title="Permalink to this definition">¶</a></dt>
<dd><p>A lot of function to create some well-know shapes</p>
<dlclass="staticmethod">
<dtid="main.Figures._int">
<emclass="property">static </em><codeclass="descname">_int</code><spanclass="sig-paren">(</span><em>value</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Figures._int"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Figures._int"title="Permalink to this definition">¶</a></dt>
<dd><p>Make a tuple of float coordinate into tuple of int coordinate</p>
<codeclass="descname">blanc_manger</code><spanclass="sig-paren">(</span><em>origin</em>, <em>finish</em>, <em>iterations</em>, <em>color=None</em>, <em>width=0</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Figures.blanc_manger"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Figures.blanc_manger"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>origin</strong> (<em>tuple</em>) – coordinate of the starting point</li>
<li><strong>finish</strong> (<em>tuple</em>) – coordinate of the ending point</li>
<li><strong>iterations</strong> (<em>int</em>) – iterations for the drawings</li>
<li><strong>color</strong> (<em>tuple</em>) – color to use for the lines</li>
<li><strong>width</strong> (<em>int</em>) – the line width, in pixels</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="staticmethod">
<dtid="main.Figures.complex_to_point">
<emclass="property">static </em><codeclass="descname">complex_to_point</code><spanclass="sig-paren">(</span><em>point</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Figures.complex_to_point"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Figures.complex_to_point"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>point</strong> (<em>complex</em>) – Point to convert</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body">tuple representation of point</td>
<codeclass="descname">homothety</code><spanclass="sig-paren">(</span><em>point</em>, <em>center=0j</em>, <em>size=0</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Figures.homothety"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Figures.homothety"title="Permalink to this definition">¶</a></dt>
<li><strong>point</strong> (<em>tuple</em><em> or </em><em>complex</em>) – point (or list of point) to make homothety</li>
<li><strong>center</strong> (<em>tuple</em><em> or </em><em>complex</em>) – center of homothety</li>
<li><strong>size</strong> (<em>float</em>) – size of homothety</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">Homothety of point (or list of homothety of points)</p>
</td>
</tr>
<trclass="field-odd field"><thclass="field-name">Return type:</th><tdclass="field-body"><pclass="first last">tuple or list of tuples</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="staticmethod">
<dtid="main.Figures.point_to_complex">
<emclass="property">static </em><codeclass="descname">point_to_complex</code><spanclass="sig-paren">(</span><em>point</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Figures.point_to_complex"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Figures.point_to_complex"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">rotation</code><spanclass="sig-paren">(</span><em>point</em>, <em>center=0j</em>, <em>angle=0</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Figures.rotation"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Figures.rotation"title="Permalink to this definition">¶</a></dt>
<li><strong>point</strong> (<em>tuple</em><em> or </em><em>complex</em>) – point (or list of point) to rotate</li>
<li><strong>center</strong> (<em>tuple</em><em> or </em><em>complex</em>) – center of rotation</li>
<li><strong>angle</strong> (<em>float</em>) – angle of rotation</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">Rotated point (or list of rotated points)</p>
</td>
</tr>
<trclass="field-odd field"><thclass="field-name">Return type:</th><tdclass="field-body"><pclass="first last">tuple or list of tuples</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="method">
<dtid="main.Figures.translation">
<codeclass="descname">translation</code><spanclass="sig-paren">(</span><em>point</em>, <em>vect</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Figures.translation"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Figures.translation"title="Permalink to this definition">¶</a></dt>
<li><strong>point</strong> (<em>tuple</em><em> or </em><em>complex</em>) – point (or list of point) to translate</li>
<li><strong>vect</strong> (<em>tuple</em><em> or </em><em>complex</em>) – vector of translation</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">Translated point (or list of translated points)</p>
</td>
</tr>
<trclass="field-odd field"><thclass="field-name">Return type:</th><tdclass="field-body"><pclass="first last">tuple or list of tuples</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="method">
<dtid="main.Figures.von_koch_curve">
<codeclass="descname">von_koch_curve</code><spanclass="sig-paren">(</span><em>origin</em>, <em>finish</em>, <em>iterations=1</em>, <em>color=None</em>, <em>width=0</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Figures.von_koch_curve"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Figures.von_koch_curve"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>origin</strong> (<em>tuple</em>) – coordinate of the starting point</li>
<li><strong>finish</strong> (<em>tuple</em>) – coordinate of the ending point</li>
<li><strong>iterations</strong> (<em>int</em>) – iterations for the drawings</li>
<li><strong>color</strong> (<em>tuple</em>) – color to use for the lines</li>
<li><strong>width</strong> (<em>int</em>) – the line width, in pixels</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="method">
<dtid="main.Figures.von_koch_curve_flake">
<codeclass="descname">von_koch_curve_flake</code><spanclass="sig-paren">(</span><em>origin</em>, <em>radius</em>, <em>iterations</em>, <em>angle=0</em>, <em>color=None</em>, <em>width=0</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Figures.von_koch_curve_flake"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Figures.von_koch_curve_flake"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>origin</strong> (<em>tuple</em>) – coordinate of the center of circumscribed circle of main triangle</li>
<li><strong>radius</strong> (<em>float</em>) – radius of circumscribed circle of main triangle</li>
<li><strong>iterations</strong> (<em>int</em>) – iterations for the drawings</li>
<li><strong>angle</strong> (<em>float</em>) – rotation of main triangle</li>
<li><strong>color</strong> (<em>tuple</em>) – color to use for the lines</li>
<li><strong>width</strong> (<em>int</em>) – the line width, in pixels</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dlclass="class">
<dtid="main.Lsystem">
<emclass="property">class </em><codeclass="descclassname">main.</code><codeclass="descname">Lsystem</code><spanclass="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem"title="Permalink to this definition">¶</a></dt>
<dd><p>Draw a L system</p>
<dlclass="method">
<dtid="main.Lsystem._backward">
<codeclass="descname">_backward</code><spanclass="sig-paren">(</span><em>distance</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem._backward"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem._backward"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>distance</strong> (<em>float</em>) – Distance to backward</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="method">
<dtid="main.Lsystem._forward">
<codeclass="descname">_forward</code><spanclass="sig-paren">(</span><em>distance</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem._forward"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem._forward"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>distance</strong> (<em>float</em>) – Distance to forward</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="method">
<dtid="main.Lsystem._left">
<codeclass="descname">_left</code><spanclass="sig-paren">(</span><em>angle</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem._left"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem._left"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>angle</strong> (<em>float</em>) – Angle to rotate</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="method">
<dtid="main.Lsystem._restore">
<codeclass="descname">_restore</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem._restore"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem._restore"title="Permalink to this definition">¶</a></dt>
<dd><p>Restore last pen state</p>
</dd></dl>
<dlclass="method">
<dtid="main.Lsystem._right">
<codeclass="descname">_right</code><spanclass="sig-paren">(</span><em>angle</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem._right"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem._right"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>angle</strong> (<em>float</em>) – Angle to rotate</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="method">
<dtid="main.Lsystem._save">
<codeclass="descname">_save</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem._save"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem._save"title="Permalink to this definition">¶</a></dt>
<dd><p>Save state of pen</p>
</dd></dl>
<dlclass="method">
<dtid="main.Lsystem.backward">
<codeclass="descname">backward</code><spanclass="sig-paren">(</span><em>distance</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem.backward"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem.backward"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a lambda function which make pen backward of distance</p>
<codeclass="descname">dragon</code><spanclass="sig-paren">(</span><em>size</em>, <em>recursions</em>, <em>color=None</em>, <em>width=0</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem.dragon"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem.dragon"title="Permalink to this definition">¶</a></dt>
<li><strong>replacement</strong> (<em>dict</em>) – Dictionary which contain replacement values (F->F+F-F-F+F)</li>
<li><strong>constants</strong> (<em>dict</em>) – Dictionary which contain all elements with there function</li>
<li><strong>nb_recursive</strong> (<em>int</em>) – Number of recursion</li>
<li><strong>color</strong> (<em>tuple</em>) – Color to use for the drawing</li>
<li><strong>width</strong> (<em>int</em>) – The line width, in pixels</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="method">
<dtid="main.Lsystem.forward">
<codeclass="descname">forward</code><spanclass="sig-paren">(</span><em>distance</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem.forward"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem.forward"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a lambda function which make pen forward of distance</p>
<codeclass="descname">fractal_binary_tree</code><spanclass="sig-paren">(</span><em>size</em>, <em>recursions</em>, <em>color=None</em>, <em>width=0</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem.fractal_binary_tree"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem.fractal_binary_tree"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>size</strong> (<em>float</em>) – Lenght of a segment</li>
<li><strong>recursions</strong> (<em>int</em>) – number of recursions</li>
<li><strong>color</strong> (<em>tuple</em>) – color of drawing</li>
<li><strong>width</strong> (<em>int</em>) – width of drawing</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="method">
<dtid="main.Lsystem.fractal_plant">
<codeclass="descname">fractal_plant</code><spanclass="sig-paren">(</span><em>size</em>, <em>recursions</em>, <em>color=None</em>, <em>width=0</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem.fractal_plant"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem.fractal_plant"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>size</strong> (<em>float</em>) – Lenght of a segment</li>
<li><strong>recursions</strong> (<em>int</em>) – number of recursions</li>
<li><strong>color</strong> (<em>tuple</em>) – color of drawing</li>
<li><strong>width</strong> (<em>int</em>) – width of drawing</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="method">
<dtid="main.Lsystem.koch_curve_right_angle">
<codeclass="descname">koch_curve_right_angle</code><spanclass="sig-paren">(</span><em>size</em>, <em>recursions</em>, <em>color=None</em>, <em>width=0</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem.koch_curve_right_angle"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem.koch_curve_right_angle"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">left</code><spanclass="sig-paren">(</span><em>angle</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem.left"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem.left"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a lambda function which make pen turning of angle radians to left</p>
<codeclass="descname">nothing</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem.nothing"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem.nothing"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">restore</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem.restore"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem.restore"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a lambda function which restore state of pen</p>
<codeclass="descname">right</code><spanclass="sig-paren">(</span><em>angle</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem.right"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem.right"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a lambda function which make pen turning of angle radians to right</p>
<codeclass="descname">save</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem.save"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem.save"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a lambda function which save state of pen</p>
<codeclass="descname">set_pos</code><spanclass="sig-paren">(</span><em>x</em>, <em>y</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem.set_pos"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem.set_pos"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>x</strong> (<em>float</em>) – x coordinate</li>
<li><strong>y</strong> (<em>float</em>) – y coordinate</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="method">
<dtid="main.Lsystem.sierpinski_triangle">
<codeclass="descname">sierpinski_triangle</code><spanclass="sig-paren">(</span><em>size</em>, <em>recursions</em>, <em>color=None</em>, <em>width=0</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/main.html#Lsystem.sierpinski_triangle"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.Lsystem.sierpinski_triangle"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="descclassname">main.</code><codeclass="descname">State</code><aclass="reference internal"href="_modules/main.html#State"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#main.State"title="Permalink to this definition">¶</a></dt>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.