Inkscape Extension: Puzzle Generator

I’ve started playing around with making jigsaw puzzles and have found a lot of the prior art to be very useful in getting me going quite quickly. After a bit of work though, I became less pleased with the generator I had found on here (Jigsaw puzzle generator). It was super useful but I found the amount of variation in the pieces was less than I desired.

Inspired to do more and with a desire to learn a bit of programming for Inkscape, I dove into understanding how it worked and what I could do differently.

The result:

For the most part, this is just a port of the work done for the generator above, but with one minor and one major change so far.

Minor change: the lines are colored for ease of separate jobs and the paths are oriented to minimize head travel (it should cut back and forth instead of only cutting one way).

Major change: the original code had fixed points for all the corners of the pieces - this meant that all the pieces were the same size just with different curves on the sides. I added one more random parameter that controls how much variation there is in the location of the corners.

A few examples:
With no random corners (so basically matching the original generator):
image
With a moderate amount of random:
image
With a lot of random:
image
And yes, with extreme values, it is easy to create puzzles with crossing lines - I didn’t try to prevent it (it was hard :slight_smile: ) and left it up to the user to spot and avoid.

The main page of the github repro should have enough information to get the extension installed and used.

Would love to hear any feedback and/or ideas for other puzzle variations (or even better: submit a pull request!).

24 Likes

Awww, man, I wish you wrote Illustrator plug-ins! Now I have to ask myself if it’s worth downloading and learning Inkscape so I can use this juicy extension. Thanks! :laughing:

3 Likes

I definitely can’t write Illustrator plugins (I don’t own it :slight_smile: ) but I will say that downloading and using Inkscape to generate this SVG and then using it in Illustrator is probably not too hard to do. You definitely don’t need to learn Inkscape much to just run the extension and copy/paste the result…

3 Likes

That’s exactly how I feel every time I see a real cool illustrator plug-in .

3 Likes

Nice! I’ll give it a try.

If you can duplicate this, I’ll pay ya :slight_smile:

8 Likes

Ditto!

My very first share with the group…

1 Like

I can’t get it to install for some reason, but I have Inkscape installed on a Mac - running through XQuartz. I seem to remember this being a problem before at some point though. Even going into the package contents and installing into the native Inkscape extensions doesn’t get it to show up.

Wow. I’m going to need some time to parse that - but I’m tempted!

1 Like

Unfortunately, I don’t have a mac to try it on - I’ll poke around to see if I can spot anything and I’m happy to make changes if it becomes obvious what needs changing…

Just got it to work… I downloaded the zip file, rather than the individual px/inx files. Then placed those in the directories (it’s actually reading both copies now, so will delete the ones from the native directory).

For whatever reason, it reads now. No need to spend any time on your end!

Great!

1 Like

Very cool! Thank you! I might just need this in the days ahead…

Now that I’ve had some coffee (instead of the whiskey I had last night while reading it the first time) and read through this paper (twice), what they’ve done makes perfect sense… from a high level. :slight_smile:

I’m trying to decide now whether or not I’m going to fall into this rabbit hole and attempt to understand and recreate the actual math they are doing - I really like the results they were getting so it is very tempting. I’ll let you know if I take a run at it!

4 Likes

Outstanding!
First, the actual program works great. Good features.
Even more important in my opinion, you provide clear, straight-forward installation and use instructions. There are a lot of folks who can code, but few who can document. Well done!

4 Likes

Works great by the way. Path direction, the color coding, etc. all work perfect.

8 Likes

Thank you for the extension.

2 Likes

Great! I’ll have to have a go at another puzzle! Thank you for sharing!

2 Likes

This topic was automatically closed 32 days after the last reply. New replies are no longer allowed.