outsideplaneVL

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Geometric Queries
Introduced first in SolidGeometry 1.0, Creation date: 2012-08-03, Last change: 2025-09-14

returns whether a vertex/vertex list is below or above a 3P plane

Description

1 = below the plane spanned by three points p1, p2, p3
0 = in the plane spanned by three points p1, p2, p3
-1 = above the plane spanned by three points p1, p2, p3

See Also: outsidetriangleVL

Example Illustration

 missing image of outsideplaneVL(VL,p1,p2,p3)

Syntax

OL=outsideplaneVL(VL,p1,p2,p3)

Input Parameter

VL: Vertex list
p1: Point 1 of the plane
p2: Point 2 of the plane
p3: Point 3 of the plane

Output Parameter

OL: Outside List

Examples


outsideplaneVL ([3 3 0],[0 0 0],[0 10 0],[ 10 0 0 ])
outsideplaneVL ([3 3 -1],[0 0 0],[0 10 0],[ 10 0 0 ])
outsideplaneVL ([3 3 +1],[0 0 0],[0 10 0],[ 10 0 0 ])




Copyright 2012-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

This function, outsideplaneVL, determines the position of vertices relative to a plane defined by three points. It returns whether each vertex in a list is below, on, or above the plane.

Input Parameters

Output Results

Algorithm Steps

  1. Calculate the normal vector ez of the plane using the cross product of vectors (p2-p1) and (p3-p1).
  2. Determine the number of vertices n in the list VL.
  3. Initialize the output list OL as a zero vector of size n.
  4. For each vertex in VL:
    • Compute the dot product of the normal vector ez and the vector from p1 to the vertex.
    • Assign the sign of this dot product to the corresponding element in OL.

The function uses the cross product to find the normal vector of the plane and the dot product to determine the relative position of each vertex to the plane. The sign of the dot product indicates whether the vertex is below, on, or above the plane.

Algorithm explaination created using ChatGPT on 2025-08-19 00:09. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21