SemiSphere rotates a semi-spherical "solid" body of revolution.
module modSemiSphere <src_file = "semisphr.cxx", cxx_hdr_files = "fld/Xfld.h"> { // Inputs int+IPort2 active = 1; int+IPort2 num_thetas = 10; float+IPort2 r_outside; float+IPort2 r_inside; float+IPort2 z_offset; float+IPort2 half_angle; float+IPort2 density = 1; // Outputs float+OPort2 mass; float+OPort2 zcg; float+OPort2 izz; Field+Space3+OPort2 out { ncell_sets = 2; // Polytri definition !cell_set[0] { cell_corner_nnodes => cell_nnodes; cell_nnodes = 3; cell_ndim = 2; cell_order = 1; poly_flag = 1; poly_type-opt = 2; /* to distinguish from Polyhedron */ poly_nnodes =>cache(init_array(npolys,2,2)); poly_connect_list[npolys*2]; /* node connectivity array */ ncells => cache(get_ncells_polytri(npolys, poly_connect_list)); node_connect_list => cache(get_connect_polytri(npolys, poly_connect_list)); int+virtual cell_type = 10; string+virtual cell_name = "Polytri"; float+virtual node_uvw[3][3] = {{1.0,0.0,0.0}, {0.0,1.0,0.0}, {0.0,0.0,0.0}}; }; // Polyline definition !cell_set[1] { cell_corner_nnodes => cell_nnodes; cell_nnodes = 2; cell_ndim = 1; cell_order = 1; poly_flag = 1; poly_nnodes =>cache(init_array(npolys,2,2)); poly_connect_list[npolys*2]; /* node connectivity array */ ncells => cache(get_ncells_polyline(npolys, poly_connect_list)); node_connect_list => cache(get_connect_polyline(npolys, poly_connect_list)); int+virtual cell_type = 3; string+virtual cell_name = "Polyline"; float+virtual node_uvw[2][3] = {{-1.0,0.0,0.0}, {1.0,0.0,0.0}}; }; // Normals node data nnode_data = 1; !node_data[0] { veclen = 3; id = 666; }; }; cxxmethod+notify_inst+req update( .active+read+notify+req, .num_thetas+read+notify+req, .r_outside+read+notify+req, .r_inside+read+notify, .z_offset+read+notify+req, .half_angle+read+notify+req, .density+read+notify+req, .volume+write, .mass+write, .cg+write, .izz+write, .out+write ); };
SemiSphere rotates a semi-spherical "solid" body of revolution. The routine creates surfaces and the appropriate normals for the inside, outside, and end cap (if required). The outside polyline line is required. The routine also calculates the mass properties for the body. The body is generated fo 360 degrees of revolution only.
active
Input to enable or disable the execution of this module.
num_thetas
Controls the resolution of the mesh/grid that makes up the semisphere surface.
r_outside
Set the radius of the outside of the semisphere surface.
r_inside
Set the radius of the inside of the semisphere surface.
z_offset
Offsets the z-axis coordinates of the surface.
half_angle
Set the angle at which the semisphere surface stops, e.g., 90 degrees will give a semisphere; 180 degrees is a normal sphere.
density
Provide a density setting for the mass calculations taken from the volume contained within the inner and outer semispheres.
mass
Mass parameter of the generated volume.
zcg
Mass parameter of the generated volume.
izz
Mass parameter of the generated volume.
out
Grid and mesh containing the semisphere surface. Contains both polytri (surface) and polyline (outline) cell sets.
n/a
SemiSphereEg is a simple example application showing the modSemiSphere module in use, with the output connected to a viewer.
iac_proj/semisphr/smspmods.v contains the modSemiSphere module V definition. iac_proj/semisphr/smspmacs.v contains the SemiSphereEg example application V definition.
The low-level SemiSphereMods library containing the module modSemiSphere does not specify a process. By default the express process will be used.
Brian Selle, Leon Thrane, Advanced Visual Systems Inc. Documentation - Ian Curington, Advanced Visual Systems Inc.
Paul G. Lever
International AVS Centre Manchester Visualization Centre Manchester Computing University of Manchester Oxford Road Manchester United Kingdom M13 9PL
n/a