Conic

class Conic

Describes a conic section or any quadric curve

A quadric curve can be represented in the form k2 - lm, where, k, l, m are linear functionals. l and m are two lines tangent to the curve, while k is the line connecting the two points of tangency.

Summary


Properties from Conic

number
_dirtyID = 0

Flags changes in the shape data

controlPoints
k

The chord connecting the points of tangency on l and m.

l

A line tangent to the curve.

m

A line tangent to the curve.

Methods from Conic

Conic
static createCircle(radius: number)
Conic
static createEllipse(a: number, b: number)
Conic
static createHyperbola(a: number, b: number)
Conic
static createParabola(a: number)
void
setControlPoints(c0: PIXI.Point, c1: PIXI.Point, c2: PIXI.Point)
this
setk(a: number, b: number, c: number)

Sets the equation of the "k" line to ax + by + c = 0.

this
setl(a: number, b: number, c: number)

Sets the equation of the "l" line to ax + by + c = 0.

this
setm(a: number, b: number, c: number)

Sets the equation of the line "m" to ax + by + c = 0.

this
update()

Flag the shape as dirty after you have modified the data directly.

Public Properties


_dirtyID Conic.ts:60
_dirtyID: number = 0

Flags changes in the shape data

controlPoints Conic.ts:48
controlPoints

The control points in design space. The control points allow you to map design space points to the local space points when creating a graphic.

By default, the conic is a quadratic bezier curve.

k Conic.ts:33
k

The chord connecting the points of tangency on l and m.

l Conic.ts:38
l

A line tangent to the curve.

m Conic.ts:43
m

A line tangent to the curve.

Public Methods


createCircle Conic.ts:143
static createCircle(radius: number) → {Conic}

Creates a circular conic of the given radius that is in the bounding box (0,0,2_r_,2_r_).

Implicit form: (x/√2 + y/√2 - r/√2)2 - xy = 0

Simplified form: (x - r)2 - (y - r)2 - r2 = 0

Parameters:
Name Type Description
radius number

the radius of the circle

Returns:
Type Description
Conic

the conic shape

createEllipse Conic.ts:167
static createEllipse(a: number, b: number) → {Conic}

Creates an ellipse with the given major & minor semi-axes that is located in the bounding box (0,0,2_a_,2_b_).

Implicit form: (x/a + y/b - 1)2 - 2_xy_/ab = 0

Simplified form: (x/a - 1)2 + (y/b - 1)2 - 1 = 0

Parameters:
Name Type Description
a number

major semi-axis length

b number

minor semi-axis length

Returns:
Type Description
Conic
createHyperbola Conic.ts:214
static createHyperbola(a: number, b: number) → {Conic}

Creates a hyperbola that opens up and down; since hyperbolas are not closed curves, they do not have a bounding box.

Implicit form: 12 - (y/b - x/a)(y/b + x/a) = 0

Simplified form: (y/b)2 - (x/a)2 = 1

Parameters:
Name Type Description
a number

major semi-axis

b number

minor semi-axis

Returns:
Type Description
Conic
createParabola Conic.ts:191
static createParabola(a: number) → {Conic}

Creates a parabola that opens upward (for a > 0); since parabolas are not closed curves, they do not have a bounding box.

The standard bezier curve is the parabola x2 - y, with the control points (0,0), (1/2,0), (1,1).

Equation: x2 - 4_ay_ = 0

Parameters:
Name Type Description
a number

distance of directrix, focus from the vertex of the parabola (0,0)

Returns:
Type Description
Conic
setControlPoints Conic.ts:120
setControlPoints(c0: PIXI.Point, c1: PIXI.Point, c2: PIXI.Point) → {void}

Set control points in texture space

Parameters:
Name Type Description
c0 PIXI.Point
c1 PIXI.Point
c2 PIXI.Point
Returns:
Type Description
void
setk Conic.ts:66
setk(a: number, b: number, c: number) → {this}

Sets the equation of the "k" line to ax + by + c = 0.

Parameters:
Name Type Description
a number
b number
c number
Returns:
Type Description
this
setl Conic.ts:84
setl(a: number, b: number, c: number) → {this}

Sets the equation of the "l" line to ax + by + c = 0.

Parameters:
Name Type Description
a number
b number
c number
Returns:
Type Description
this
setm Conic.ts:102
setm(a: number, b: number, c: number) → {this}

Sets the equation of the line "m" to ax + by + c = 0.

Parameters:
Name Type Description
a number
b number
c number
Returns:
Type Description
this
update Conic.ts:133
update() → {this}

Flag the shape as dirty after you have modified the data directly.

Returns:
Type Description
this

Powered by webdoc!