Mercurial > repos > public > sbplib
diff +parametrization/old/triang_interp_pts.m @ 151:3a3cf386bb7e feature/grids
Moved Curves and Tis from package grid to package parametrization.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 21 Dec 2015 15:09:32 +0100 |
parents | +grid/old/triang_interp_pts.m@48b6fb693025 |
children | 81e0ead29431 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/+parametrization/old/triang_interp_pts.m Mon Dec 21 15:09:32 2015 +0100 @@ -0,0 +1,12 @@ +% Creates a transfinite interpolation from connecting the four points wiht straight lines. +function [S, g1, g2, g3] = triang_interp_pts(p1,p2,p3) + if size(p1) ~= [2 1] + error('p1 is strange!'); + end + + g1 = @(t)(p1 + t*(p2-p1)); + g2 = @(t)(p2 + t*(p3-p2)); + g3 = @(t)(p3 + t*(p1-p3)); + + S = grid.triang_interp(g1,g2,g3); +end