Constructor
new Arc(center, radius, start_angle, end_angle)
Creates a new Arc object from a center point, radius, start angle, and end angle.
Name | Type | Description |
---|---|---|
center | Point2D | The center point of the arc as a Point2D. |
radius | number | The radius of the arc. |
start_angle | number | The start angle of the arc in radians. |
end_angle | number | The end angle of the arc in radians. |
- Source
Classes
Members
center
Returns the center point of the arc.
- Source
end_angle
Returns the end angle of the arc in radians.
- Source
radius
Returns the radius of the arc.
- Source
start_angle
Returns the start angle of the arc in radians.
- Source
Methods
both_tips_vector_object_builder(tip_shape, samplesopt) → {VectorObjectBuilder}
Returns a VectorObjectBuilder representing the arc and tips at both ends of the arc.
Name | Type | Attributes | Description |
---|---|---|---|
tip_shape | VectorObjectBuilder | The tip shape as a VectorObjectBuilder to add to the start of the arc. It must be pointing to the right and centered at (0, 0). This function will rotate and move it to the correct angle. | |
samples | number | | <optional> | The number of samples to use to create the arc. |
- Source
A VectorObjectBuilder representing the arc and tips at both ends of the arc.
- Type:
- VectorObjectBuilder
end_tip_vector_object_builder(tip_shape, samplesopt) → {VectorObjectBuilder}
Returns a VectorObjectBuilder representing the arc and a tip at the end of the arc.
Name | Type | Attributes | Description |
---|---|---|---|
tip_shape | VectorObjectBuilder | The tip shape as a VectorObjectBuilder to add to the end of the arc. It must be pointing to the right and centered at (0, 0). This function will rotate and move it to the correct angle. | |
samples | number | | <optional> | The number of samples to use to create the arc. |
- Source
A VectorObjectBuilder representing the arc and a tip at the end of the arc.
- Type:
- VectorObjectBuilder
length() → {number}
Returns the length of the arc.
- Source
The length of the arc.
- Type:
- number
point_at(t) → {Point2D}
Returns the point on the arc at a given t progress value.
Name | Type | Description |
---|---|---|
t | number | The t value to evaluate the polynomial at. A number between 0 and 1. |
- Source
The Point2D on the arc at the given t value.
- Type:
- Point2D
start_tip_vector_object_builder(tip_shape, samplesopt) → {VectorObjectBuilder}
Returns a VectorObjectBuilder representing the arc and a tip at the start of the arc.
Name | Type | Attributes | Description |
---|---|---|---|
tip_shape | VectorObjectBuilder | The tip shape as a VectorObjectBuilder to add to the start of the arc. It must be pointing to the right and centered at (0, 0). This function will rotate and move it to the correct angle. | |
samples | number | | <optional> | The number of samples to use to create the arc, by default 15. |
- Source
A VectorObjectBuilder representing the arc and a tip at the start of the arc.
- Type:
- VectorObjectBuilder
vector_object_builder(samplesopt) → {VectorObjectBuilder}
Creates a new vector object builder with the arc's points.
Name | Type | Attributes | Description |
---|---|---|---|
samples | number | | <optional> |
- Source
A VectorObjectBuilder representing the arc.
- Type:
- VectorObjectBuilder