SURFACECURVATURE Curvature on a surface from angle and principal curvatures. usage: KAPPA = surfaceCurvature(KAPPA1, KAPPA2, THETA) return the curvature KAPPA of surface with respect to direction THETA.
0001 function kappa = surfaceCurvature(kappa1, kappa2, theta) 0002 %SURFACECURVATURE Curvature on a surface from angle and principal curvatures. 0003 % 0004 % usage: 0005 % KAPPA = surfaceCurvature(KAPPA1, KAPPA2, THETA) 0006 % return the curvature KAPPA of surface with respect to direction THETA. 0007 0008 % KAPPA1 and KAPPA2 are the principal curvatures of the surface at the 0009 % considered point. THETA is angle of direction relative to angle of 0010 % first principal curvature KAPPA1. 0011 % 0012 % Examples: 0013 % K = surfaceCurvature(KAPPA1, KAPPA2, 0) returns KAPPA1. 0014 % K = surfaceCurvature(KAPPA1, KAPPA2, pi/2) returns KAPPA2. 0015 % 0016 0017 % ------ 0018 % Author: David Legland 0019 % E-mail: david.legland@inrae.fr 0020 % Created: 2004-04-07 0021 % Copyright 2004-2024 INRA - TPV URPOI - BIA IMASTE 0022 0023 kappa = kappa1 * cos(theta).^2 + kappa2 * sin(theta).^2;