During My M.Sc. Thesis Defense, I presented the work I implementing a heart-shaped primitive in the United States Army Research Laboratory's BRL-CAD Software package.
in three-dimensional Euclidean space used for geometric modeling. Examples include a sphere, an ellipse, a box and in this case a heart-shape. BRL-CAD is an abbreviation for Ballistic Research Laboratory Computer Aided Design. It is a software package used for geometric modeling and developed primarily for the United States Army. Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 3 / 36
as a set of points satisfying an irreducible polynomial equation g(x,y,z) = 0. An irreducible polynomial f(x,y,z) over a field F is a polynomial with a positive degree which has only two factors c and cf(x,y,z), where c is in F. Surfaces represented by irreducible polynomial cannot be decomposed into separate surfaces, each represented by implicit equations. Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 6 / 36
by x = h1(u, v) y = h2(u, v) z = h3(u, v) (1) where hi are rational functions and, u and v are restricted to particular closed intervals in R. For example, the unit sphere given implicitly by x2 + y2 + z2 − 1 = 0 can be parameterized by the equation where t ∈ [0, 1]; x = (1 − s2 − t2) (1 + s2 + t2) y = 2s (1 + s2 + t2) z = 2t (1 + s2 + t2) (2) Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 7 / 36
parametric representation into an implicit representation. A polynomial basis usually the Gr¨ øbner basis is used to express an arbitrary polynomial in implicit form. Parameterization is the process of converting an implicit representation into a parametric representation, if it exists. According to Noether’s theorem, only implicit representations of genus zero possess a parametric equivalent. An implicit representation is said to have genus zero if it cannot be cut along non-intersecting closed curve without disconnecting the resultant manifold. Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 8 / 36
set of surfaces which separate an object’s interior from its exterior. Tree data structures such as winged edge, face edge, bridge edge and the Boundary Representation index ( B-rep index ) have been used for boundary representation of objects. Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 9 / 36
are used to gradually build complex objects from primitives. A Contructive Solid Geometry (CSG) tree has primitives as leaves and its root as a desired complex object. Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 10 / 36
minute cells in three-dimensional space. Tree data structures such as the quadtree, DF-expression and PMR quadtree were used to represent solids. Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 11 / 36
neighbourhoods which are not homeomorphic to three-dimensional space. Non-manifold representations allows volume, manifold and non-manifold curves, surfaces and points in a single environment. Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 12 / 36
a number of procedures (rt hrt xxx()) that implement geometrically useful properties such as; Type-in support Formatted description Database importation & exportation Bounding box Wireframe representation Surface representation & Raytracing Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 13 / 36
incoming heart-shaped primitive was tagged with a unique number, Ox6872743f, the hexadecimal equivalent of ”?hrt?” and increment the constant representing the total number of primitives in BRL-CAD. Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 14 / 36
internal format consists of the following members; A magic number, hrt magic A center point, v A vector in the X-axis direction, v dir A vector in the Y-axis direction, y dir A vector in the Z-axis direction, z dir Distance from center to cusps, d Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 15 / 36
key in values for the above heart-shape parameters, we constructed a p hrt[] array, wrote a hrt in() function in src/libged/typein.c and mk hrt() to the include/wdb.h and src/libwdb/wdb.c Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 17 / 36
would want to know the exact values of the objects being modelled. In order to know the heart-shapes type and the values of its key parameters, we wrote the rt hrt describe() function which simply prints the heart-shapes parameters in human readable format. The radial vectors viz xdir, ydir and zdir in the X, Y and Z directions respectively are printed alongside their magnitudes and the distance from the heart-shapes center to either of its cusps. Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 18 / 36
from database format into internal format and vice-versa, we wrote the rt hrt import() and rt hrt export() functions respectively. Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 19 / 36
volume within which the model lies the least upper bound of the set of all enclosing volumes. To compute the bounding box of any object, it suffices to find the X, Y and Z components of it’s minimal point and maximal points. We computed the X, Y and Z components of the minimal and maximal points of the heart-shape. The X component of Minimal point and Maximal point is v - (2 * xdir)/3 and v + (2 * xdir)/3 respectively. The Y component of Minimal point and Maximal point is v - ydir and v + ydir respectively. The Z component of Minimal point and Maximal point is v - zdir and v + (5 * xdir)/4 respectively. Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 20 / 36
consists of several elliptical polygons aligned along the Z-axis each of which has 24 edges. The rt hrt 24pts() function draws an elliptical polygon made up of 24 points with an angle of 15 apart. The rt hrt plot() places elliptical polygons along the Z-axis from the lower cusp right through to the highest point of each lobe. Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 21 / 36
millions of light rays towards the heart-shape’s surface and coloring the intersection points.Four functions were written viz rt hrt prep(),rt hrt norm(), rt hrt shot() and rt hrt print() functions. rt hrt prep() prepares the heart-shape for raytracing by making sure that all of its parameters are within appropriate limits. rt hrt print() prints the position vector of the heart-shapes center and the two (2) matrices for transposing, rotating and scaling just to make sure that are correct. rt hrt shot() finds the intersection points of the light rays and the heart-shape’s surface. rt hrt norm() computes the normal to the heart-shape’s surface at the intersection point. Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 22 / 36
was modelled as a line in E3 as seen in Equation (1) below. x = at+x0 y = bt+y0 z = ct+z0 (1) Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 23 / 36
of the heart-shape, we used BRL-CAD’s commands an object called amour centered at origin (0,0,0), with 3 radial vectors (5,0,0),(0,5,0),(0,0,5) and distance to cusps of 4. Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 26 / 36
Database importation, we used BRL-CAD’s in to key in the type and parameters of the amour object. The amour text at the bottom of the figure signifies that it has been indeed stored in BRL-CAD’s GED database. Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 27 / 36
and Database exportation of amour, we used BRL-CAD’s l to do a terse and verbose listing of amour’s parameters by exporting it from BRL-CAD’s GED database. Isaac Kamga Mkounga (UB) CSC 698:Thesis Defense September 28 2015 28 / 36