This file is indexed.

/usr/share/doc/libghc-diagrams-lib-doc/html/Diagrams-TwoD-Polygons.html is in libghc-diagrams-lib-doc 1.4.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Diagrams.TwoD.Polygons</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Diagrams-TwoD-Polygons.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Diagrams-TwoD-Polygons.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">diagrams-lib-1.4.2: Embedded domain-specific language for declarative graphics</p></div><div id="content"><div id="module-header"><table class="info"><tr><th valign="top">Copyright</th><td>(c) 2011 diagrams-lib team (see LICENSE)</td></tr><tr><th>License</th><td>BSD-style (see LICENSE)</td></tr><tr><th>Maintainer</th><td>diagrams-discuss@googlegroups.com</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Diagrams.TwoD.Polygons</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Polygons</a><ul><li><a href="#g:2">Generating polygon vertices</a></li></ul></li><li><a href="#g:3">Star polygons</a><ul><li><a href="#g:4">Function graphs</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module defines a general API for creating various types of
 polygons.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:PolyType">PolyType</a> n<ul class="subs"><li>= <a href="#v:PolyPolar">PolyPolar</a> [<a href="Diagrams-Angle.html#t:Angle">Angle</a> n] [n]</li><li>| <a href="#v:PolySides">PolySides</a> [<a href="Diagrams-Angle.html#t:Angle">Angle</a> n] [n]</li><li>| <a href="#v:PolyRegular">PolyRegular</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> n</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:PolyOrientation">PolyOrientation</a> n<ul class="subs"><li>= <a href="#v:NoOrient">NoOrient</a></li><li>| <a href="#v:OrientH">OrientH</a></li><li>| <a href="#v:OrientV">OrientV</a></li><li>| <a href="#v:OrientTo">OrientTo</a> (<a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n)</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:PolygonOpts">PolygonOpts</a> n = <a href="#v:PolygonOpts">PolygonOpts</a> {<ul class="subs"><li><a href="#v:_polyType">_polyType</a> :: <a href="Diagrams-TwoD-Polygons.html#t:PolyType">PolyType</a> n</li><li><a href="#v:_polyOrient">_polyOrient</a> :: <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n</li><li><a href="#v:_polyCenter">_polyCenter</a> :: <a href="Diagrams-Points.html#t:Point">Point</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n</li></ul>}</li><li class="src short"><a href="#v:polyType">polyType</a> :: <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Lens-39-">Lens'</a> (<a href="Diagrams-TwoD-Polygons.html#t:PolygonOpts">PolygonOpts</a> n) (<a href="Diagrams-TwoD-Polygons.html#t:PolyType">PolyType</a> n)</li><li class="src short"><a href="#v:polyOrient">polyOrient</a> :: <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Lens-39-">Lens'</a> (<a href="Diagrams-TwoD-Polygons.html#t:PolygonOpts">PolygonOpts</a> n) (<a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n)</li><li class="src short"><a href="#v:polyCenter">polyCenter</a> :: <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Lens-39-">Lens'</a> (<a href="Diagrams-TwoD-Polygons.html#t:PolygonOpts">PolygonOpts</a> n) (<a href="Diagrams-Points.html#t:Point">Point</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n)</li><li class="src short"><a href="#v:polygon">polygon</a> :: (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:InSpace">InSpace</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n t, <a href="Diagrams-TrailLike.html#t:TrailLike">TrailLike</a> t) =&gt; <a href="Diagrams-TwoD-Polygons.html#t:PolygonOpts">PolygonOpts</a> n -&gt; t</li><li class="src short"><a href="#v:polyTrail">polyTrail</a> :: <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n =&gt; <a href="Diagrams-TwoD-Polygons.html#t:PolygonOpts">PolygonOpts</a> n -&gt; <a href="Diagrams-Located.html#t:Located">Located</a> (<a href="Diagrams-Trail.html#t:Trail">Trail</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n)</li><li class="src short"><a href="#v:polyPolarTrail">polyPolarTrail</a> :: <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n =&gt; [<a href="Diagrams-Angle.html#t:Angle">Angle</a> n] -&gt; [n] -&gt; <a href="Diagrams-Located.html#t:Located">Located</a> (<a href="Diagrams-Trail.html#t:Trail">Trail</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n)</li><li class="src short"><a href="#v:polySidesTrail">polySidesTrail</a> :: <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n =&gt; [<a href="Diagrams-Angle.html#t:Angle">Angle</a> n] -&gt; [n] -&gt; <a href="Diagrams-Located.html#t:Located">Located</a> (<a href="Diagrams-Trail.html#t:Trail">Trail</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n)</li><li class="src short"><a href="#v:polyRegularTrail">polyRegularTrail</a> :: <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; n -&gt; <a href="Diagrams-Located.html#t:Located">Located</a> (<a href="Diagrams-Trail.html#t:Trail">Trail</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n)</li><li class="src short"><a href="#v:orient">orient</a> :: <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n =&gt; <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n -&gt; <a href="Diagrams-Located.html#t:Located">Located</a> (<a href="Diagrams-Trail.html#t:Trail">Trail</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n) -&gt; <a href="Diagrams-Transform.html#t:Transformation">Transformation</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n</li><li class="src short"><span class="keyword">data</span> <a href="#t:StarOpts">StarOpts</a><ul class="subs"><li>= <a href="#v:StarFun">StarFun</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>)</li><li>| <a href="#v:StarSkip">StarSkip</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></li></ul></li><li class="src short"><a href="#v:star">star</a> :: <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n =&gt; <a href="Diagrams-TwoD-Polygons.html#t:StarOpts">StarOpts</a> -&gt; [<a href="Diagrams-Points.html#t:Point">Point</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n] -&gt; <a href="Diagrams-Path.html#t:Path">Path</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n</li><li class="src short"><span class="keyword">data</span> <a href="#t:GraphPart">GraphPart</a> a<ul class="subs"><li>= <a href="#v:Cycle">Cycle</a> [a]</li><li>| <a href="#v:Hair">Hair</a> [a]</li></ul></li><li class="src short"><a href="#v:orbits">orbits</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; [<a href="Diagrams-TwoD-Polygons.html#t:GraphPart">GraphPart</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>]</li><li class="src short"><a href="#v:mkGraph">mkGraph</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>) -&gt; [a] -&gt; [<a href="Diagrams-TwoD-Polygons.html#t:GraphPart">GraphPart</a> a]</li></ul></div><div id="interface"><h1 id="g:1">Polygons</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:PolyType" class="def">PolyType</a> n <a href="src/Diagrams-TwoD-Polygons.html#PolyType" class="link">Source</a> <a href="#t:PolyType" class="selflink">#</a></p><div class="doc"><p>Method used to determine the vertices of a polygon.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:PolyPolar" class="def">PolyPolar</a> [<a href="Diagrams-Angle.html#t:Angle">Angle</a> n] [n]</td><td class="doc"><p>A &quot;polar&quot; polygon.</p><ul><li>The first argument is a list of <em>central</em>
     <em>angles</em> from each vertex to the next.</li><li>The second argument is a list of <em>radii</em> from
     the origin to each successive vertex.</li></ul><p>To construct an <em>n</em>-gon, use a list of <em>n-1</em>
   angles and <em>n</em> radii.  Extra angles or radii
   are ignored.</p><p>Cyclic polygons (with all vertices lying on a
   circle) can be constructed using a second
   argument of <code>(repeat r)</code>.</p></td></tr><tr><td class="src"><a id="v:PolySides" class="def">PolySides</a> [<a href="Diagrams-Angle.html#t:Angle">Angle</a> n] [n]</td><td class="doc"><p>A polygon determined by the distance between
   successive vertices and the external angles formed
   by each three successive vertices. In other
   words, a polygon specified by &quot;turtle
   graphics&quot;: go straight ahead x1 units; turn by
   external angle a1; go straight ahead x2 units; turn by
   external angle a2; etc. The polygon will be centered
   at the <em>centroid</em> of its vertices.</p><ul><li>The first argument is a list of <em>vertex</em>
     <em>angles</em>, giving the external angle at each vertex
     from the previous vertex to the next.  The
     first angle in the list is the external angle at
     the <em>second</em> vertex; the first edge always starts
     out heading in the positive y direction from
     the first vertex.</li><li>The second argument is a list of distances
     between successive vertices.</li></ul><p>To construct an <em>n</em>-gon, use a list of <em>n-2</em>
   angles and <em>n-1</em> edge lengths.  Extra angles or
   lengths are ignored.</p></td></tr><tr><td class="src"><a id="v:PolyRegular" class="def">PolyRegular</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> n</td><td class="doc"><p>A regular polygon with the given number of
   sides (first argument) and the given radius
   (second argument).</p></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:PolyOrientation" class="def">PolyOrientation</a> n <a href="src/Diagrams-TwoD-Polygons.html#PolyOrientation" class="link">Source</a> <a href="#t:PolyOrientation" class="selflink">#</a></p><div class="doc"><p>Determine how a polygon should be oriented.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:NoOrient" class="def">NoOrient</a></td><td class="doc"><p>No special orientation; the first
   vertex will be at (1,0).</p></td></tr><tr><td class="src"><a id="v:OrientH" class="def">OrientH</a></td><td class="doc"><p>Orient <em>horizontally</em>, so the
   bottommost edge is parallel to
   the x-axis.
   This is the default.</p></td></tr><tr><td class="src"><a id="v:OrientV" class="def">OrientV</a></td><td class="doc"><p>Orient <em>vertically</em>, so the
   leftmost edge is parallel to the
   y-axis.</p></td></tr><tr><td class="src"><a id="v:OrientTo" class="def">OrientTo</a> (<a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n)</td><td class="doc"><p>Orient so some edge is
   <em>facing</em> <em>in</em> <em>the</em> <em>direction</em>
   <em>of</em>, that is, perpendicular
   to, the given vector.</p></td></tr></table></div><div class="subs instances"><p id="control.i:PolyOrientation" class="caption collapser" onclick="toggleSection('i:PolyOrientation')">Instances</p><div id="section.i:PolyOrientation" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PolyOrientation:Eq:1" class="instance expander" onclick="toggleSection('i:id:PolyOrientation:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> n =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n)</span> <a href="src/Diagrams-TwoD-Polygons.html#line-140" class="link">Source</a> <a href="#t:PolyOrientation" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:PolyOrientation:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PolyOrientation:Ord:2" class="instance expander" onclick="toggleSection('i:id:PolyOrientation:Ord:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> n =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> (<a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n)</span> <a href="src/Diagrams-TwoD-Polygons.html#line-140" class="link">Source</a> <a href="#t:PolyOrientation" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:PolyOrientation:Ord:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n <a href="#v:min" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PolyOrientation:Read:3" class="instance expander" onclick="toggleSection('i:id:PolyOrientation:Read:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Read.html#t:Read">Read</a> n =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Read.html#t:Read">Read</a> (<a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n)</span> <a href="src/Diagrams-TwoD-Polygons.html#line-140" class="link">Source</a> <a href="#t:PolyOrientation" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:PolyOrientation:Read:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> (<a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n) <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [<a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n] <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> (<a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n) <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n] <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PolyOrientation:Show:4" class="instance expander" onclick="toggleSection('i:id:PolyOrientation:Show:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> n =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> (<a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n)</span> <a href="src/Diagrams-TwoD-Polygons.html#line-140" class="link">Source</a> <a href="#t:PolyOrientation" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:PolyOrientation:Show:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:PolygonOpts" class="def">PolygonOpts</a> n <a href="src/Diagrams-TwoD-Polygons.html#PolygonOpts" class="link">Source</a> <a href="#t:PolygonOpts" class="selflink">#</a></p><div class="doc"><p>Options for specifying a polygon.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:PolygonOpts" class="def">PolygonOpts</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:_polyType" class="def">_polyType</a> :: <a href="Diagrams-TwoD-Polygons.html#t:PolyType">PolyType</a> n</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:_polyOrient" class="def">_polyOrient</a> :: <a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:_polyCenter" class="def">_polyCenter</a> :: <a href="Diagrams-Points.html#t:Point">Point</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:PolygonOpts" class="caption collapser" onclick="toggleSection('i:PolygonOpts')">Instances</p><div id="section.i:PolygonOpts" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:PolygonOpts:Default:1" class="instance expander" onclick="toggleSection('i:id:PolygonOpts:Default:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> n =&gt; <a href="file:///usr/share/doc/libghc-data-default-class-doc/html/Data-Default-Class.html#t:Default">Default</a> (<a href="Diagrams-TwoD-Polygons.html#t:PolygonOpts">PolygonOpts</a> n)</span> <a href="src/Diagrams-TwoD-Polygons.html#line-164" class="link">Source</a> <a href="#t:PolygonOpts" class="selflink">#</a></td><td class="doc"><p>The default polygon is a regular pentagon of radius 1, centered
   at the origin, aligned to the x-axis.</p></td></tr><tr><td colspan="2"><div id="section.i:id:PolygonOpts:Default:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:def">def</a> :: <a href="Diagrams-TwoD-Polygons.html#t:PolygonOpts">PolygonOpts</a> n <a href="#v:def" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:polyType" class="def">polyType</a> :: <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Lens-39-">Lens'</a> (<a href="Diagrams-TwoD-Polygons.html#t:PolygonOpts">PolygonOpts</a> n) (<a href="Diagrams-TwoD-Polygons.html#t:PolyType">PolyType</a> n) <a href="src/Diagrams-TwoD-Polygons.html#polyType" class="link">Source</a> <a href="#v:polyType" class="selflink">#</a></p><div class="doc"><p>Specification for the polygon's vertices.</p></div></div><div class="top"><p class="src"><a id="v:polyOrient" class="def">polyOrient</a> :: <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Lens-39-">Lens'</a> (<a href="Diagrams-TwoD-Polygons.html#t:PolygonOpts">PolygonOpts</a> n) (<a href="Diagrams-TwoD-Polygons.html#t:PolyOrientation">PolyOrientation</a> n) <a href="src/Diagrams-TwoD-Polygons.html#polyOrient" class="link">Source</a> <a href="#v:polyOrient" class="selflink">#</a></p><div class="doc"><p>Should a rotation be applied to the polygon in order to orient it in a
   particular way?</p></div></div><div class="top"><p class="src"><a id="v:polyCenter" class="def">polyCenter</a> :: <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Lens-39-">Lens'</a> (<a href="Diagrams-TwoD-Polygons.html#t:PolygonOpts">PolygonOpts</a> n) (<a href="Diagrams-Points.html#t:Point">Point</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n) <a href="src/Diagrams-TwoD-Polygons.html#polyCenter" class="link">Source</a> <a href="#v:polyCenter" class="selflink">#</a></p><div class="doc"><p>Should a translation be applied to the polygon in order to place the center
   at a particular location?</p></div></div><div class="top"><p class="src"><a id="v:polygon" class="def">polygon</a> :: (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:InSpace">InSpace</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n t, <a href="Diagrams-TrailLike.html#t:TrailLike">TrailLike</a> t) =&gt; <a href="Diagrams-TwoD-Polygons.html#t:PolygonOpts">PolygonOpts</a> n -&gt; t <a href="src/Diagrams-TwoD-Polygons.html#polygon" class="link">Source</a> <a href="#v:polygon" class="selflink">#</a></p><div class="doc"><p>Generate the polygon described by the given options.</p></div></div><div class="top"><p class="src"><a id="v:polyTrail" class="def">polyTrail</a> :: <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n =&gt; <a href="Diagrams-TwoD-Polygons.html#t:PolygonOpts">PolygonOpts</a> n -&gt; <a href="Diagrams-Located.html#t:Located">Located</a> (<a href="Diagrams-Trail.html#t:Trail">Trail</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n) <a href="src/Diagrams-TwoD-Polygons.html#polyTrail" class="link">Source</a> <a href="#v:polyTrail" class="selflink">#</a></p><div class="doc"><p>Generate a polygon.  See <code><a href="Diagrams-TwoD-Polygons.html#t:PolygonOpts">PolygonOpts</a></code> for more information.</p></div></div><h2 id="g:2">Generating polygon vertices</h2><div class="top"><p class="src"><a id="v:polyPolarTrail" class="def">polyPolarTrail</a> :: <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n =&gt; [<a href="Diagrams-Angle.html#t:Angle">Angle</a> n] -&gt; [n] -&gt; <a href="Diagrams-Located.html#t:Located">Located</a> (<a href="Diagrams-Trail.html#t:Trail">Trail</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n) <a href="src/Diagrams-TwoD-Polygons.html#polyPolarTrail" class="link">Source</a> <a href="#v:polyPolarTrail" class="selflink">#</a></p><div class="doc"><p>Generate the located trail of a polygon specified by polar data
   (central angles and radii). See <code><a href="Diagrams-TwoD-Polygons.html#v:PolyPolar">PolyPolar</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:polySidesTrail" class="def">polySidesTrail</a> :: <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n =&gt; [<a href="Diagrams-Angle.html#t:Angle">Angle</a> n] -&gt; [n] -&gt; <a href="Diagrams-Located.html#t:Located">Located</a> (<a href="Diagrams-Trail.html#t:Trail">Trail</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n) <a href="src/Diagrams-TwoD-Polygons.html#polySidesTrail" class="link">Source</a> <a href="#v:polySidesTrail" class="selflink">#</a></p><div class="doc"><p>Generate the vertices of a polygon specified by side length and
   angles, and a starting point for the trail such that the origin
   is at the centroid of the vertices.  See <code><a href="Diagrams-TwoD-Polygons.html#v:PolySides">PolySides</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:polyRegularTrail" class="def">polyRegularTrail</a> :: <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; n -&gt; <a href="Diagrams-Located.html#t:Located">Located</a> (<a href="Diagrams-Trail.html#t:Trail">Trail</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n) <a href="src/Diagrams-TwoD-Polygons.html#polyRegularTrail" class="link">Source</a> <a href="#v:polyRegularTrail" class="selflink">#</a></p><div class="doc"><p>Generate the vertices of a regular polygon.  See <code><a href="Diagrams-TwoD-Polygons.html#v:PolyRegular">PolyRegular</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:orient" class="def">orient</a> :: <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n =&gt; <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n -&gt; <a href="Diagrams-Located.html#t:Located">Located</a> (<a href="Diagrams-Trail.html#t:Trail">Trail</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n) -&gt; <a href="Diagrams-Transform.html#t:Transformation">Transformation</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n <a href="src/Diagrams-TwoD-Polygons.html#orient" class="link">Source</a> <a href="#v:orient" class="selflink">#</a></p><div class="doc"><p>Generate a transformation to orient a trail.  <code>orient v t</code>
   generates the smallest rotation such that one of the segments
   adjacent to the vertex furthest in the direction of <code>v</code> is
   perpendicular to <code>v</code>.</p></div></div><h1 id="g:3">Star polygons</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:StarOpts" class="def">StarOpts</a> <a href="src/Diagrams-TwoD-Polygons.html#StarOpts" class="link">Source</a> <a href="#t:StarOpts" class="selflink">#</a></p><div class="doc"><p>Options for creating &quot;star&quot; polygons, where the edges connect
   possibly non-adjacent vertices.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:StarFun" class="def">StarFun</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>)</td><td class="doc"><p>Specify the order in which the vertices should be
   connected by a function that maps each vertex
   index to the index of the vertex that should come
   next.  Indexing of vertices begins at 0.</p></td></tr><tr><td class="src"><a id="v:StarSkip" class="def">StarSkip</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Specify a star polygon by a &quot;skip&quot;.  A skip of
   1 indicates a normal polygon, where edges go
   between successive vertices.  A skip of 2 means
   that edges will connect every second vertex,
   skipping one in between.  Generally, a skip of
   <em>n</em> means that edges will connect every <em>n</em>th
   vertex.</p></td></tr></table></div></div><div class="top"><p class="src"><a id="v:star" class="def">star</a> :: <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n =&gt; <a href="Diagrams-TwoD-Polygons.html#t:StarOpts">StarOpts</a> -&gt; [<a href="Diagrams-Points.html#t:Point">Point</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n] -&gt; <a href="Diagrams-Path.html#t:Path">Path</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n <a href="src/Diagrams-TwoD-Polygons.html#star" class="link">Source</a> <a href="#v:star" class="selflink">#</a></p><div class="doc"><p>Create a generalized <em>star</em> <em>polygon</em>.  The <code><a href="Diagrams-TwoD-Polygons.html#t:StarOpts">StarOpts</a></code> are used
   to determine in which order the given vertices should be
   connected.  The intention is that the second argument of type
   <code>[Point v]</code> could be generated by a call to <code><a href="Diagrams-TwoD-Polygons.html#v:polygon">polygon</a></code>, <code>regPoly</code>, or
   the like, since a list of vertices is <code><a href="Diagrams-TrailLike.html#t:TrailLike">TrailLike</a></code>.  But of course
   the list can be generated any way you like.  A <code><code><a href="Diagrams-Path.html#t:Path">Path</a></code> <code>v</code></code> is
   returned (instead of any <code><a href="Diagrams-TrailLike.html#t:TrailLike">TrailLike</a></code>) because the resulting path
   may have more than one component, for example if the vertices are
   to be connected in several disjoint cycles.</p></div></div><h2 id="g:4">Function graphs</h2><div class="doc"><p>These functions are used to implement <code><a href="Diagrams-TwoD-Polygons.html#v:star">star</a></code>, but are exported on
 the offchance that someone else finds them useful.</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:GraphPart" class="def">GraphPart</a> a <a href="src/Diagrams-TwoD-Polygons.html#GraphPart" class="link">Source</a> <a href="#t:GraphPart" class="selflink">#</a></p><div class="doc"><p>Pieces of a function graph can either be cycles or &quot;hairs&quot;.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Cycle" class="def">Cycle</a> [a]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:Hair" class="def">Hair</a> [a]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:GraphPart" class="caption collapser" onclick="toggleSection('i:GraphPart')">Instances</p><div id="section.i:GraphPart" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:GraphPart:Functor:1" class="instance expander" onclick="toggleSection('i:id:GraphPart:Functor:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> <a href="Diagrams-TwoD-Polygons.html#t:GraphPart">GraphPart</a></span> <a href="src/Diagrams-TwoD-Polygons.html#line-259" class="link">Source</a> <a href="#t:GraphPart" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:GraphPart:Functor:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fmap">fmap</a> :: (a -&gt; b) -&gt; <a href="Diagrams-TwoD-Polygons.html#t:GraphPart">GraphPart</a> a -&gt; <a href="Diagrams-TwoD-Polygons.html#t:GraphPart">GraphPart</a> b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(&lt;$)</a> :: a -&gt; <a href="Diagrams-TwoD-Polygons.html#t:GraphPart">GraphPart</a> b -&gt; <a href="Diagrams-TwoD-Polygons.html#t:GraphPart">GraphPart</a> a <a href="#v:-60--36-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:GraphPart:Show:2" class="instance expander" onclick="toggleSection('i:id:GraphPart:Show:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> (<a href="Diagrams-TwoD-Polygons.html#t:GraphPart">GraphPart</a> a)</span> <a href="src/Diagrams-TwoD-Polygons.html#line-259" class="link">Source</a> <a href="#t:GraphPart" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:GraphPart:Show:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Diagrams-TwoD-Polygons.html#t:GraphPart">GraphPart</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Diagrams-TwoD-Polygons.html#t:GraphPart">GraphPart</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Diagrams-TwoD-Polygons.html#t:GraphPart">GraphPart</a> a] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:orbits" class="def">orbits</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; [<a href="Diagrams-TwoD-Polygons.html#t:GraphPart">GraphPart</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>] <a href="src/Diagrams-TwoD-Polygons.html#orbits" class="link">Source</a> <a href="#v:orbits" class="selflink">#</a></p><div class="doc"><p><code>orbits f n</code> computes the graph of <code>f</code> on the integers mod <code>n</code>.</p></div></div><div class="top"><p class="src"><a id="v:mkGraph" class="def">mkGraph</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>) -&gt; [a] -&gt; [<a href="Diagrams-TwoD-Polygons.html#t:GraphPart">GraphPart</a> a] <a href="src/Diagrams-TwoD-Polygons.html#mkGraph" class="link">Source</a> <a href="#v:mkGraph" class="selflink">#</a></p><div class="doc"><p>Generate a function graph from the given function and labels.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>