annotate +grid/old/triang_interp_pts.m @ 409:42c4f0b545d6
feature/SBPInTimeGauss
Remove m as input to implementation function. Fix error message for invalid m to D1Gauss
author |
Jonatan Werpers <jonatan@werpers.com> |
date |
Tue, 07 Feb 2017 13:49:46 +0100 |
parents |
48b6fb693025 |
children |
|
rev |
line source |
0
|
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 = grid.triang_interp(g1,g2,g3);
|
|
12 end
|