Syntax
SG=SGof2Dfunc([ff,ax,res,D])
Input Parameter
ff : | | handle to the function; default is @sin |
ax : | | axis [xmin xmax ymin ymax]; default is [-10 10 -10 10] |
res : | | step size; default is max(dy,dy)/99; |
D : | | Socket height; default is '' ==> only surface |
Output Parameter
Examples
SGof2Dfunc(@cos,[-pi 2*pi -pi 3*pi],.1); SG=ans; % creates just the surface without thickness
SGofSurface(SG.VL,SG.FL,0.5) % creates a solid from the surface
SGof2Dfunc(@cos,[-pi 2*pi -pi 3*pi],.1,0) % creates a solid with no socket
SGof2Dfunc(@cos,[-pi 2*pi -pi 3*pi],.1,1) % creates a solid plus socket
zzz=@(x,y) x+y
SGof2Dfunc(zzz,[-pi 2*pi -pi 3*pi],.1,1) % creates a solid plus socket
SGof2Dfunc(str2func('@(x,y)x*x-y*y'),[-1 1 -1 1],.1,1) ;SS=ans; % creates a solid plus socket
view(0,90); viewsmooth(-30,30,200)
SGof2Dfunc(str2func('@(x,y)x*x-y*y'),[-1 1 -1 1],.01) ;SS=ans;
SGofSurface(SS,'',.3)
Copyright 2023-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