VMdistancetoSG

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Surfaces
Introduced first in SolidGeometry 4.7, Creation date: 2019-07-29, Last change: 2025-09-14

Creates a Voxel model with distance values from the surface

Description

Same as GPLdistancetoCPL in 3D

See Also: GPLdistancetoCPL

Example Illustration

 missing image of VMdistancetoSG(SG,d,invert,frame)

Syntax

[VM,VMi]=VMdistancetoSG(SG,[d,invert,frame])

Input Parameter

SG: Solid Geometry
d: grid distance
invert: if true; SG walls get maximal values instead of minimal; default is true
frame: if true; A bounding box is used during calculation

Output Parameter

VM: Double Voxel Model for distance vectors
VMi: Logical Voxel Model for iswall

Examples


M=repmat(eye(5),[1 1 5]);
M=repmat(eye(50),[1 1 50]); VMdistancetoSG(M);
M=repmat(eye(50),[1 1 50]); VMdistancetoSG(M,'',false,true); VMM=ans;
SGfigure; view(-30,30); VMscatter(VMM(:,:,1:25));
VMdistancetoSG(SGsample(33));
VMdistancetoSG(SGsample(33),'',false);




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