Geomatplot is a Matlab interactive plot library that is not unlike Geogebra.
- Interactive geometry library
- Efficient update through the dependency graph
- User defined callback functions for programming
- Easy to use
- Image Processing Toolbox
- Mapping Toolbox (for intersection)
clf; Geomatplot; ylim([-0.4 0.6])
A = Point([0 0]); % draggable point, automatically labelled A
B = Point([1 0]); % automatic labels are applied if no label is given
C = Point([.7 .5]);
Segment({A,B},'b'); % a blue segment from A and B
Segment({B,C},'b');
Segment({C,A},'b');
Midpoint('S',{A,B,C}); % Barycenter of triangle labelled S
Circle({A,B,C},'m--'); % Magenta dashed circumcircle of the triangle
PerpendicularBisector({A,B},':');
PerpendicularBisector({B,C},':');
PerpendicularBisector({C,A},':');
AngleBisector({A,B,C},':');
AngleBisector({B,C,A},':');
AngleBisector({C,A,B},':');clf; g = Geomatplot;
b0 = Point('b0',[0.1 0.2],'r'); % draggable control points
b1 = Point('b1',[0.7 0.9],'r'); % with given labels
b2 = Point('b2',[0.9 0.2],'r');
c1 = Point('c1',[-.5 0],'k','MarkerSize',5); % adjustable corner
c2 = Point('c2',[1.5 1],'k','MarkerSize',5); % for the image
% parametric callback with t in [0,1] and dependent variables:
bt = @(t,b0,b1,b2) b0.*(1-t).^2 + 2*b1.*t.*(1-t) + b2.*t.^2;
Curve(bt,{b0,b1,b2},'r'); % A red quadratic Bézier curve
Image(@dist2bezier,{b0,b1,b2},c1,c2); colorbar;
% where 'dist2bezier' is a (x,y,b0,b1,b2) -> real function>> disp(g)
Geomatplot with 5 movable and 2 dependent plots:
label : type mean pos | labels : callback
'b0' : mpoint [0.10 0.20] | :
'b1' : mpoint [0.70 0.90] | :
'b2' : mpoint [0.90 0.20] | :
'c1' : mpoint [-0.50 0.00] | :
'c2' : mpoint [1.50 1.00] | :
'a' : dcurve [0.57 0.43] | b0,b1,b2 : @(t,b0,b1,b2)b0.*(1-t).^2+2*b1.*t.*(1-t)+b2.*t.^2
'A' : dimage [0.50 0.50] | b0,b1,b2 : bezdist
Methods, Events, Superclasses

