> Attached goes an example of one way I think it might work.

This is an excellent example to work through!

> In the end we want one vector for each axis, that tells, through a 
> multiplier, how the density changes as we move in its direction. Choosing any 
> point in the region is taking the right combination of the vectors to go from 
> the origin to the point, and applying the multipliers of the vectors to the 
> density of the origin. Do this twice and you get in-point and out-point of 
> the segment. Now you can interpolate and calculate mass.

I think I’m following you, but via different calculations.  Where is your “3 + 
3/2” coming from for segment a?  I would have calculated it as a density field 
going from 3 (pt V) to 6 (pt B), divided by the contribution ratio of each.  
Showing all steps, undoubtedly with a mistake or three because this was done in 
just a few minutes:

    density(V)            density(B)        3   6 
———————–––––––––––– + ––––—––——–––––––––– = – + – = 4.5 = contrib(a1, VB)
vect(VB)/vect(a1'V)   vect(BA)/vect(a1’B)   2   2

Obviously same result, but is that essentially the same method?  What’s 
throwing me is that I don’t get the same result for the out point, which means 
I probably have something wrong.  I get:

contrib(a2, VB) + contrib(a2, VA)   4.5 + 9
––––––––––––––––––––––––––––––––– = ––––––- = 6.75
                2                       2


Regardless, I’m not sure I understand how your result (10.5) is even possible 
as the largest value should be 3*V=9, no?

> The user could also define non-axis vectors and we should then break them 
> down into axis ones.

Yes, it’s important to note that geometry is often not axis-aligned like in 
your setup, so deriving vectors from the points will probably be desirable.  
That is, derive vectors VA, VB, VC, VD from the five density field points.

> This method only covers some really simple density distributions and fails to 
> represent more complex ones like density values that go up and down as we 
> advance in a certain direction. I see no easy way of modeling this without 
> complicating the whole think a lot. What do you think?

This makes me think we’re using different methods.  Summing contributions from 
the different points/vectors should give values that go up and down…

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