
Simple code for Parametric Surface Wave of Revolution

s.r.chinn
Function makeSurface() // make a parametric surface of revolution for Gizmo display make/O/N=(20,21) wC, wS, wZ setscale/P x, 0, 0.025,"", wC, wS, wZ // 'x' here is the spatial 'z'(axial) direction setscale/I y, 0, 2*pi,"", wC, wS, wZ // 'y' here is the angular variable wC = RofZ(x)*cos(y) // will be parametric x coordinate wS = RofZ(x)*sin(y) // will be parametric y coordinate wZ = x // parametric z coordinate; now have 3 2-D waves Make/O/N=(20,21,3) wSurf Concatenate /O {wC, wS, wZ}, wSurf // promoted 3rd parametric dimension is x,y,z space End Function RofZ(x) // 1-D function example for surface radius vs axial coordinate variable x variable w0 = 0.006, Zr = 0.075 return w0*sqrt(1+(x/Zr)^2) End
The code can be generalized by using FUNCREF identification from several radial profile functions. I am attaching a Gizmo snapshot from the above code. Users may wish to do their own lateral and axial Gizmo display scaling. I have not previously seen the use of Concatenate in this context. I apologize (to AG?) if I am mistaken.

Forum

Support

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