Hi Mario,
Well, the rt in rtweight comes from ray-trace. I.e., this program shoots a
series of rays at the model. The hit() function in src/rt/viewweight.c
determines what shall be done when one of these rays hits a region.
First, it determines the length of the ray inside the region (line 133).
Then, beginning at line 157, it computes the volume which this ray
represents (base on the cell sizes and hypersampling), takes the
line-of-sight into account (which is 100% if the region is fully filled by
the assigned material), and writes the resulting mass into dp->weight.
For heterogeneous regions you need to know exactly where the ray intersect
the region. These intersection points are ihitp->hit_point
and ohitp->hit_point, I assume.
Hope this helps,
Daniel
2017-07-13 16:45 GMT+02:00 Mario Meissner <mr.rash....@gmail.com>:
> Hello.
>
> I have calculated the mass of an example of an heterogeneous object using
> a function that defines the density of an object in each point in space,
> and integration to obtain it's mass.
> You can see it here: https://drive.google.com/file/d/
> 0Bz6hfFobLeoyZC1vQ1JwSU05NDg/view
>
> I believe that this model can give support to most types of heterogeneous
> density objects, and can be easily calculated with arbitrary precision by a
> computer. Support for non-continuous densities may also be easy to
> implement alongside this model by using functions with different
> definitions for different regions.
>
> However, as I do not yet understand how rtweight currently behaves, I do
> not know if this model is viable and what other considerations one needs to
> make.
>
> I'll await feedback on this model, and help on understanding the source
> code and current behaviour.
>
> Mario.
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> BRL-CAD Developer mailing list
> brlcad-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel