Mercurial > repos > public > sbplib
comparison +parametrization/old/triang_interp_pts.m @ 886:8894e9c49e40 feature/timesteppers
Merge with default for latest changes
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 15 Nov 2018 16:36:21 -0800 |
parents | 81e0ead29431 |
children |
comparison
equal
deleted
inserted
replaced
816:b5e5b195da1e | 886:8894e9c49e40 |
---|---|
1 % Creates a transfinite interpolation from connecting the four points wiht straight lines. | |
2 function [S, g1, g2, g3] = triang_interp_pts(p1,p2,p3) | |
3 if size(p1) ~= [2 1] | |
4 error('p1 is strange!'); | |
5 end | |
6 | |
7 g1 = @(t)(p1 + t*(p2-p1)); | |
8 g2 = @(t)(p2 + t*(p3-p2)); | |
9 g3 = @(t)(p3 + t*(p1-p3)); | |
10 | |
11 S = parametrization.triang_interp(g1,g2,g3); | |
12 end |