annotate +grid/old/triang_interp_pts.m @ 105:1df4f3704b76
feature/arclen-param
Added error checking for all methods that use the derivative gp. Removed that from the to do list. Updated some comments.
author |
Martin Almquist <martin.almquist@it.uu.se> |
date |
Mon, 07 Dec 2015 18:51:41 +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
|