Logged-In As
ACCOUNTNot Logged In
Implement a centroid function for superellipsoids (SUPERELL)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/Centroid
• http://mathworld.wolfram.com/
• include/raytrace.h: See ft_centroid callback defined in the rt_functab structure

Code:

• src/librt/primitives/superell/superell.c (implement your function here)

This task involves writing a new callback function that takes an rt_db_internal object and calculates its centroid (as a point_t 3D point). There are numerous examples in our code where we compute centroids for other primtiives. 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.

File name/URLFile sizeDate submitted
superell_centroid.patch1.1 KBNovember 26 2013 02:50 UTC
superell_centroid_rev1.patch1.1 KBNovember 26 2013 15:24 UTC
Andrewon November 25 2013 16:07 UTCTask Claimed

I would like to work on this task.

Mandeep Kaur on November 25 2013 16:10 UTCTask Assigned

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

Andrewon November 26 2013 02:50 UTCReady for review

Daniel Rossberg on November 26 2013 15:03 UTCAlmost

• Commas and semicolons are followed by whitespace. (from HACKING, see your VMOVE)

• There should be two blank lines between function definitions.

Daniel Rossberg on November 26 2013 15:03 UTCTask Needs More Work

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

Andrewon November 26 2013 15:24 UTCReady for review