Options
All
• Public
• Public/Protected
• All
classdesc

requires

SVGSerializable

requires

UID

requires

UIDGenerator

requires

Vertex

• VEllipse

## Constructors

### constructor

• The constructor.

name

VEllipse

#### Parameters

• ##### center: Vertex

The ellipses center.

• ##### axis: Vertex

The x- and y-axis (the two radii encoded in a control point).

• ##### Optional rotation: number

[optional, default=0] The rotation of this ellipse.

## Properties

axis: Vertex
member

{Vertex}

memberof

VEllipse

instance

### center

center: Vertex
member

{Vertex}

memberof

VEllipse

instance

className: string = "VEllipse"

Required to generate proper CSS classes and other class related IDs.

### rotation

rotation: number
member

{number}

memberof

VEllipse

instance

uid: UID

The UID of this drawable object.

member

{UID}

memberof

VEllipse

instance

## Methods

### clone

• Clone this ellipse (deep clone).

#### Returns VEllipse

A copy of this ellipse.s

### getEquidistantVertices

• getEquidistantVertices(pointCount: number): Array<Vertex>
• Get equally distributed points on the outline of this ellipse.

#### Parameters

• ##### pointCount: number

The number of points.

### getFoci

• Get the two foci of this ellipse.

method

getFoci

instance
memberof

VEllipse

#### Returns [Vertex, Vertex]

An array with two elements, the two focal points of the ellipse (foci).

### normalAt

• normalAt(angle: number, length?: number): Vector
• Get the normal vector at the given angle. The normal vector is the vector that intersects the ellipse in a 90 degree angle at the given point (speicified by the given angle).

Length of desired normal vector can be specified, default is 1.0.

method

normalAt

instance
memberof

VEllipse

#### Parameters

• ##### angle: number

The angle to get the normal vector at.

• ##### Optional length: number

[optional, default=1] The length of the returned vector.

### perimeter

• perimeter(): number
• Get the perimeter of this ellipse.

method

perimeter

instance
memberof

VEllipse

#### Returns number

• Get the non-negative horizonal radius of this ellipse.

method

instance
memberof

VEllipse

#### Returns number

The unsigned horizontal radius of this ellipse.

• Get the non-negative vertical radius of this ellipse.

method

instance
memberof

VEllipse

#### Returns number

The unsigned vertical radius of this ellipse.

### rotate

• Rotate this ellipse around its center.

method

rotate

instance
memberof

VEllipse

#### Parameters

• ##### angle: number

The angle to rotate by.

#### Returns VEllipse

this for chaining.

### scale

• Scale this ellipse by the given factor from the center point. The factor will be applied to both radii.

method

scale

instance
memberof

VEllipse

#### Parameters

• ##### factor: number

The factor to scale by.

#### Returns VEllipse

this for chaining.

• Get the signed horizonal radius of this ellipse.

method

instance
memberof

VEllipse

#### Returns number

The signed horizontal radius of this ellipse.

• Get the signed vertical radius of this ellipse.

method

instance
memberof

VEllipse

#### Returns number

The signed vertical radius of this ellipse.

### tangentAt

• tangentAt(angle: number, length?: number): Vector
• Get the tangent vector at the given angle. The tangent vector is the vector that touches the ellipse exactly at the given given point (speicified by the given angle).

Note that the tangent is just 90 degree rotated normal vector.

Length of desired tangent vector can be specified, default is 1.0.

method

tangentAt

instance
memberof

VEllipse

#### Parameters

• ##### angle: number

The angle to get the tangent vector at.

• ##### Optional length: number

[optional, default=1] The length of the returned vector.

### toCubicBezier

• toCubicBezier(quarterSegmentCount?: number, threshold?: number): Array<CubicBezierCurve>
• Convert this ellipse into cubic Bézier curves.

#### Parameters

• ##### Optional quarterSegmentCount: number

The number of segments per base elliptic quarter (default is 3, min is 1).

• ##### Optional threshold: number

The Bézier threshold (default value 0.666666 approximates the ellipse with best results but you might wish to use other values)

#### Returns Array<CubicBezierCurve>

An array of cubic Bézier curves representing this ellipse.

### toSVGString

• toSVGString(options: { className?: string }): string
• Create an SVG representation of this ellipse.

deprecated

#### Returns string

string The SVG string

### vertAt

• vertAt(angle: number): Vertex
• Get the vertex on the ellipse's outline at the given angle.

method

vertAt

instance
memberof

VEllipse

#### Parameters

• ##### angle: number

The angle to determine the vertex at.

#### Returns Vertex

The vertex on the outline at the given angle.

## Object literals

### Static utils

utils: object

A static collection of ellipse-related helper functions.

static

### equidistantVertAngles

• Get n equidistant points on the elliptic arc.

### phiToTheta

• Get the `theta` for a given `phi` (used to determine equidistant points on ellipse).

theta

### polarToCartesian

• polarToCartesian(centerX: number, centerY: number, radiusH: number, radiusV: number, angle: number): XYCoords
• Calculate a particular point on the outline of the given ellipse (center plus two radii plus angle).

name

polarToCartesian

reutn

{XYCoords} The outlont point in absolute x-y-coordinates.

#### Parameters

• ##### centerX: number

The x coordinate of the elliptic center.

• ##### centerY: number

The y coordinate of the elliptic center.

The horizontal radius of the ellipse.

The vertical radius of the ellipse.

• ##### angle: number

The angle (in radians) to get the desired outline point for.

## Legend

• Constructor
• Property
• Method
• Property
• Method
• Inherited property
• Inherited method
• Private property
• Private method
• Static property
• Static method

Generated using TypeDoc
{"ft_lang_label":"__label__en","ft_lang_prob":0.74698573,"math_prob":0.7179276,"size":2802,"snap":"2021-21-2021-25","text_gpt3_token_len":600,"char_repetition_ratio":0.21408148,"word_repetition_ratio":0.16557734,"special_character_ratio":0.203783,"punctuation_ratio":0.11235955,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9942168,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-05-12T16:27:03Z\",\"WARC-Record-ID\":\"<urn:uuid:e1f880fd-5664-4709-a999-acb00c8d3a24>\",\"Content-Length\":\"209648\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:e43be031-013a-4691-814c-b905e26d1c77>\",\"WARC-Concurrent-To\":\"<urn:uuid:35925458-cae5-4676-94c3-3be7a417da79>\",\"WARC-IP-Address\":\"138.201.190.176\",\"WARC-Target-URI\":\"https://plotboilerplate.io/docs_typedoc/classes/vellipse.html\",\"WARC-Payload-Digest\":\"sha1:NUZEW7DFY22WLFVQK7KCHVIXUSSJQG6P\",\"WARC-Block-Digest\":\"sha1:I6VH4MYF7YDZSMU3CCVIOCDUV2RRGCEK\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-21/CC-MAIN-2021-21_segments_1620243989766.27_warc_CC-MAIN-20210512162538-20210512192538-00278.warc.gz\"}"}