Implement a surface area function for extruded bitmaps (EBM)BRL-CAD
Status: ClosedTime to complete: 72 hrs Mentors: SeanTags:

BRL-CAD provides more than two dozen types of geometry ''primitives'' such as ellipsoids, boxes, and cones. Every primitive is described by a collection of callback functions, for example rt_ell_bbox() returns the bounding box dimensions for an ellipsoid. Wikipedia, Wolfram Mathworld, and various other math sites (and research papers) around the web include the equations for most of our basic primitives while others are a little more tricky to compute.

References:

  • http://en.wikipedia.org/wiki/Surface_area
  • http://mathworld.wolfram.com/
  • http://www.dtic.mil/cgi-bin/GetTRDoc?AD=AD0274936
  • include/raytrace.h: See ft_surf_area callback defined in the rt_functab structure

Code:

  • src/librt/primitives/ebm/ebm.c (implement your function here)
  • src/librt/primitives/table.c (add a reference to your callback function here)

This task involves writing a new callback function that takes an rt_db_internal object and calculates the surface area (units are mm^2). There are numerous examples in our code where we compute surface area for other primitives. Submit a patch file the may be applied cleanly.

If you succeed, a follow-on task may be created to enable and validate your function.

Uploaded Work
File name/URLFile sizeDate submitted
ebm-area.patch3.2 KBDecember 11 2013 08:07 UTC
Comments
agkphysicson December 10 2013 21:04 UTCTask Claimed

I would like to work on this task.

Mandeep Kaur on December 11 2013 03:54 UTCTask Assigned

This task has been assigned to agkphysics. You have 72 hours to complete this task, good luck!

agkphysicson December 11 2013 08:09 UTCReady for review

The work on this task is ready to be reviewed.

agkphysicson December 11 2013 08:12 UTCTesting

I have briefly tested this and it looks like it gives correct results.


Most of the method is similar to what I used for the volume, where the vertices are transformed by the matrix and then the area of top and bottom faces, and any other exposed faces, is calculated.

Sean on December 12 2013 03:50 UTCTask Closed

Congratulations, this task has been completed successfully.

Sean on December 12 2013 04:30 UTCphenomenal work

Aaron, this is just outstanding work.  At a glance, it even looks like you take holes in the ebm into account?  Either way, more than enough work for a preliminary GCI task.  You should be easily able to claim follow-on validation tasks as well (it'll take a few days to get them all added) since you've already done most of the work needed.


Thanks for the repeat clarifications on crediting you properly in our authorship docs.  I wish I could say I remember everyone's name, but there is just too many tasks, names, and aliases to keep track of everything without asking questions multiple times.  I want to make sure we announce and credit everyone appropriately, even at the expense of sounding redundant. ;)