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
-
An example of the Line Circle Intersections node, where a circle centered at
(0,0)
and radius1
intersects with a line defined by the points(0,2)
and(0,0)
at the points(0,-1)
and(0,1)
.