Home > matGeom > geom3d > fillSphericalPolygon.m

fillSphericalPolygon

PURPOSE ^

FILLSPHERICALPOLYGON Fill a spherical polygon.

SYNOPSIS ^

function varargout = fillSphericalPolygon(sphere, poly, germ)

DESCRIPTION ^

FILLSPHERICALPOLYGON  Fill a spherical polygon.

   fillSphericalPolygon(SPHERE, POLY, GERM)


   Example
   fillSphericalPolygon

   See also
   drawSphericalPolygon, fillSphericalTriangle, drawSphere

 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2012-02-09,    using Matlab 7.9.0.529 (R2009b)
 Copyright 2012 INRA - Cepia Software Platform.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function varargout = fillSphericalPolygon(sphere, poly, germ)
0002 %FILLSPHERICALPOLYGON  Fill a spherical polygon.
0003 %
0004 %   fillSphericalPolygon(SPHERE, POLY, GERM)
0005 %
0006 %
0007 %   Example
0008 %   fillSphericalPolygon
0009 %
0010 %   See also
0011 %   drawSphericalPolygon, fillSphericalTriangle, drawSphere
0012 %
0013 % ------
0014 % Author: David Legland
0015 % e-mail: david.legland@grignon.inra.fr
0016 % Created: 2012-02-09,    using Matlab 7.9.0.529 (R2009b)
0017 % Copyright 2012 INRA - Cepia Software Platform.
0018 
0019 nv = size(poly, 1);
0020 
0021 h = zeros(nv, 1);
0022 for i = 1:nv
0023     v1 = poly(i, :);
0024     v2 = poly(mod(i, nv) + 1, :);
0025 
0026     h(i) = fillSphericalTriangle(sphere, germ, v1, v2);
0027 end
0028 
0029 
0030 if nargout > 0
0031     varargout = {h};
0032 end

Generated on Wed 16-Feb-2022 15:10:47 by m2html © 2003-2019