On Fri, Mar 20, 2015 at 10:29 PM, Christopher Sean Morrison <brl...@mac.com>
wrote:
>
> On Mar 20, 2015, at 12:41 PM, Kalpit Thakkar <ceasy...@gmail.com> wrote:
>
> > Hello!
> > I have been trying to figure out for sometime now, what exactly is a
> combination in LIBRT.
>
> A combination is a collection of objects. Semantic meaning is given to a
> combination based on where it exists hierarchically and what it contains.
>
> > Is it a non-leaf node in the tree made out of the different primitives
> in the scene (I guess this tree would then be used for raytracing?)
>
> It can be, yes.
>
> > OR
> > Is it a combination of different primitives explicitly assembled by the
> user?
>
> It can be, yes.
>
> Those options are not mutually exclusive. :) By definition, they are
> non-leaf nodes in terms of the geometric directed acyclic graph that they
> comprise. They describe a hierarchical grouping of primitives (and other
> combinations). They can be rendered (as can primitives). They can be
> assembled by the user, e.g., by a command. They can be created by some
> code, e.g., by an importer or procedural geometry generator.
>
> They are geometry objects. Take a look at the mged quick ref card (go to
> website, documentation section) for a brief summary of terminology.
>
Thanks a lot Sean! I had a look at the MGED ref card and I have a good
understanding about what are combinations now!
Now, if I import some model into MGED, which is an external model, will it
also be broken down into a hierarchy by MGED, such that leaf nodes consist
of basic primitives and the parent nodes are obtained by applying union,
intersection or subtraction on the child nodes?
That is, is every combination a hierarchical grouping of primitives, where
leaf nodes are some core(basic) primitives?
(I have based this doubt on the tree you have drawn using letters CAD in
the Quick Ref Card)
Okay, so I was stuck here while I was trying to figure out how to find the
centroid of the combinations, because I wasn't able to visualize how
exactly a combination would look like in MGED. While talking to ``Erik on
IRC right now, I got an idea of how to get the volume and surface area of a
combination, well, to some extent atleast. The approach involves shooting
rays on the object with square 1mmx1mm cells on the grid and the distance
travelled by the ray inside the object will help me find the volume.
Surface area would be found by tessellating the object and summing the
areas of the triangle.
If there is any mathematical alternative to finding the volume and surface
area of combinations, it'll be really helpful. Centroid is still pending.
I'm trying to understand the method ``Erik suggested nicely right now. If
you have any suggestions, please do let me know. :)
Cheers!
> Sean
>
With Regards,
Kalpit Thakkar
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> BRL-CAD Developer mailing list
> brlcad-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel