21.01.2015 Views

COMSOL Multiphysics™

COMSOL Multiphysics™

COMSOL Multiphysics™

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

geomspline<br />

p agree to within 1000*eps in Euclidean distance. Otherwise, an open curve is<br />

generated.<br />

On success, c is a curve2 or curve3 object that passes through the points defined<br />

by p. If p does not define a spline curve properly, either an error occurs or a line1,<br />

curve2, curve3, or circ1 object is created that meets the requirements in some<br />

way.<br />

Example<br />

See Also<br />

% Interpolate irregularly distributed point on a circle.<br />

% First create circle data<br />

phi=0:0.2:2*pi; phi(end)=[];<br />

% Remove some of the points.<br />

phi([1 3 6 7 10 20 21 25 28])=[];<br />

p=[cos(phi);sin(phi)];<br />

% Add some noise.<br />

randn('state',17)<br />

p=p+0.05*randn(size(p));<br />

plot(p(1,:),p(2,:),'r.')<br />

% Interpolate using uniform parameterization.<br />

c=geomspline(p,'splinemethod','uniform','closed','on')<br />

hold on<br />

geomplot(c,'pointmode','off')<br />

% Interpolate using centripetal parameterization.<br />

c=geomspline(p,'splinemethod','centripetal','closed','on')<br />

hold on<br />

geomplot(c,'pointmode','off','edgecolor','b')<br />

axis equal<br />

curve2, curve3<br />

239

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!