> On Jul 17, 2017, at 4:24 PM, Mario Meissner <mr.rash....@gmail.com> wrote:
> 
> Okay, so let's make sure I understand the current code before continuing with 
> the new specifications. 
> 
> About the blade, yes I tried to just mix both because that made it simpler. 
> 
> Tomorrow I'll make the new blade (without the curve) and get going with the 
> code. It seems like I'm missing some basic concepts on what's going on 
> inside. I'll try to understand it as good as I can and then ask some 
> questions on what isn't clear to me. Is there any documentation on what 
> exactly happens during geometry evaluation and ray tracing in general?

This example is about as simple as it gets code-wise:

http://brlcad.org/wiki/Example_Application

For the abstract conceptual concepts of ray tracing, anything that talks about 
“solid” or “full path” ray tracing is generally relevant (as opposed to ray 
tracing for image synthesis, rendering pictures).  Coincidentally relevant:  
http://slideplayer.com/slide/9271245/

What usually gets in the way are preconceptions.  Consider for example an 
object, some unknown object.  You don’t (yet) know what it looks like, how big 
it is, etc.  All you have is a special ray/gun that shoots an infinitely thin 
ray through the object and tells you when you entered and exited the object.  
So you shoot a ray and hit it:

   shoot         entry       exit 
o-> ray . . . . . hit o–-–––o hit
                        6mm

All you know at this point is that you hit it and 6mm later, the ray exited the 
object.  That by itself isn’t very useful, but we can shoot a whole set of 
rays, each from a different position, and we start to get a picture of what the 
object looks like: 

o-> ray1            o–o
o-> ray2          o–––––o
o—> ray3        o––––––––—o
o-> ray4      o–––––––––––——o
o—> ray5        o—––––––——o
o-> ray6          o–––––o
o-> ray7            o–o

We start to see it looks a bit like a rotated cube.  Moreover, knowing the 
length of each segment and the spacing of the rays, we could actually get an 
estimate of area:

o-> ray1            o–o         2mm
o-> ray2          o–––––o       6mm
o—> ray3        o––––––––—o    10mm
o-> ray4      o–––––––––––——o  14mm
o—> ray5        o—––––––——o    10mm
o-> ray6          o–––––o       6mm
o-> ray7            o–o         2mm
                               ––––
with 2mm spacing between rays: 50mm x 2mm = 100mm^2 area

It’s probably a 10mm x 10mm square.  Extend that example into layer after layer 
of samples and you don’t just have an area estimate, but now you have a (3D) 
volume estimate because each ray represents a 2D cross section (e.g., 2mm^2) 
which can be multiplied by each segment length:

with 2mm spacing between rays: 50mm x 2mm x 2mm = 200mm^3 volume

With a volume estimate and knowing density, you can obviously calculate mass 
too (mass = volume x density).  And all of that was done without knowing 
anything about the geometry.  That’s essentially what rtweight is doing.

With your project, we’re changing the last step.  In mathematical terms, we 
were doing a summation over all the individual volume bits, multiplying each by 
a constant density.  New form, everything stays the same except we’re either 
going to multiply the volume by a different (e.g., average) density based on a 
function or we’re going to further parameterize the volume so an volume/mass 
integral can be estimated.    

Cheers!
Sean


------------------------------------------------------------------------------
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

Reply via email to