| ||||||
Features/Distributed Mesh Database ExampleThis example relates to the creation of a virtual database for storing polygonal mesh data, comprised of a grid of in-memory database servers. The examples/mesh subdirectory in the API distribution contains the relevent code. Problemtoroid rendered by mclient program
A current problem in scientific computing is to find a way of indexing and storing large grids of polygonal mesh data in a way that can be easily retrieved and rendered by different client applications. The example application generates a series of toroids (see image), composed of triangular faces. Each object can be rotated in three dimensions and the intensity of radiation falling on each face from a point energy source is computed and stored. The example shows how to index, store and retrieve mesh objects throughout a grid of in-memory database servers, using the database modeling, serialization, merging and network programming features of the exstreamspeed library. The provided example client application renders the toroid mesh-data using xlib. [Top]
The process architecture is composed of three components:
mclient stores new mesh-data objects by:
mclient retrieves mesh-data objects by:
A toroid mesh-data object is identified by it's three rotational angles XR, YR and ZR. Angles are represented by a number from 0 to 255, where 256 is a full 360-degree rotation. The Mesh (root) class has two subclasses: MeshIndex and MeshData. A MeshIndex node is what mclient uses to communicate with nsvr in order to establish the host and port numbers of msvr servers, by mesh-data object id. MeshData contains the actual mesh data. ZA is the z-coordinate of the observation point. MeshData contains a list of vertices in the Vertex child node - each vertex has an identifier (VId) and a corresponding x,y,z coordinate. The Face child node corresponds to the set of triangular faces that make-up the toroid - V0, V1 and V2 correspond to the vertex identifiers that compose each triangle. Intensity corresponds to the intensity of radiation from the energy point-source falling on the face and Distance is the distance of the face from the observation point. Vertex uses an index type of Quadrilateral or higher-order polynomial faces can be modeled by subclassing Face. This would not impact the structured of databases currently stored or affect their rendering. The example is split into three binaries: mclient.c (mclientcpp.C), nsvr.c (nsvrcpp.C) and msvr.c (msvrcpp.C). mclient accepts commands from stdin for generating, viewing, storing and retrieving mesh-data toroids. | ||||||
Copyright © 2012 by Richard Brooks |