ProtoFlux:Line Circle Intersections

From Resonite Wiki
Line Circle Intersections
Center
IntersectionCount
Radius
Intersection0
LinePoint0
Intersection1
LinePoint1
Geometry 2D

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