Hello again. Another situation that bothers me is also attached hereby. If we set both a vertical and a horizontal vector and take the diagonal, we are forced to predefined values by those vectors. But that if I want the diagonal to be something else instead of what the horizontal and vertical vectors are telling me? These situations make me think that this axis vector system is quite limited and is also origin dependent (my blade would be impossible to model with axis vectors if we put the origin in a corner instead of where I placed it, for the same reasons that the other two examples cannot be modeled either).
I'm not sure if we wan keep this model, it depends on whether we want to be able to represent any (continuous, for now) possible distribution, or if we are happy with the current limitations. To be able to fully describe any continuous distribution we will probably need to use a function like I suggested. Querying the density for points of a segment is as simple as calling the function and returning it's value. Instead of also giving the rate of change I suggest we just also give some intermediate values and then the calling code can interpolate the values in a way that the resulting density distribution alongside the segment is precise up to any arbitrary precision to the original. The function could be modeled using the same system we already mentioned. The user can input a series of points or vectors that indicate densities at certain points and/or rates of change between them, and then we use some method to approximate a function that covers all the points (similar to how a Taylor function approximates to functions like the sine). I will need thoughts on this so I know if it's worth doing an example. Can't do much on this end without feedback so I will try to make sense of the existing code in the meantime. Mario. 2017-07-19 13:40 GMT+02:00 Mario Meissner <mr.rash....@gmail.com>: > As promised, a patch (literally) for yesterdays document. Instead of the > sum used and explained in my last email I found it more convenient (appart > from the fact that I was also doing it wrong) to compute the multipliers > (according to how much of each vector we used) and then multiply by the > original density value. Doing this yields the results I expected from my > model. > > I'm interested in knowing what your idea was and if we can fit them both > together. > > By the way, I also attach a second example that I think we cannot model > correctly with the model I propose. Density goes up and down as we advance > in the same direction, so one vector with a set multiplier is not enough. > It needs to have a function assigned. > > PD. Your ASCII Sketches with dash characters get all messed up no matter > with which client I try to visualize the email with (not even with > monospaced fonts). I usually get the idea but it's sometimes difficult to > decipher. > > 2017-07-19 13:10 GMT+02:00 Mario Meissner <mr.rash....@gmail.com>: > >> Sorry my last email got sent accidentally while I was writing (pressed >> some weird hotkey). This is complete version: >> >> We probably have some different ideas on how it should work, because of >> your "the largest value should be 3*V=9". I thought that if we have a >> horizontal vector going right, and a vertical vector going down, and we >> take the diagonal that goes the full distance down and right (so basically >> a 2D square where up left is origin and bottom right is point we want to >> calculate) the result should be the combination of both multipliers. If the >> axis vectors were 3 right and 2 down, that point should have a multiplier >> of 6 because it fully uses both axis vectors. From your statement I assume >> that you didn't think of it this way. (If we set the original density to 1 >> the "multiplier" value and the actual density would be the same so lets do >> that for the below considerations). >> >> If you think that the maximum value achievable is 3 in my imaginary >> square of the first paragraph, what would you say is the value in the >> bottom right? If it is 3, why does the horizontal vector count more than >> the vertical one? It's like the bigger vector overrides the smaller one >> without taking into account the smaller vector's value. What if we only go >> half way? What's the density in the middle of the square? I would expect >> the following: We go halfway to the right, so we don't multiply by the full >> value but rather only by 1.5. So we are sitting at 1.5 and now we need to >> go down halfway as well. Going all the way down would mean multiplying by 3 >> but halfway would be 2. (this is because 1 original copy + 2 extra copies >> make the 3 of the full multiplier, but going halfway would mean 1 + 2/2 = >> 2, if this is confusing I'll clarify it with more examples). So 1.5 x 2 = >> 3. This also makes sense to me if I think that the bottom right is 6 and we >> are half way through reaching it, so half of 6. >> >> Now, if you look at the last part of yesterdays example document, I tried >> to "re-do" the "a" segment showing all the steps the code might do. I first >> decompose the vector into a combination of axis vectors, and using >> coefficients to show "how much" of each vector we have to take. Next I take >> the original density, 3, and add, for each axis vector I needed to use, the >> following: origin_density x (multiplier - 1) x vector_coefficient. (Note >> that I subtract 1 because of what I mentioned in the parenthesis above, >> it's an accumulation so we have to subtract 1 to the multiplier, otherwise >> we count the "original amount" twice). This worked for some cases but after >> some deeper thought on it today I realized that this is wrong (doesnt work >> for the half way diagonal example I mentioned above). Instead of just >> summing one on top of the other, we have to make the operations step by >> step and use the result of the first step as input for the second step. >> I'll send a fix in one hour for yesterdays document so that it actually >> does what I said it would. >> >> Mario. >> >> 2017-07-19 13:04 GMT+02:00 Mario Meissner <mr.rash....@gmail.com>: >> >>> We probably have some different ideas on how it should work, because of >>> your "the largest value should be 3*V=9". I thought that if we have a >>> horizontal vector going right, and a vertical vector going down, and we >>> take the diagonal that goes the full distance down and right (so basically >>> a 2D square where up left is origin and bottom right is point we want to >>> calculate) the result should be the combination of both multipliers. If the >>> axis vectors were 3 right and 2 down, that point should have a multiplier >>> of 6 because it fully uses both axis vectors. From your statement I assume >>> that you didn't think of it this way. >>> >>> If you think that the maximum value achievable is 3 in my imaginary >>> square of the first paragraph, what would you say is the value in the >>> bottom right? If it is 3, why does the horizontal vector count more than >>> the vertical one? It's like the bigger vector overrides the smaller one >>> without taking into account the smaller vector's value. What if we only go >>> half way? What's the density in the middle of the square? I would expect >>> the following: We go halfway to the right, so we don't multiply by the full >>> value but rather only by 1.5. So we are sitting at 1.5 and now we need to >>> go down halfway. Going all the way down would mean multiplying by 3 but >>> halfway would be 2. (this is because 1 original copy + 2 extra copies make >>> the 3 of the multiplier, but going halfway would mean 1 + 2/2 = 2, if this >>> is confusing I'll clarify it with more examples). So 1.5 x 2 = 3. This also >>> makes sense to me if I think that the bottom right is 6 and we are half way >>> through reaching it, so half of 6. >>> >>> Now, if you look at the last part of yesterdays example document, I >>> tried to "re-do" the "a" segment showing all the steps the code might do. I >>> first decompose the vector into a combination of axis vectors, and using >>> coefficients to show "how much" of each vector we have to take. Next I take >>> the original density, 3, and add, for each axis vector I needed to use, the >>> following: origin_density x (multiplier - 1) x vector_coefficient. (Note >>> that I subtract 1 because of what I mentioned in the parenthesis above, >>> it's an accumulation so we have to subtract 1 to the multiplier, otherwise >>> we count the "original amount" twice). This worked for some cases but after >>> some deeper thought on it today I realized that this is wrong. Instead of >>> just summing one on top of the other, we have to make the operations step >>> by step and use the result of the first step as input for the second step. >>> Hereby goes attached the FIXED VERSION >>> >>> Lets consider the box of the first paragraph. >>> >>> >>> >>> >>> >>> 2017-07-19 0:05 GMT+02:00 Christopher Sean Morrison <brl...@mac.com>: >>> >>>> >>>> > 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 >>>> >>> >>> >> >
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 brlcad-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-devel