On May 27, 2015, at 7:00 AM, Kalpit Thakkar <ceasy...@gmail.com> wrote:
> So, as discussed before, I have tried the mathematical approach on a handful > of primitives for finding their Volume, Centroid and Surface Area. I have > also submitted a patch[1], which has been tested and validated using > "analyze" and "gqa”. This is outstanding progress. Very nicely done! > But as combinations won't have a perfect mathematical solution to this > problem, it only makes sense to go with generic method for the Coding Period. Some will, some won’t. There are obviously specializations that can be evaluated exactly (e.g., any combination consisting of purely arb8’s, unions that don’t overlap, etc), but sorting out a generic method is the best approach to go with first. > Now, I don't have a proper idea as to how would I go about implementing the > generic method (My guess is that it involves something similar to gqa / > rtweight) as I don't really know right now what exactly are we going to do in > generic method. Both gqa and rtweight employ shooting a grid of rays into the bounding volume of an object. gqa shoots three axis-aligned grids until the results converge or refinement limits are reached. rtweight shoots a single but specified (arbitrary) view grid without refinement. For implementing a generic method, I suggest either 1) merge the methods of gqa+rtweight into a general function that shoots a refinement grid for N specified (arbitrary) views or 2) implement a new approach that randomly samples a spherical volume to convergence. The first option is much easier, less risky, a more straightforward incremental upgrade of the current capability, and would let us get rid of rtweight. The second option will almost certainly have superior convergence (i.e., runtime performance) properties and is view agnostic, but will probably take a few weeks to get working. Depending on your other project objectives and what Daniel has in mind for you, one of those options may be more appropriate than another. Either approach is worthwhile. :) Whatever you do, the src/libanalyze directory was scoped to be where this logic should live as public API. Cheers! Sean ------------------------------------------------------------------------------ _______________________________________________ BRL-CAD Developer mailing list brlcad-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-devel