Last change
on this file since 16137 was 13395, checked in by Mathieu Morlighem, 12 years ago |
merged trunk-jpl and trunk for revision 13393
|
File size:
784 bytes
|
Line | |
---|
1 | function expcircle(filename,x0,y0,radius,numberofnodes)
|
---|
2 | %EXPCIRCLE - create a circular contour corresponding to given parameters
|
---|
3 | %
|
---|
4 | % Creates a closed argus contour centered on x,y of radius size.
|
---|
5 | % The contour is made of numberofnodes
|
---|
6 | %
|
---|
7 | % Usage:
|
---|
8 | % expcircle(filename,x0,y0,radius,numberofnodes)
|
---|
9 | %
|
---|
10 | % See also EXPMASTER, EXPDOC
|
---|
11 |
|
---|
12 | %Calculate the cartesians coordinates of the points
|
---|
13 | x_list=ones(numberofnodes+1,1);
|
---|
14 | y_list=ones(numberofnodes+1,1);
|
---|
15 |
|
---|
16 | theta=(0:2*pi/numberofnodes:2*pi*(1-1/numberofnodes))';
|
---|
17 | theta=[theta;0];
|
---|
18 |
|
---|
19 | x_list=radius*x_list.*cos(theta);
|
---|
20 | y_list=radius*y_list.*sin(theta);
|
---|
21 |
|
---|
22 | %offset x_list and y_list by x0 and y0:
|
---|
23 | x_list=x_list+x0;
|
---|
24 | y_list=y_list+y0;
|
---|
25 |
|
---|
26 | contour.x=x_list;
|
---|
27 | contour.y=y_list;
|
---|
28 | contour.density=1;
|
---|
29 | contour.name='circle';
|
---|
30 |
|
---|
31 | expwrite(contour,filename);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.