Constructor
new Triangle(a, b, c)
Create a triangle.
Parameters:
Name | Type | Description |
---|---|---|
a |
Vector | |
b |
Vector | |
c |
Vector |
- Source:
Classes
Methods
getCentroid() → {Vector}
Find the centroid of a Triangle.
- Source:
Returns:
- The centroid of the Triangle.
- Type
- Vector
getMidpoints() → {Array.<Vector>}
Find the midpoints of a Triangle.
- Source:
Returns:
- An array of Vectors of midpoints of the Triangle edges.
- Type
- Array.<Vector>
lines() → {Array.<Line>}
Create an array of Lines containing a line for each side of the Triangle.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options.stroke |
string |
<optional> |
|
options.strokeWidth |
number |
<optional> |
- Source:
Returns:
- Type
- Array.<Line>