Sean,

To continue with the vector discussion:
Now that I understand how you propose to handle the vectors, let me ask
you, how would you model the examples I proposed, that I thought were
impossible to model using our vectors?
Using your method did not help me find a solution to them either, so I am
curious how you would do it. We certainly need something more than just
axis vectors, but it would complicate the contribution calculation a lot.
For convenience, find them attached in this email again.

Mario.

2017-07-26 19:02 GMT+02:00 Mario Meissner <[email protected]>:

> It was, indeed, just a problem of printing. Numbers are big so it didn't
> fit in %d. I used %lld now and I got acceptable results.
>
> After looking a bit over viewweight again, there are two concepts that I
> would like to know more about.
>
> How does hypersampling work, and what does the variable hypersample
> exactly contain?
>
> The region struct seems to have a line of sight value that is expressed in
> percentage and is then converted to a factor. Its then multiplied together
> with volume and density to obtain the final weight value. What exactly is
> line of sight?
>
> Mario.
>
>
>
> 2017-07-26 18:14 GMT+02:00 Christopher Sean Morrison <[email protected]>:
>
>>
>>
>> On Jul 26, 2017, at 10:59 AM, Mario Meissner <[email protected]>
>> wrote:
>>
>> Sean,
>>
>> Today I started modifying rtexample.c so that it simulates a ray crossing
>> several regions (tried with the goblet example) and returning the mass it
>> saw as it crossed each region. I assumed most stuff with predefined
>> constant values for now.
>>
>>
>> Sounds good!
>>
>> I wonder why the last result is negative? Segment distance seems to be
>> the cause, although OutHIT dist = 10134 and InHIT dist = 10114, so my
>> subtraction should be returning a positive result. Will keep working on it.
>>
>>
>> At first glance, notice how the length and volume values are the same.
>> This implies maybe a data type printing problem.  What are the types of
>> those variables?  I suspect you need %zd or %lld instead of %d.  I would
>> definitely figure out what is going on there before moving on.  You
>> obviously need non-negative lengths. :)
>>
>> Cheers!
>> Sean
>>
>>
>>
>> Mario.
>>
>> 2017-07-26 15:39 GMT+02:00 Christopher Sean Morrison <[email protected]>:
>>
>>>
>>> I think I can follow you, but I'm not sure how to put contributions
>>> together. In the blade example you seem to be taking the mean value between
>>> them. I'll assume that's the case.
>>> Attached goes a simple box with two vectors. Should the density at point
>>> a be 5?
>>>
>>>
>>> Let’s see.  The gist of the original formula (which had a segment error
>>> in the denominator, looking back) is to calculate the density contribution
>>> from VA, the density contribution of VB, and then take their average (i.e.,
>>> assume simple linear contributions from each).  Simple looking at your
>>> gridding without any equations, we can see that:
>>>
>>> contrib(a, VA) is 3.5
>>> contrib(b, VB) is 6.5
>>>
>>> Adding them up and taking the average is thus density 5.  So yes. ;)
>>>
>>> Likewise, would point b have a density of 6 then?
>>>
>>>
>>> Yes.  8 + 4 / 2.
>>>
>>> I'm not sure if I calculated the contributions correctly either, but
>>> this is the way that would make the most sense to me.
>>>
>>>
>>> I think it’s as good a starting point as any and is relatively easy to
>>> implement.
>>>
>>> That said, note that this method does have a potential flaw in that
>>> we’re treating the density contributions uniformly when in reality, they
>>> should probably be weighted by distance to the vector.
>>>
>>> In your example, they’re equidistant, so it works out.  But consider the
>>> implication of box that is 100 times taller, for example.  Instead of 4 x
>>> 4, it’s 4 x 400.  Point b should be a value far closer to 8 than 4,
>>> certainly not 6.  That’s a problem that can be dealt with later, but
>>> something to keep in mind.
>>>
>>> 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
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>>>
>>>
>> <rtexample.c>
>>
>> ------------------------------------------------------------
>> ------------------
>> 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
>> [email protected]
>> 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
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>>
>>
>

Attachment: how_do_we_model_this.pdf
Description: Adobe PDF document

Attachment: how_do_we_model_this_2.pdf
Description: Adobe PDF document

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to