0
$\begingroup$

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

picture of children's blocks

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

Plain triangle

And then for each value of X, calculate a rounded Y based on slope, I get this

triangle with integer rounding

When, when viewed by itself looks like this (which has area of 84 units^2):

just integer triangle

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.

$\endgroup$
  • $\begingroup$ Look up triangular numbers. It's $n(n+1)/2$ where $n$ is the number of rows/blocks on the last row. $\endgroup$ – Randall May 21 at 0:31
  • $\begingroup$ @Randall, thanks for the reply. I seems that only applies in equilateral triangles. The first image has that, but it was really just an introduction for my real question, with various BASE and HEIGHT values. $\endgroup$ – kdtop May 21 at 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.