Mercurial > repos > public > sbplib
changeset 1126:465fc81e12e8 feature/poroelastic
Copy-paste improved Curve class from feature/laplace_curvilinear_test
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Mon, 13 May 2019 10:18:55 -0700 |
parents | 0eef5c8ccb88 |
children | d9da4c1cdaa0 |
files | +parametrization/Curve.m |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/+parametrization/Curve.m Sat May 11 19:19:09 2019 -0700 +++ b/+parametrization/Curve.m Mon May 13 10:18:55 2019 -0700 @@ -103,7 +103,10 @@ % Construct arcLength function using splines tvec = linspace(0,1,N); arcVec = obj.arcLength(0,tvec); - tFunc = spline(arcVec,tvec); % t as a function of arcLength + + % t as a function of arcLength. Monotonicity-preserving cubic splines. + tFunc = @(arcLen) pchip(arcVec,tvec,arcLen); + L = obj.arcLength(0,1); arcPar = @(s) tFunc(s*L); @@ -349,8 +352,6 @@ end end - - function g_norm = normalize(g0) g1 = g0(1,:); g2 = g0(2,:);