sphere_surface, sphere_surface_data, sphere_surface_lite

Synopsis

The macros sphere_surface, sphere_surface_data, and sphere_surface_lite, respectively allow the generation of 2D surface sphere mesh, 2D surface sphere mesh with mapped Node_Data and a simple sphere geometry for use as a glyph.

Input Ports

Name Type Description

&in Grid_Struct+ Node_Data+ Dim2 Input Node_Data for surface mapping
(sphere_surface_data only)

Parameters

The following lists all of the parameters found in the parameter block SphereSurfaceParams, which are accessed by the module SphereSurfaceGen and the UI Macro SphereSurfaceUI.

Name Type Description UI Control

longdim int Resolution of grid along longitude Longitude/Subdivision
latdim int Resolution of grid along latitude Latitude/Subdivision
start_long double Start angle for longitude Longitude/Start
end_long double End angle for longitude Longitude/End
start_lat double Start angle for latitude Latitude/Start
end_lat double End angle for latitude Latitude/End
radius double Sphere radius Radius
closedlong boolean Toggle closed surface along longitude Longitude/Closed
closedlat boolean Toggle closed surface along latitude Latitude/Closed

Output Ports

Name Type Description

out_mesh Mesh Output structured Mesh data
(sphere_surface & sphere_surface_lite)
out_field Mesh+Node_Data Output structured Mesh data with mapped Node data
(sphere_surface_data only)
out_obj DataObject Directly renderable output object
(sphere_surface & sphere_surface_data)

Description

sphere_surface

The macro sphere_surface generates a 2D spherical surface grid and mesh, based on the input parameters. These parameters control the resolution of the resultant grid, specify the start and end angles for the longitude and latitude of the surface, and the sphere radius.

Additional options allow the two edges of the 2D surface to be closed: as the sphere wraps around the two edges will be connected in the mesh information, thus producing a continuous surface, as opposed to the standard Express sphere which simply aligns the two edges - producing a visible shading artefact.

Node data may also be mapped onto the grid, and the closed surface will keep the two edges of the mesh apart.

Typically the longitude will range between -180 and +180 degrees, and if the closed parameter is not selected, the two edges will not coincide. The resolution controls the angle between each grid line and the distance between the two edges will equal to this interval (for -180 to +180 longitude), thus producing a continuous surface.

sphere_surface_data

The macro sphere_surface_data extends the functionality by allowing a 2D structured grid and node data field to be connected to the input. The resolution of the grid is extracted from the input field, and used to generate the appropriate resolution sphere. The node data is then mapped onto the sphere mesh and output as both a field and a data object.

The parameters remain as before, except the Longitude and Latitude Subdivision parameters are set by the macro.

sphere_surface_lite

The macro sphere_surface_lite uses a minimum number of objects to generate a simple sphere geometry object, suitable for use as a glyph. The macro does not contain a user interface, or any functional macros. It contains an integer object for both the subdivision parameters, which may be exported or set internally. The remaining parameters will default to producing a simple sphere, but they may be set explicitly be opening and modifying the appropriate objects.

Input Ports

&in

The input 2D Grid and Node_Data to be mapped onto the surface of the sphere. The resolution of the sphere surface is based on the resolution of the input field.

Parameters

longdim

Resolution of the sphere surface grid along the longitude axis.

latdim

Resolution of the sphere surface grid along the latitude axis.

start_long

Start angle in degrees for longitude (default is -180 degrees).

end_long

End angle in degrees for longitude (default is +180 degrees).

start_lat

Start angle in degrees for latitude (default is +90 degrees).

end_lat

Start angle in degrees for latitude (default is -90 degrees).

radius

Specify radius of the sphere surface (default is 1.0).

closedlong

Connect the two edges of the grid to make longitude continuous (by default this is ON).

closedlat

Connect the two edges of the grid to make latitude continuous (by default this is OFF).

Output Ports

out_mesh

Output structured mesh of the sphere surface.
(sphere_surface and sphere_surface_lite only).

out_field

Output structured mesh of the sphere surface with node data.
(sphere_surface_data only).

out_obj

Output renderable data object of the sphere surface (with/without node data).

Utility Macros

The low-level SphereSurfaceGen module is used in these User Macros.

Example

Two example applications, SphereSurfaceEg1 and SphereSurfaceEg2, are provided which demonstrate the sphere_surface and sphere_surface_data macros respectively.

Files

iac_proj/spsurf/spsfmods.v contains the SphereSurfaceParams group and the SphereSurfaceGen module V definitions.

iac_proj/spsurf/spsfmacs.v contains the sphere_surface, sphere_surface_data and sphere_surface_lite User Macros, the SphereSurface and SphereSurfaceData Functional Macros and the SphereSurfaceUI UI Macro V definitions.

iac_proj/spsurf/spsfapps.v contains the SphereSurfaceEg1 and SphereSurfaceEg2 example application module V definitions.

Other Notes

The SphereSurfaceMacs library inherits its process. As this library contains no procedural code, the process is not important. The low-level SphereSurfaceGen module, executes under the process specified in its library, not the process defined in the high-level library.

Author

Paul G. Lever,
International AVS Centre

Modifications

Andrew Dodd,
International AVS Centre

Contact

International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL

See Also

SphereSurfaceParams, SphereSurfaceGen, SphereSurface and SphereSurfaceData.

Sphere, Field_Spher