![](/profiles/wavemetrics/themes/wavemetrics/logo.png)
Rotatable Ellipsoid
![](/sites/default/files/styles/thumbnail/public/jjweimer/profile-images/2018-12/meimage.jpg?itok=gNUlNM01)
jjweimer
// This creates an ellipsoid
// INPUTS:
// wname - name of ywave having 361 points
// (presumes xwave of same length is named wname + "x")
// (xo,yo) - center position of ellipse
// (a, b) - elliptical dimesions to above
// alpha - angle of rotation (counterclockwise)
// OUTPUTS:
// make all changes directly in ywave and xwave
Function Ellipsoid(wname,xo,yo,a,b,alpha)
string wname
variable xo,yo,a,b,alpha
wave yw = $wname
wave xw = $(wname +"x")
make/FREE/n=361 urx,ury
variable cosalpha = cos(alpha*Pi/180), sinalpha = sin(alpha*Pi/180)
urx = a*(cos(p*Pi/180))
ury = b*(sin(p*Pi/180))
xw = xo + cosalpha* urx - sinalpha*ury
yw = yo + sinalpha*urx + cosalpha*ury
return (0)
end
// INPUTS:
// wname - name of ywave having 361 points
// (presumes xwave of same length is named wname + "x")
// (xo,yo) - center position of ellipse
// (a, b) - elliptical dimesions to above
// alpha - angle of rotation (counterclockwise)
// OUTPUTS:
// make all changes directly in ywave and xwave
Function Ellipsoid(wname,xo,yo,a,b,alpha)
string wname
variable xo,yo,a,b,alpha
wave yw = $wname
wave xw = $(wname +"x")
make/FREE/n=361 urx,ury
variable cosalpha = cos(alpha*Pi/180), sinalpha = sin(alpha*Pi/180)
urx = a*(cos(p*Pi/180))
ury = b*(sin(p*Pi/180))
xw = xo + cosalpha* urx - sinalpha*ury
yw = yo + sinalpha*urx + cosalpha*ury
return (0)
end
![Linear Plot](/sites/default/files/styles/content_body/public/images-imported/linearplot.thumbnail_0.png?itok=W9lIqnr6)
![](/sites/default/files/forum.png)
Forum
![](/sites/default/files/support.png)
Support
![](/sites/default/files/gallery.png)
Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More