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 |
Flags changes in the shape data |
|
|
The chord connecting the points of tangency on l and m. |
|
A line tangent to the curve. |
|
A line tangent to the curve. |
Methods from Conic
Conic |
|
Conic |
|
Conic |
|
Conic |
|
void |
|
this |
Sets the equation of the "k" line to ax + by + c = 0. |
this |
Sets the equation of the "l" line to ax + by + c = 0. |
this |
Sets the equation of the line "m" to ax + by + c = 0. |
this |
Flag the shape as dirty after you have modified the data directly. |
Public Properties
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.
Public Methods
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
Name | Type | Description |
---|---|---|
radius | number |
the radius of the circle |
Type | Description |
---|---|
Conic |
the conic shape |
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
Name | Type | Description |
---|---|---|
a | number |
major semi-axis length |
b | number |
minor semi-axis length |
Type | Description |
---|---|
Conic |
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
Name | Type | Description |
---|---|---|
a | number |
major semi-axis |
b | number |
minor semi-axis |
Type | Description |
---|---|
Conic |
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
Name | Type | Description |
---|---|---|
a | number |
distance of directrix, focus from the vertex of the parabola (0,0) |
Type | Description |
---|---|
Conic |
setControlPoints(c0: PIXI.Point, c1: PIXI.Point, c2: PIXI.Point) → {void}
Set control points in texture space
Name | Type | Description |
---|---|---|
c0 | PIXI.Point | |
c1 | PIXI.Point | |
c2 | PIXI.Point |
Type | Description |
---|---|
void |
setk(a: number, b: number, c: number) → {this}
Sets the equation of the "k" line to ax + by + c = 0.
Name | Type | Description |
---|---|---|
a | number | |
b | number | |
c | number |
Type | Description |
---|---|
this |
setl(a: number, b: number, c: number) → {this}
Sets the equation of the "l" line to ax + by + c = 0.
Name | Type | Description |
---|---|---|
a | number | |
b | number | |
c | number |
Type | Description |
---|---|
this |
setm(a: number, b: number, c: number) → {this}
Sets the equation of the line "m" to ax + by + c = 0.
Name | Type | Description |
---|---|---|
a | number | |
b | number | |
c | number |
Type | Description |
---|---|
this |
update() → {this}
Flag the shape as dirty after you have modified the data directly.
Type | Description |
---|---|
this |