User Tools

Site Tools


visual3d:documentation:pipeline:expressions:intersection_functions

Intersection Functions

This page contains a list of all functions that find point, line, and plane intersections.


Line-Line Intersect

Line_Line_Intersect(line1, line2, line3, line4, tolerance)

vector1 is defined by vertices line1 and line2 vector2 is defined by vertices line3 and line4 two vectors in 3D space rarely intersect precisely. tolerance is the maximum distance at the closest point of the two vectors that will be labeled an intersection the default value of the tolerance=0.01

Line Plane Intersect

Line_Plane_Intersect(line1, line2, plane1, plane2, plane3)

Line1 and line 2 define the vector Plane1, Plane2, and Plane3 define the plane Line_Plane_Intersect(line1, line2, plane) Line1 and line 2 define the vector Plane defines the plane (for example, a best_fit_plane)

Project Point On Plane

Project_Point_On_Plane(plane, point).

Project a point onto a plane. The resulting plane is defined by 4 components]

Point Distance To Plane

Point_Distance_To_Plane(plane, point).

Compute perpendicular distance from a point to a plane. The resulting plane is defined by 4 components]

Point Distance To Line

Point_Distance_To_Line(point_on_vector, vector, point).

Compute perpendicular distance from a point to a line.

Is Point Inside Polygon

Is_Point_Inside_Polygon(Point1, Vertex1, Vertex2, Vertex3, …)


Is a Point inside a planar polygon comprised of any number of vertices?

Example: Create a polygon comprising 4 vertices, check to see if a point is inside the Polygon

Metric_Explicit /RESULT_METRIC_FOLDER=VERTEX /RESULT_METRIC_NAME=V1 /METRIC_VALUE=VECTOR(0,0,0) ; Metric_Explicit /RESULT_METRIC_FOLDER=VERTEX /RESULT_METRIC_NAME=V2 /METRIC_VALUE=VECTOR(1,0,0) ; Metric_Explicit /RESULT_METRIC_FOLDER=VERTEX /RESULT_METRIC_NAME=V3 /METRIC_VALUE=VECTOR(1,1,0) ; Metric_Explicit /RESULT_METRIC_FOLDER=VERTEX /RESULT_METRIC_NAME=V4 /METRIC_VALUE=VECTOR(0,1,0) ; Evaluate_Expression /EXPRESSION=Is_Point_Inside_Polygon( VECTOR(0.5,0.5,0), METRIC::VERTEX::V1, METRIC::VERTEX::V2, METRIC::VERTEX::V3, METRIC::VERTEX::V4 ) /SIGNAL_TYPES= /SIGNAL_FOLDER= /SIGNAL_NAMES= /RESULT_TYPES=METRIC /RESULT_FOLDERS=POLYGON /RESULT_NAME=TEST_IN ! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE ; Expression Result : 1.000000 Evaluate_Expression /EXPRESSION=Is_Point_Inside_Polygon( VECTOR(0.5,0.5,0.5), METRIC::VERTEX::V1, METRIC::VERTEX::V2, METRIC::VERTEX::V3, METRIC::VERTEX::V4 ) /SIGNAL_TYPES= /SIGNAL_FOLDER= /SIGNAL_NAMES= /RESULT_TYPES=METRIC /RESULT_FOLDERS=POLYGON /RESULT_NAME=TEST_IN ! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE ; Expression Result : 0.000000

visual3d/documentation/pipeline/expressions/intersection_functions.txt · Last modified: 2024/07/17 15:45 by sgranger