6
$\begingroup$

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.

$\endgroup$
  • 1
    $\begingroup$ Welcome to the site! $\endgroup$ – Rand al'Thor Mar 10 '18 at 19:38
  • 1
    $\begingroup$ 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. $\endgroup$ – Rand al'Thor Mar 10 '18 at 19:41
  • 4
    $\begingroup$ Do the shapes need to be convex? Can the lines cross over each other (for 4 or more sides)? $\endgroup$ – Dr Xorile Mar 10 '18 at 19:47
  • 4
    $\begingroup$ 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? $\endgroup$ – Penguino Mar 11 '18 at 23:32
  • $\begingroup$ 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. $\endgroup$ – theshoal12 Mar 12 '18 at 22:14
1
$\begingroup$

This is only a partial answer for the case of triangles:

There are 16 points and we want to pick three to make a triangle. 16C3=560. However for each row (or column), there are 4 ways that the three points can be chosen in a line, resulting in 560-4*4*2=528 possibilities. Now, we must examine the diagonals: these can be easilt counted. There are clearly 4 "3-diagonals" and 2 "4-digonals" with four possibilities each. Therefore, there are 528-4-2*4=516 triangles

Hope this helps!

Also, clarify what you mean by "shape". Can the lines cross over each other? Do the shapes have to be convex?

$\endgroup$
  • 2
    $\begingroup$ You also need to account for reflections and rotations (and possibly displacements as per Penguino's comment). $\endgroup$ – hexomino Mar 12 '18 at 10:44
  • $\begingroup$ @hexomino I'm not sure if im misreading this situation but OP never confirmed it? $\endgroup$ – Praneetmek Mar 12 '18 at 23:41
  • $\begingroup$ Since the beginning of the edit history, the question has always said "ignoring reflections and rotations", translations are now included in more recent updates. $\endgroup$ – hexomino Mar 13 '18 at 10:33
  • $\begingroup$ @hexomino my apologies! i cant read $\endgroup$ – Praneetmek Mar 13 '18 at 16:59

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.