Mercurial > repos > public > sbplib
view +draw/prompt_bezier.m @ 884:7d4f57725192 feature/poroelastic
Add a getBoundaryOperator method in multiblock.DiffOp that uses the the diffop get_boundary_operator method rather than its properties. Werpers might not like this.
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Fri, 02 Nov 2018 10:47:03 -0700 |
parents | 875386d0b2ff |
children |
line wrap: on
line source
function [C,h] = prompt_bezier(s,varargin) default_arg('s',[]) if ~isempty(s) fprintf(s,varargin{:}); end fprintf('# Draw bezier curve\n') a = draw.prompt_point('Enter starting point\n'); p = draw.point(a); p.Color = Color.green; p.MarkerSize = 24; b = draw.prompt_point('Enter stopping point\n'); p = draw.point(b); p.Color = Color.red; p.MarkerSize = 24; c1 = draw.prompt_point('Enter control point 1\n'); p = draw.point(c1); p.Color = Color.yellow; p.MarkerSize = 16; c2 = draw.prompt_point('Enter control point 2\n'); p = draw.point(c2); p.Color = Color.yellow; p.MarkerSize = 16; C = parametrization.Curve.bezier(a,c1,c2,b); fprintf('C = parametrization.Curve.bezier([%.3g; %.3g],[%.3g; %.3g],[%.3g; %.3g],[%.3g; %.3g]);\n',a,c1,c2,b) h = C.plot(); uistack(h,'bottom'); end