Last change
on this file since 13395 was 13395, checked in by Mathieu Morlighem, 12 years ago |
merged trunk-jpl and trunk for revision 13393
|
File size:
784 bytes
|
Rev | Line | |
---|
[13010] | 1 | function expcircle(filename,x0,y0,radius,numberofnodes)
|
---|
| 2 | %EXPCIRCLE - create a circular contour corresponding to given parameters
|
---|
[1] | 3 | %
|
---|
| 4 | % Creates a closed argus contour centered on x,y of radius size.
|
---|
[8298] | 5 | % The contour is made of numberofnodes
|
---|
[1] | 6 | %
|
---|
| 7 | % Usage:
|
---|
[13010] | 8 | % expcircle(filename,x0,y0,radius,numberofnodes)
|
---|
[1] | 9 | %
|
---|
| 10 | % See also EXPMASTER, EXPDOC
|
---|
| 11 |
|
---|
| 12 | %Calculate the cartesians coordinates of the points
|
---|
[8298] | 13 | x_list=ones(numberofnodes+1,1);
|
---|
| 14 | y_list=ones(numberofnodes+1,1);
|
---|
[1] | 15 |
|
---|
[8298] | 16 | theta=(0:2*pi/numberofnodes:2*pi*(1-1/numberofnodes))';
|
---|
[4994] | 17 | theta=[theta;0];
|
---|
[1] | 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.