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 />

Purpose<br />

geomspline<br />

Spline interpolation.<br />

Syntax<br />

Description<br />

c = geomspline(p,...)<br />

c = geomspline(p,...) creates a curve2 or curve3 object from point data p by<br />

spline interpolation. The object generated is a closed or open, C 1 or C 2 continuous,<br />

spline.<br />

p is a 2-by-np (in 2D) or 3-by-np (in 3D) matrix that specifies interpolation points.<br />

The function geomspline accepts the following property/value pairs:<br />

TABLE 1-69: VALID PROPERTY/VALUE PAIRS<br />

PROPERTY NAME PROPERTY VALUE DEFAULT DESCRIPTION<br />

Closed auto | on | off auto Closed or open curve<br />

SplineDir 2-by-np matrix<br />

3-by-np matrix<br />

SplineMethod uniform |<br />

chordlength |<br />

centripetal |<br />

foley<br />

chordlength<br />

Tangent vectors for the<br />

corresponding points in p<br />

Method for global<br />

parameterization<br />

The property SplineDir is used to specify a tangent vector for the corresponding<br />

point in p. This means that the first control point is given and the curve thus<br />

generated is only guaranteed to be C 1 (continuous first derivatives). If this property<br />

is not given, however, the curve generated is guaranteed to be C 2 (continuous<br />

second derivatives). The SplineMethod property does not affect the curve if the<br />

SplineDir property is used.<br />

The property SplineMethod controls the method for how to compute the global<br />

parameterization of the curve. The global parameterization is a parameter that varies<br />

from 0 to 1, from the first interpolated point to the last. For a closed curve the last<br />

point is equivalent to the first. The value uniform means that the global<br />

parameterization is [0, 1,..., np]/np. The default value chordlength means<br />

that the global parameterization is [0, norm(p(:,2)-p(:,1)),<br />

norm(p(:,3)-p(:,2)),..., norm(p(:,np)-p(:,np-1))]/<br />

sum(sqrt(sum((diff(p')').^2)')), where the denominator is the total chord<br />

length. The values centripetal and foley are two additional methods that handle<br />

irregular point sets p more effectively.<br />

The property Closed controls the closure of the spline. If Closed is on the first<br />

point is regarded as the last point. The value auto for the property Closed generates<br />

a closed curve whenever the first and last points in a scaled version of the point set<br />

238 | CHAPTER 1: COMMAND REFERENCE

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

Saved successfully!

Ooh no, something went wrong!