diff +parametrization/Ti.m @ 544:433ccb5d2f0f feature/grids

Add Ti parametrization of rectangle
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 21 Aug 2017 11:20:00 +0200
parents 875386d0b2ff
children d98d9c79573f
line wrap: on
line diff
--- a/+parametrization/Ti.m	Tue Aug 15 12:57:36 2017 +0200
+++ b/+parametrization/Ti.m	Mon Aug 21 11:20:00 2017 +0200
@@ -182,6 +182,15 @@
             obj = parametrization.Ti(g1,g2,g3,g4);
         end
 
+        function obj = rectangle(a, b)
+            p1 = a;
+            p2 = [b(1), a(2)];
+            p3 = b;
+            p4 = [a(1), b(2)];
+
+            obj = parametrization.Ti.points(p1,p2,p3,p4);
+        end
+
         % Like the constructor but allows inputing line curves as 2-cell arrays:
         %     example: parametrization.Ti.linesAndCurves(g1, g2, {a, b} g4)
         function obj = linesAndCurves(C1, C2, C3, C4)