Hey!
I have been looking at the files "viewweight.c" and "gqa.c" since
yesterday. So, according to what I understand, I have to implement one
function (or maybe two) for each of the classes in coreinterface, which
would use the "rtweight methodology" to calculate the volume and centroid
of the Database object using sampling and raytracing -- keeping in mind
that while running the algorithm after getting the object from the tree
(actually a DAG), I don't mutate the object as it will mutate the tree and
would create problems (maybe I can make them const, as I would have to
access their properties only and not perform any mutating operations).
After this is done, I can add the corresponding virtual functions in Object
class, enabling runtime polymorphism.

I hope I'm following this correctly. Please correct me if I'm not following.

One more thing, does doing this mean I would need a density file for each
Database Object whose features are to be found? Because, while finding the
centroid, it uses the weight calculated it seems and we would need a
density file when we need to find the centroid.

With Regards,
Kalpit Thakkar

PS : Do you think it would be possible to complete this rtweight part and
implement two new classes as well or it would be too much to ask given the
GSoC timeframe?

On Sat, Mar 21, 2015 at 11:56 PM, Kalpit Thakkar <ceasy...@gmail.com> wrote:

> Hello Daniel!
> Yeah, that sounds like a good idea. Essentially, we wouldn't have
> different solution prototypes for primitives (as combinations use the
> rtweight methodology for an analytic solution), which would make it easier
> to add the table functions in the Object class, and the code would also be
> understood better. Nice! :D
> However, I will have to take a look at it in detail, because I don't
> exactly know how the code works in the rtweight methodology.
> Muchas Gracias :'D
>
> Yes, I'll be meticulous in my approach. I would make sure I don't mutate
> the objects in the tree. :)
>
> With Regards,
> Kalpit Thakkar
>
> PS : Whenever you take a look at the proposal, please do tell me if I need
> to make changes / add something. :)
>
> On Sat, Mar 21, 2015 at 11:01 PM, Daniel Roßberg <
> danielmrossb...@gmail.com> wrote:
>
>> Kalpit,
>>
>> Implementing the missing functions for centroid, volume and surface in
>> librt for the primitives can be highly non-trivial.  How about
>> implementing the "rtweight methodology" etc. fall-backs for every
>> element in librt where an analytic solution is missing?  After doing
>> so you only had to add the appropriate table functions to Object in
>> the C++ interface.
>>
>> However, you should be careful with your algorithm.  It shouldn't
>> change the elements selected with rt_gettree().  This would cause a
>> dangerous side effect.
>>
>>
>> Regards,
>>     Daniel
>>
>>
>>
>> 2015-03-21 12:32 GMT+01:00 Kalpit Thakkar <ceasy...@gmail.com>:
>> > Hello Sean!
>> > I figured it would be better to get your comments on the doc itself. So,
>> > here is the Google Doc link :
>> >
>> >
>> https://docs.google.com/document/d/1RgUDxU3x3IC1r9lba49IlKP9-wJ2PCgAbcwlj7wTlTo/edit?usp=sharing
>> >
>> > 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

Reply via email to