# How many possible different shapes are there on a 4x4 dot grid?

Alright. This math required to do this is way beyond me, so please be patient.

I edited this a lot to make the question more solvable and easier to understand, without making the answer less useful or the previous work done go to waste.

I would like to know how many shapes can fit on the grid:

• A shape just a pattern of connected dots. The dots that are connected don't have to be adjacent.

• I'd like to know about polygons. For example, how many different triangles are possible on the grid, how many squares, how many pentagons, hexagons, heptagons, and octagons. Please ignore translations, reflections, and rotations.

• Note that shapes can be convex or concave.

• What is the most amount of sides that can show up on a polygon on the grid?

• I'm more interested in polygons that have three to eight sides than I am in polygons with more than eight sides, but I am still open to any facts you find about the grid.

• I'm also interested in shapes that aren't polygons. There's so many of them that I'm honestly not sure how I'll implement them (more on how I'm using the shapes in a few paragraphs), but I'll think of something.

It would be super cool if someone could write a computer program to make a small image of every possible shape (ignoring reflections, translations and rotations) sorted by similarity.

• For example, the first shape would be just one point. Then the second shape would probably be two points with no pegs in between them. And then next two points that have no pegs between them, but are positioned diagonally, because Pythagoras says so. Then the next shape would be two dots that are one peg apart. And then two points that are one peg apart but positioned diagonally, and you get the point.

• However, if it turns out that this kind of program would be impractical to write, or there's like a hard drive's worth of shapes on the grid, than that's ok.

The question ends here, from here on I write about why I need to know something so random:

The reason I want to know all of this is because I have a really cool idea for a crafting mechanic that I'd like to put in a video game someday. It would make the player able to make items based off the properties I assign to the shape they put in the grid, not based some pre-made recipe. However, I'm still in my senior year of high school, so my math and programming skills still have much to be desired. That's why I'm planning it on paper until I finish my required education, and I need help getting this part figured out.

• Welcome to the site! – Rand al'Thor Mar 10 '18 at 19:38
• I found some relevant links: Reddit, Maths Educators SE, Free Math Help. None of these are quite as general as what you're asking for, but they might give you some useful ideas - or at least an idea of how hard this puzzle is. – Rand al'Thor Mar 10 '18 at 19:41
• Do the shapes need to be convex? Can the lines cross over each other (for 4 or more sides)? – Dr Xorile Mar 10 '18 at 19:47
• Do you also want to ignore displacements? For example, is a 1x1 square the same if it is in the top left of the grid, or displaced right by one 'step' towards the middle of the grid? – Penguino Mar 11 '18 at 23:32
• The shapes can be concave or convex. It's OK for the shapes with 5 or more lines to have intersecting lines. However, I know this problem is pretty ridiculous, so if it's easier to ignore the shapes with lines that cross over each other, that's totally fine with me. – theshoal12 Mar 12 '18 at 22:14