<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Circle (geoml.Geoml__.Circle)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> â€“ <a href="../../index.html">geoml</a> &#x00BB; <a href="../index.html">Geoml__</a> &#x00BB; Circle</nav><h1>Module <code>Geoml__.Circle</code></h1></header><aside><p>Circle manipulation</p></aside><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code><code> = <span class="keyword">private</span> </code><code>{</code><table class="record"><tr id="type-t.center" class="anchored"><td class="def field"><a href="#type-t.center" class="anchor"></a><code>center : <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a>;</code></td></tr><tr id="type-t.radius" class="anchored"><td class="def field"><a href="#type-t.radius" class="anchor"></a><code>radius : float;</code></td></tr></table><code>}</code></dt></dl><dl><dt class="spec value" id="val-make"><a href="#val-make" class="anchor"></a><code><span class="keyword">val</span> make : <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> <span>&#45;&gt;</span> float <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-center"><a href="#val-center" class="anchor"></a><code><span class="keyword">val</span> center : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a></code></dt><dt class="spec value" id="val-radius"><a href="#val-radius" class="anchor"></a><code><span class="keyword">val</span> radius : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> float</code></dt><dt class="spec value" id="val-translate"><a href="#val-translate" class="anchor"></a><code><span class="keyword">val</span> translate : float <span>&#45;&gt;</span> float <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-reflection"><a href="#val-reflection" class="anchor"></a><code><span class="keyword">val</span> reflection : <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-rotate"><a href="#val-rotate" class="anchor"></a><code><span class="keyword">val</span> rotate : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> <span>&#45;&gt;</span> float <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>radian rotation. <code>rotate c p f</code> returns the rotated circle of <code>c</code> with <code>p</code> as rotation center and <code>f</code> a angle in radian</p></dd></dl><dl><dt class="spec value" id="val-rotate_angle"><a href="#val-rotate_angle" class="anchor"></a><code><span class="keyword">val</span> rotate_angle : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> <span>&#45;&gt;</span> float <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Same as rotate but the angle is given in degree</p></dd></dl><dl><dt class="spec value" id="val-contains"><a href="#val-contains" class="anchor"></a><code><span class="keyword">val</span> contains : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-area"><a href="#val-area" class="anchor"></a><code><span class="keyword">val</span> area : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> float</code></dt><dt class="spec value" id="val-perimeter"><a href="#val-perimeter" class="anchor"></a><code><span class="keyword">val</span> perimeter : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> float</code></dt><dt class="spec value" id="val-proj_x"><a href="#val-proj_x" class="anchor"></a><code><span class="keyword">val</span> proj_x : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> float * float</code></dt><dt class="spec value" id="val-proj_y"><a href="#val-proj_y" class="anchor"></a><code><span class="keyword">val</span> proj_y : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> float * float</code></dt><dt class="spec value" id="val-tangent"><a href="#val-tangent" class="anchor"></a><code><span class="keyword">val</span> tangent : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> <span>&#45;&gt;</span> <a href="../../Geoml/Line/index.html#type-t">Geoml.Line.t</a></code></dt><dd><p>tangent c p returns the tangent of circle c going through point p. p must lie on c's boundary, otherwise behaviour is unspecified</p></dd></dl><dl><dt class="spec value" id="val-intersects"><a href="#val-intersects" class="anchor"></a><code><span class="keyword">val</span> intersects : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-intersection"><a href="#val-intersection" class="anchor"></a><code><span class="keyword">val</span> intersection : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span><a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> list</span></code></dt><dd><p>returns the list of intersection points of two circle. It can be:</p><ul><li><code></code> when the circles dont intersect</li><li><code>p</code> when the circles are tangent in p</li><li><code>a;b</code> when the circles intersect, a and b are the intersection points</li></ul></dd></dl><dl><dt class="spec value" id="val-intersect_line"><a href="#val-intersect_line" class="anchor"></a><code><span class="keyword">val</span> intersect_line : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../Geoml/Line/index.html#type-t">Geoml.Line.t</a> <span>&#45;&gt;</span> <span><a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> list</span></code></dt><dd><p>same as intersection but with a circle and a line</p></dd></dl><dl><dt class="spec value" id="val-segment_intersection"><a href="#val-segment_intersection" class="anchor"></a><code><span class="keyword">val</span> segment_intersection : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../Geoml/Segment/index.html#type-t">Geoml.Segment.t</a> <span>&#45;&gt;</span> <span><a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> list</span></code></dt><dd><p>same as intersection but with a circle and a segment</p></dd></dl><dl><dt class="spec value" id="val-circumscribed"><a href="#val-circumscribed" class="anchor"></a><code><span class="keyword">val</span> circumscribed : <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> <span>&#45;&gt;</span> <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> <span>&#45;&gt;</span> <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>returns the circumscribed cirle of the triangle defined by the three points</p></dd></dl><dl><dt class="spec value" id="val-incircle"><a href="#val-incircle" class="anchor"></a><code><span class="keyword">val</span> incircle : <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> <span>&#45;&gt;</span> <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> <span>&#45;&gt;</span> <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>returns the incirle of the triangle defined by the three points</p></dd></dl><dl><dt class="spec value" id="val-of_diameter"><a href="#val-of_diameter" class="anchor"></a><code><span class="keyword">val</span> of_diameter : <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> <span>&#45;&gt;</span> <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>of_diameter a b builds the circle with ab as diameter</p></dd></dl><dl><dt class="spec value" id="val-bounding"><a href="#val-bounding" class="anchor"></a><code><span class="keyword">val</span> bounding : <span><a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a> list</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>given a list of point, returns the smallest circle that contains all the points of the list, using emo welzl's algorithm. complexity in expected linear time</p></dd></dl><dl><dt class="spec value" id="val-random_point"><a href="#val-random_point" class="anchor"></a><code><span class="keyword">val</span> random_point : Stdlib.Random.State.t <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a></code></dt><dd><p>returns a randomly and uniformly chosen point that lies inside the circle</p></dd></dl><dl><dt class="spec value" id="val-random_point_perimeter"><a href="#val-random_point_perimeter" class="anchor"></a><code><span class="keyword">val</span> random_point_perimeter : Stdlib.Random.State.t <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../../Geoml/Point/index.html#type-t">Geoml.Point.t</a></code></dt><dd><p>returns a randomly and uniformly chosen point that lies on the permieter of the circle</p></dd></dl><dl><dt class="spec value" id="val-print"><a href="#val-print" class="anchor"></a><code><span class="keyword">val</span> print : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>printer</p></dd></dl></div></body></html>