Given the following structure, is there a formula to calculate the number of blocks? (EDIT: and I am really looking for a solution for any BASE and HEIGHT.)
At first, it would seem that this is a triangle, thus Area = 1/2 Base * Height.
But the base here is 5 and height is 5. Calculating 1/2 * 5 * 5 = 12.5. And one can easily count that there are 15 blocks. So clearly that doesn't match.
I have reviewed many similar questions on this board (including a thread in a similar vein I got stuck on: link ), and Pick's theorem is usually mentioned. But this seems insufficient to me, or at least I can't seem to use it to calculate the "volume" of the structure.
Pick's theorem (Wikipedia) states:
Area = i + b/2 - 1 (with i being internal lattice points, and b being border lattice points).
But if all I know are the base dimension and the height dimension, then I don't know the number of internal lattice points. I might be able to find the border points, but even that seems hard. So I can't get the information I need.
Since the triangle formula is the only one I know of that gives AREA based on BASE and HEIGHT, I have been trying to see if there is a way to start with that, and then tweak the result to give a final answer. If I start with a normal triangle (which has BASE=11, HEIGHT=14, and AREA of 77 units^2):
And then for each value of X, calculate a rounded Y based on slope, I get this
When, when viewed by itself looks like this (which has area of 84 units^2):
Like the children's blocks above, it seems like there should be an easy formula for figuring this out. But for the life of me, I can't figure it out. It seems to have a repeating pattern with regularity and thus seems that multiplication should be possible. But how?
P.S. I know how to do repetitive addition for each row. But I am ultimately need this ability to solve a much larger problem very rapidly, and that approach is too slow.
Can anyone help? I have been frustrated about this for a couple of weeks now. Even just telling me "it can't be done" would give me some peace about this! Thanks in advance.