ProtoFlux:Line Circle Intersections

From Resonite Wiki
Revision as of 00:25, 30 June 2024 by Yosh (talk | contribs) (Add example looool)
Line Circle Intersections
Center
IntersectionCount
Radius
Intersection0
LinePoint0
Intersection1
LinePoint1
Math

The Line Circle Intersections node determines how many times a line defined by two points intersects a circle and where said intersections occur.

Inputs

Center (float2)

Center of the circle.

Radius (float)

Radius of the circle.

LinePoint0 (float2)

First point of the line.

LinePoint1 (float2)

Second point of the line.

Outputs

IntersectionCount (int)

The amount of intersections of the defined line and circle. This is at most two.

Intersection0 (float2)

The first point of intersection between the line and circle. This is the point that occurs "later" in the intersection when tracing the line from LinePoint0 to LinePoint1. If there does not exist any intersection, this value is [NaN; NaN].

Intersection1 (float2)

The second point of intersection between the line and circle. This is the point that occurs "earlier" in the intersection when tracing the line from LinePoint0 to LinePoint1. If there are fewer than two intersections, this value is [NaN; NaN].

Examples