How to calculate the number of border pieces for a jigsaw puzzle?

414 Views Asked by At

For example I have picture which can be any size, and I want to make jigsaw puzzle with an approximate number of pieces.

So I know the picture width and height, I know the approximate number of pieces. I need to know the puzzle's border dimensions in a way where the pieces' size nearly a rectangle.

1

There are 1 best solutions below

0
On

Okay. SO the picture is $W$ inches by $H$ inches. And has $N$ pieces.

If there are $w$ pieces along the top edge (including corners) and $h$ pieces along the side (including corners) we need $w\cdot h = N$.

Assuming that these are $w,h, N$ and integers are all rows and columns have the exact same number of pieces our options will be limited by the prime divisors of $N$. If we are allowed a little nudging here or there there are an infinite number of solutions.

If we want to find the proportions of the pieces as $a\times b$ in rectangles we must have

$aw = W; bh=H; abN=WH; wh=N$.

If you know $N, W, H$ we can set any one of the others, $a$,$b$,$w$, or $h$ to anything we like and express the rest in terms of them.

example: Let $h$ be a number we like.

Then $w = \frac Nh$

$a= \frac Ww$ and $b=\frac Hh$

(The fourth falls into place $abN= \frac {WH}{wh}N=\frac {WH}{\frac Nhh}N=WH$)

The number of edge pieces will be $2(w+h)-4$ (the $-4$ is because we don't want to count the corners twice.)