
Rotatable Ellipsoid

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


Forum

Support

Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More