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.

loft<br />

The property LoftMethod can have the values linear or cubic, specifying if the<br />

lofting should be linear/ruled or bicubic, respectively. The default method is cubic,<br />

with the LoftWeights property set to the value [0.3*ones(1,ng-1);<br />

0.7*ones(1,ng-1)].<br />

Examples<br />

Create a loft between a circle and a square.<br />

gl1 = cell(1,2);<br />

gl1{1} = circ2;<br />

gl1{2} = rect2(2,2,'pos',[-1 -1]);<br />

Let the edge between vertices number one and two in the circle correspond to the<br />

edge between vertex number one and two in the square.<br />

tl1 = cell(1,2); tl1{1} = [1;2]; tl1{2} = [1;2];<br />

g1 = loft(gl1,'LoftVtxPair',tl1);<br />

figure, geomplot(g1)<br />

Create a loft between edge number 1 in the circle and edge number 1 in the square.<br />

tl2 = cell(1,2); tl2{1} = 1; tl2{2} = 1;<br />

Also, rotate the square.<br />

g2 = loft(gl1,'LoftEdge',tl2,...<br />

'LoftSecPos',{1,zeros(2,2),[0 -pi/4]});<br />

figure, geomplot(g2)<br />

Create a more complicated example.<br />

gl2 = cell(1,3);<br />

gl2{1} = arc2(0,0,2,0,pi/2)-circ2;<br />

gl2{2} = rect2(2,2,'pos',[-1 -1]);<br />

gl2{3} = gl2{1};<br />

Specify reversed direction of edges by using negative signs.<br />

tl3 = cell(1,3); tl3{1} = 4; tl3{2} = -2; tl3{3} = -3;<br />

Also, rotate the last two sections.<br />

g3 = loft(gl2,'LoftSgnEdge',tl3,'LoftSecPos',...<br />

{[-1 -1 0; 0 0 1; 1 1 2]',zeros(2,3),[0 pi/4 pi]});<br />

figure, geomplot(g3)<br />

In the latter case, since there are no ambiguities, you could also use unsigned edge<br />

numbers by specifying the property LoftEdge.<br />

tl4 = cell(1,3); tl4{1} = 4; tl4{2} = 2; tl4{3} = 3;<br />

g4 = loft(gl2,'LoftEdge',tl4,'LoftSecPos',...<br />

{[-1 -1 0; 0 0 1; 1 1 2]',zeros(2,3),[0 pi/4 pi]});<br />

figure, geomplot(g4)<br />

246 | CHAPTER 1: COMMAND REFERENCE

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

Saved successfully!

Ooh no, something went wrong!