ProtoFlux:Line Circle Intersections: Difference between revisions

From Resonite Wiki
Add example looool
Fixed node visual.
 
Line 1: Line 1:
{{#Invoke:ProtoFlux|GenerateUI
{{#Invoke:ProtoFlux|GenerateUI
|Name=Line Circle Intersections
|Name=Line Circle Intersections
|Category=Math
|Category=Geometry 2D
|Inputs=
|Inputs=
[
[

Latest revision as of 06:12, 30 June 2024

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