cartbaryNT

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 1.1, Creation date: 2014-01-11, Last change: 2025-09-14

returns the 2D barycentric coordiantes of a VL relative to one facet

Description

Many geometrical calculations must be executed in 2D relatively to a given facet. Here, we use a Normalize Triangle PL0=[0 0;1 0;0 1] and calculate the barycentric coordinates relative to this triangle. The function barycartNT retransformates the barycentric coordinates back into the 3D Cartesian space.

See Also: barycartNT

Example Illustration

 missing image of cartbaryNT(dt,Fi,VL)

Syntax

[PL,inside,onedge,bottop,onplane]=cartbaryNT(dt,Fi,VL)

Input Parameter

dt: DelaunayTri object
Fi: Facet index to relate to
VL: Vertex list, the 2D barycentric coordianates are requested

Output Parameter

PL: Point list (2D) of barycentric coordinates
inside: inside of facet
onedge: on edge of facet (not in corner)
bottop: below(+1) or top (1) or on plane (0)
onplane: onplane

Examples

Transform a 3D vertex list into a 2D point list an back into a 3D vertex list
PL=cartbaryNT(dt,Fi,VL)
VL=barycartNT (dt,Fi,XPL)




Copyright 2014-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

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