Home > matGeom > geom3d > drawPartialPatch.m

drawPartialPatch

PURPOSE ^

DRAWPARTIALPATCH Draw surface patch, with 2 parametrized surfaces.

SYNOPSIS ^

function drawPartialPatch(u, v, z, varargin)

DESCRIPTION ^

DRAWPARTIALPATCH Draw surface patch, with 2 parametrized surfaces.

   usage:
   drawSurfPatch(u, v, zuv)
   where u, v, and zuv are three matrices the same size, u and
   corresponding to each parameter, and zuv being equal to a function of u
   and v.

   drawSurfPatch(u, v, zuv, p0)
   If p0 is specified, two lines with u(p0(1)) and v(p0(2)) are drawn on
   the surface


   See also
     drawPolyline3d

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function drawPartialPatch(u, v, z, varargin)
0002 %DRAWPARTIALPATCH Draw surface patch, with 2 parametrized surfaces.
0003 %
0004 %   usage:
0005 %   drawSurfPatch(u, v, zuv)
0006 %   where u, v, and zuv are three matrices the same size, u and
0007 %   corresponding to each parameter, and zuv being equal to a function of u
0008 %   and v.
0009 %
0010 %   drawSurfPatch(u, v, zuv, p0)
0011 %   If p0 is specified, two lines with u(p0(1)) and v(p0(2)) are drawn on
0012 %   the surface
0013 %
0014 %
0015 %   See also
0016 %     drawPolyline3d
0017 %
0018 
0019 % ------
0020 % Author: David Legland
0021 % E-mail: david.legland@inrae.fr
0022 % Created: 2005-05-24
0023 % Copyright 2005-2024 INRA - TPV URPOI - BIA IMASTE
0024 
0025 % prepare figure
0026 hold on;
0027 
0028 % draw the surface interior
0029 surf(u, v, z, 'FaceColor', 'g', 'EdgeColor', 'none');
0030 
0031 % draw the surface boundaries
0032 drawPolyline3d(u(1,:), v(1,:), z(1,:))
0033 drawPolyline3d(u(end,:), v(end,:), z(end,:))
0034 drawPolyline3d(u(:,end), v(:,end), z(:,end))
0035 drawPolyline3d(u(:,1), v(:,1), z(:,1))
0036 
0037 % eventually draw two perpendicular lines on the surface
0038 if ~isempty(varargin)
0039     pos = varargin{1};
0040     drawPolyline3d(u(pos(1),:), v(pos(1),:), z(pos(1),:));
0041     drawPolyline3d(u(:,pos(2)), v(:,pos(2)), z(:,pos(2)));
0042 end

Generated on Thu 21-Nov-2024 11:30:22 by m2html © 2003-2022