Finite Element Analysis Toolbox
GRIDREVOLVE Revolve and extrude a 2D grid.
[ GRID ] = GRIDREVOLVE( GRID, N_CZ, LEN, N_REV, R_OFF, TH_XZ, I_JOIN ) Revolves and extrudes a 2D GRID to generate a 3D grid. N_CZ is the number of cells and LZ the length/height in the z-direction. N_REV specify the number of revolutions and R_OFF the radial offset of the original input grid. TH_XZ optionally prescribes an initial angle of the input grid plane. I_JOIN is a flag to join the two ends.
grid = gridrevolve( circgrid(), 20, 0, 1, 2, pi/2, 1 );
grid = gridrevolve( rectgrid(3), 100, 10, 3, 2 );
grid = circgrid(); grid = delcells( grid, <tt>x>=0</tt> ); grid = gridrevolve( grid, 20, 0, 1, 1, pi/2, 1 );