H2Lib  3.0
Data Structures | Typedefs | Functions
macrosurface3d

Representation of a surface. More...

Data Structures

struct  _macrosurface3d
 Representation of a parametrized surface. More...
 

Typedefs

typedef struct _macrosurface3d macrosurface3d
 Representation of a parametrized surface.
 
typedef macrosurface3dpmacrosurface3d
 Pointer to a macrosurface3d object.
 
typedef const macrosurface3dpcmacrosurface3d
 Pointer to a constant macrosurface3d object.
 

Functions

pmacrosurface3d new_macrosurface3d (uint vertices, uint edges, uint triangles)
 Create a macrosurface3d object. More...
 
void del_macrosurface3d (pmacrosurface3d mg)
 Delete a macrosurface3d object. More...
 
pmacrosurface3d new_sphere_macrosurface3d ()
 Create a macrosurface3d object for the unit sphere. More...
 
pmacrosurface3d new_parabolic_mirror_macrosurface3d ()
 Creates a new macrosurface3d object for a parabolic mirror. More...
 
pmacrosurface3d new_cuboid_macrosurface3d (real ax, real bx, real ay, real by, real az, real bz)
 Creates a new macrosurface3d object for a cuboid. More...
 
pmacrosurface3d new_cube_macrosurface3d ()
 Creates a new macrosurface3d object for a unit cube. More...
 
pmacrosurface3d new_cylinder_macrosurface3d ()
 Create a macrosurface3d object for a cylinder. More...
 
psurface3d build_from_macrosurface3d_surface3d (pcmacrosurface3d mg, uint split)
 Create a triangular mesh from a macrosurface3d object. More...
 
psurface3d build_interactive_surface3d ()
 Create a surface3d object interactively. More...
 

Detailed Description

Representation of a surface.

The macrosurface3d class is used to represent piecewise parametrized surfaces in three-dimensional space. These representations can be used to construct surface3d meshes for boundary element discretizations.

Function Documentation

psurface3d build_from_macrosurface3d_surface3d ( pcmacrosurface3d  mg,
uint  split 
)

Create a triangular mesh from a macrosurface3d object.

Each triangle in mg is refined by splitting its edges into split parts and connecting the vertices to obtain split*split plane triangles for each parametrized triangle. The resulting mesh is returned in a surface3d object.

Parameters
mgmacrosurface3d representation of the surface.
splitNumber of edge refinements.
Returns
surface3d mesh consisting of plane triangles approximating the surface.
psurface3d build_interactive_surface3d ( )

Create a surface3d object interactively.

Current this function can only read a mesh from a file or create one for the unit sphere.

Returns
User-defined surface3d mesh.
void del_macrosurface3d ( pmacrosurface3d  mg)

Delete a macrosurface3d object.

Parameters
mgObject to be deleted.
pmacrosurface3d new_cube_macrosurface3d ( )

Creates a new macrosurface3d object for a unit cube.

Returns
A macrosurface3d representation of a cube.
pmacrosurface3d new_cuboid_macrosurface3d ( real  ax,
real  bx,
real  ay,
real  by,
real  az,
real  bz 
)

Creates a new macrosurface3d object for a cuboid.

The cuboid is described as

\[ [a_x, b_x] \times [a_y, b_y] \times [a_z, b_z]. \]

Parameters
axMinimal extend in x-direction.
bxMaximal extend in x-direction.
ayMinimal extend in y-direction.
byMaximal extend in y-direction.
azMinimal extend in z-direction.
bzMaximal extend in z-direction.
Returns
A macrosurface3d representation of a cuboid.
pmacrosurface3d new_cylinder_macrosurface3d ( )

Create a macrosurface3d object for a cylinder.

Attention
This geometry is not fully tested yet, there might be some error in generating the mesh at some refinement levels.
Returns
A macrosurface3d representation of a cylinder.
pmacrosurface3d new_macrosurface3d ( uint  vertices,
uint  edges,
uint  triangles 
)

Create a macrosurface3d object.

Parameters
verticesNumber of vertices.
edgesNumber of edges.
trianglesNumber of triangles.
Returns
Empty macrosurface3d object.
pmacrosurface3d new_parabolic_mirror_macrosurface3d ( )

Creates a new macrosurface3d object for a parabolic mirror.

The geometry is derived from new_sphere_macrosurface3d by deforming half of the sphere parabolically towards the other have of the geometry.

Returns
A macrosurface3d representation of a parabolic mirror.
pmacrosurface3d new_sphere_macrosurface3d ( )

Create a macrosurface3d object for the unit sphere.

Returns
A macrosurface3d representation of the unit sphere.