Math.Geometry


Arc 2D

Builders

Arc2D.from (Point2D.meters 1. 3.) (Point2D.meters 5. 7.) (Angle.degrees 30.)
Arc2D.withCenterPoint (Point2D.meters 5. 5.) (Length.meters 3.) (Angle.degrees 30.) (Angle.degrees 120.)
Arc2D.sweptAround (Point2D.meters 0. 0.) (Angle.degrees 180.) (Point2D.meters 5. 0.)
Arc2D.throughPoints (Point2D.meters 5. 0.) (Point2D.meters 3. 0.) (Point2D.meters -5. 0.)
Arc2D.withRadius (Length.meters 5.) SweptAngle.largePositive (Point2D.meters 5. 0.) (Point2D.meters -5. 0.)
Arc2D.withSweptAngle (Point2D.meters 0. 0.) (Length.meters 5.) Angle.zero (Angle.degrees 180.)

Accessors

For showing what the different accessors will return, the following arc will be used.

let arc: Arc2D<Meters, Cartesian> =
    Arc2D.from (Point2D.meters 1. 3.) (Point2D.meters 5. 7.) (Angle.degrees 30.)
Arc2D.centerPoint arc
No value returned by any evaluator
Arc2D.radius arc
No value returned by any evaluator
Arc2D.sweptAngle arc
No value returned by any evaluator
Arc2D.pointOn arc 0.3
No value returned by any evaluator
Arc2D.startPoint arc
No value returned by any evaluator
Arc2D.midpoint arc
No value returned by any evaluator
Arc2D.endPoint arc
No value returned by any evaluator
Arc2D.boundingBox arc
No value returned by any evaluator
Arc2D.firstDerivative arc 0.8
No value returned by any evaluator

Modifiers

Arc2D.reverse
Arc2D.scaleAbout
Arc2D.rotateAround
Arc2D.translateBy
Arc2D.translateIn
Arc2D.mirrorAcross
Arc2D.relativeTo
Arc2D.placeIn

Non-Degenerative

Arc2D.nondegenerate arc
No value returned by any evaluator
Arc2D.fromNondegenerate nondegenerate
Arc2D.tangentDirection nondegenerate 0.2
No value returned by any evaluator
Arc2D.sample nondegenerate 0.4
No value returned by any evaluator
namespace Math
namespace Math.Geometry
namespace Math.Units
Multiple items
union case Cartesian.Cartesian: Cartesian

--------------------
type Cartesian = | Cartesian
Multiple items
module Arc2D from Math.Geometry

--------------------
type Arc2D<'Units,'Coordinates> = { StartPoint: Point2D<'Units,'Coordinates> XDirection: Direction2D<'Coordinates> SignedLength: Quantity<'Units> SweptAngle: Angle } interface IGeometry<'Coordinates> override Equals : obj:obj -> bool override GetHashCode : unit -> int
val from : givenStartPoint:Point2D<'Units,'Coordinates> -> givenEndPoint:Point2D<'Units,'Coordinates> -> givenSweptAngle:Angle -> Arc2D<'Units,'Coordinates>
<summary> Construct an arc with from the first given point to the second, with the </summary>
Multiple items
module Point2D from Math.Geometry

--------------------
[<Struct>] type Point2D<'Units,'Coordinates> = { X: Quantity<'Units> Y: Quantity<'Units> } interface IComparable interface IComparable<Point2D<'Units,'Coordinates>> interface IGeometry<'Coordinates> member Comparison : other:Point2D<'Units,'Coordinates> -> int override Equals : obj:obj -> bool + 1 overload override GetHashCode : unit -> int member LessThan : other:Point2D<'Units,'Coordinates> -> bool static member ( * ) : lhs:Point2D<'Units,'Coordinates> * rhs:float -> Point2D<'Units,'Coordinates> + 1 overload static member ( + ) : lhs:Point2D<'Units,'Coordinates> * rhs:Vector2D<'Units,'Coordinates> -> Point2D<'Units,'Coordinates> static member ( - ) : lhs:Point2D<'Units,'Coordinates> * rhs:Point2D<'Units,'Coordinates> -> Vector2D<'Units,'Coordinates> + 1 overload ...
val meters : x:float -> y:float -> Point2D<Meters,'Coordinates>
Multiple items
module Angle from Math.Units
<category>Module: Unit System</category>
<summary> An <c>Angle</c> represents an angle in degrees, radians, or turns. It is stored as a number of radians. </summary>
<note> Angles are sometimes measured in degrees, minutes, and seconds, where 1 minute = 1/60th of a degree and 1 second = 1/60th of a minute. </note>
<example> You can construct an angle from your unit scheme. All of the following are equivalent. <code> Angle.radians Math.PI Angle.degrees 180. Angle.turns 0.5 </code></example>


--------------------
type Angle = Quantity<Radians>
<category>Unit System</category>
val degrees : d:float -> Angle
<category>Degrees</category>
Create an angle from a number of degrees.
val withCenterPoint : centerPoint:Point2D<'Units,'Coordinates> -> radius:Quantity<'Units> -> startAngle:Angle -> sweptAngle:Angle -> Arc2D<'Units,'Coordinates>
<summary> Construct an arc with the given center point, radius, start angle and swept </summary>
Multiple items
module Length from Math.Units
<category>Module: Unit System</category>
<summary> A <c>Length</c> represents a length in meters, feet, centimeters, miles etc. It is stored as a number of meters. </summary>


--------------------
type Length = Quantity<Meters>
<category>Unit System</category>
val meters : m:float -> Length
<category index="2">Metric</category>
val sweptAround : givenCenterPoint:Point2D<'Units,'Coordinates> -> givenSweptAngle:Angle -> givenStartPoint:Point2D<'Units,'Coordinates> -> Arc2D<'Units,'Coordinates>
<summary> Construct an arc by sweeping (rotating) a given start point around a given center point by a given angle. The center point to sweep around is given first and the start point to be swept is given last. A positive swept angle means that the arc is formed by rotating the start point counterclockwise around the center point. A negative swept angle results in a clockwise arc instead. </summary>
val throughPoints : first:Point2D<'Units,'Coordinates> -> second:Point2D<'Units,'Coordinates> -> third:Point2D<'Units,'Coordinates> -> Arc2D<'Units,'Coordinates> option
<summary> Attempt to construct an arc that starts at the first given point, passes through the second given point and ends at the third given point: </summary>
val withRadius : radius:Quantity<'Units> -> sweptAngle:SweptAngle -> startPoint:Point2D<'Units,'Coordinates> -> endPoint:Point2D<'Units,'Coordinates> -> Arc2D<'Units,'Coordinates> option
Multiple items
module SweptAngle from Math.Geometry

--------------------
type SweptAngle = | SmallPositive | SmallNegative | LargePositive | LargeNegative
val largePositive : SweptAngle
<summary> Construct a counterclockwise arc with a swept angle between 180 and 360 degrees. </summary>
val withSweptAngle : center:Point2D<'Units,'Coordinates> -> radius:Quantity<'Units> -> startAngle:Angle -> sweptAngle:Angle -> Arc2D<'Units,'Coordinates>
<summary> Construct an arc with the given center point, radius, start angle and swept </summary>
property Quantity.zero: Quantity<'Units> with get
<category>Constants</category>
<summary> A generic zero value. This can be treated as a quantity in any units type, similar to how <c>None</c> can be treated as any kind of <c>Option</c> type and <c>[]</c> can be treated as any kind of <c>List</c>. </summary>
val arc : Arc2D<Meters,Cartesian>
Multiple items
union case Meters.Meters: Meters

--------------------
type Meters = | Meters
<category>Unit</category>
val centerPoint : arc:Arc2D<'Units,'Coordinates> -> Point2D<'Units,'Coordinates>
val radius : arc:Arc2D<'Units,'Coordinates> -> Quantity<'Units>
<summary> Get the radius of an arc. </summary>
val sweptAngle : arc:Arc2D<'Units,'Coordinates> -> Angle
<summary> Get the swept angle of an arc. The result will be positive for a </summary>
val pointOn : arc:Arc2D<'Units,'Coordinates> -> parameterValue:float -> Point2D<'Units,'Coordinates>
<summary> Get the point along an arc at a given parameter value. </summary>
val startPoint : arc:Arc2D<'Units,'Coordinates> -> Point2D<'Units,'Coordinates>
<summary> Get the start point of an arc. </summary>
val midpoint : arc:Arc2D<'Units,'Coordinates> -> Point2D<'Units,'Coordinates>
val endPoint : arc:Arc2D<'Units,'Coordinates> -> Point2D<'Units,'Coordinates>
val boundingBox : givenArc:Arc2D<'Units,'Coordinates> -> BoundingBox2D<'Units,'Coordinates>
<summary> Get a bounding box for a given arc. </summary>
val firstDerivative : arc:Arc2D<'Units,'Coordinates> -> parameterValue:float -> Vector2D<'Units,'Coordinates>
<summary> Get the first derivative of an arc at a given parameter value. </summary>
val reverse : arc:Arc2D<'Units,'Coordinates> -> Arc2D<'Units,'Coordinates>
<summary> Reverse the direction of an arc, so that the start point becomes the end point and vice versa. </summary>
val scaleAbout : point:Point2D<'Units,'Coordinates> -> scale:float -> arc:Arc2D<'Units,'Coordinates> -> Arc2D<'Units,'Coordinates>
<summary> Scale an arc about a given point by a given scale. </summary>
val rotateAround : point:Point2D<'Units,'Coordinates> -> angle:Angle -> arc:Arc2D<'Units,'Coordinates> -> Arc2D<'Units,'Coordinates>
<summary> Rotate an arc around a given point by a given angle. </summary>
val translateBy : displacement:Vector2D<'Units,'Coordinates> -> arc:Arc2D<'Units,'Coordinates> -> Arc2D<'Units,'Coordinates>
<summary> Translate an arc by a given displacement. </summary>
val translateIn : direction:Direction2D<'Coordinates> -> distance:Quantity<'Units> -> arc:Arc2D<'Units,'Coordinates> -> Arc2D<'Units,'Coordinates>
<summary> Translate an arc in a given direction by a given distance. </summary>
val mirrorAcross : axis:Axis2D<'Units,'Coordinates> -> arc:Arc2D<'Units,'Coordinates> -> Arc2D<'Units,'Coordinates>
<summary> Mirror an arc across a given axis. This negates the sign of the arc's swept angle. </summary>
val relativeTo : frame:Frame2D<'Units,'GlobalCoordinates,'LocalCoordinates> -> arc:Arc2D<'Units,'GlobalCoordinates> -> Arc2D<'Units,'LocalCoordinates>
<summary> Take an arc defined in global coordinates, and return it expressed in local coordinates relative to a given reference frame. </summary>
val placeIn : frame:Frame2D<'Units,'GlobalCoordinates,'LocalCoordinates> -> arc:Arc2D<'Units,'LocalCoordinates> -> Arc2D<'Units,'GlobalCoordinates>
<summary> Take an arc considered to be defined in local coordinates relative to a given reference frame, and return that arc expressed in global coordinates. </summary>
val nondegenerate : Arc2D<Meters,Cartesian>
val nondegenerate : arc:Arc2D<'Units,'Coordinates> -> Result<Nondegenerate<'Units,'Coordinates>,Point2D<'Units,'Coordinates>>
<summary> Attempt to construct a non-degenerate arc from a general `Arc2d`. If the arc is in fact degenerate (consists of a single point), returns an `Err` with that point. </summary>
val fromNondegenerate : arc:Nondegenerate<'Units,'Coordinates> -> Arc2D<'Units,'Coordinates>
<summary> Convert a nondegenerate arc back to a general `Arc2d`. </summary>
val tangentDirection : arc:Nondegenerate<'Units,'Coordinates> -> parameterValue:float -> Direction2D<'Coordinates>
<summary> Get the tangent direction to a nondegenerate arc at a given parameter </summary>
val sample : nondegenerateArc:Nondegenerate<'Units,'Coordinates> -> parameterValue:float -> Point2D<'Units,'Coordinates> * Direction2D<'Coordinates>
<summary> Get both the point and tangent direction of a nondegenerate arc at a given parameter value. </summary>