2D SDFs
sdf_circle(co, radius)
Circle defined by its radius.
| Parameters: |
|
|---|
| Returns: |
|
|---|
sdf_box_2d(co, size)
Rectangle defined by its side lengths.
| Parameters: |
|
|---|
| Returns: |
|
|---|
sdf_segment_2d(co, a, b)
Line segment defined by its end points.
| Parameters: |
|
|---|
| Returns: |
|
|---|
sdf_rounded_box_2d(co, size, rounding)
Rectangle defined by its side lengths.
| Parameters: |
|
|---|
| Returns: |
|
|---|
sdf_triangle_2d(co, p0, p1, p2)
Triangle defined by the three vertices.
| Parameters: |
|
|---|
| Returns: |
|
|---|
sdf_arc(co, radius, start_angle, end_angle)
Arc defined by the radius and the angles of both ends.
| Parameters: |
|
|---|
| Returns: |
|
|---|
sdf_sector(co, radius, angle_1, angle_2)
Sector defined by the radius of the circle and two angles.
| Parameters: |
|
|---|
| Returns: |
|
|---|
sdf_inf_sector(co, angle_1, angle_2)
Sector of infinite radius defined by two angles.
| Parameters: |
|
|---|
| Returns: |
|
|---|
sdf_ngon(co, radius, n)
N-sided regular polygon, defined by the outer radius and the number of sides.
| Parameters: |
|
|---|
| Returns: |
|
|---|
sdf_segmented_line_2d(co, points)
Segmented line connecting the provided points.
| Parameters: |
|
|---|
| Returns: |
|
|---|
sdf_closed_segmented_line_2d(co, points)
Closed segmented line connecting the provided points.
| Parameters: |
|
|---|
| Returns: |
|
|---|
sdf_polygon_2d(co, points)
Convex polygon with vertices at the provided coordinate points.
| Parameters: |
|
|---|
| Returns: |
|
|---|
check_convex_all(vs)
Checks if a polygon is convex.
| Parameters: |
|
|---|
Returns: Convexity of each vertex.
interior_convex(co, points)
Partitions the coordinate system into the interior (-1) and exterior (+1) of a convex polygon.
| Parameters: |
|
|---|
Returns: Map of the interior and exterior of the polygon (N,).