Matchstick Snakes
This is based on a post by Ed Pegg jr in newsgroup alt.math.recreational.
Pictures
The original solution for a 30-degree snake in a 2x2 square as given on www.mathpuzzle.com
My brute-force solution, which is really identical.
Dave Langers' alternate solution as posted in this post.
Solution for a 30-degree snake in a size-3 triangle, consisting of 20 segments.
Solution for a 20-degree snake in a circle with radius 2, consisting of 66 segments.
Data
These output files from the brute-force programs list the exact positions
of the snake segments.
30-degree in 2x2 square
30-degree in size-3 triangle
20-degree in radius-2 circle
Source code
Warning, files are in Unix format (they have only linefeeds,
no carriage returns as in MS-DOS).
Finding 30-degree snake in 2x2 square
Finding 30-degree snake in size-3 triangle
Finding 20-degree in radius-2 circle
In order to draw the output logs in graphical format, here are
some programs that are cloned from each other :
Drawing the solution in a 2x2 square.
Drawing the solution in a size-3 triangle.
Drawing the solution in a radius-2 circle.
To be able to draw Dave Langers' solution, posted in his clock format, I used this.