DONE: Automatically compute sizes of tangram pieces - DonationCoder.com
HOME | Blog | Software | Reviews and Features | Forum | Help | Donate
Welcome Guest. April 25, 2015, 01:18:44 PM

Or did you miss your validation email?

Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.

 You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 Learn about the DonationCoder.com microdonation system (DonationCredits). Entire Forum This board This topic Members Help Desk Entire Site
Pages: [1]   Go Down
 Reply  |  New Topic  |  Print
 Author Topic: DONE: Automatically compute sizes of tangram pieces  (Read 7671 times)
rmo
Participant

Posts: 3

 « on: February 29, 2012, 08:23:37 PM »

A really cool software for my workshop, should not be complex, I would not think.

Basically, I make tangram puzzle pieces. Wooden ones for kids and grownups alike to play with. But there has to be an easier way to figure out the piece sizes.

What I would like to do is be able to input ONE number and all the pieces' side lengths are automatically calculated. So, I can make a tangram any size I want without having to take time to figure out the size of every single piece. If, say, I wanted to make the large square with a base of 10 inches, the program could figure all the lengths.

Here's the breakdown on size relationships, but the image shows it pretty well:

There are seven pieces to the puzzle, arranged in the image as shown to make a square: 5 triangles, 1 square and 1 parallelogram. The triangles are all isosceles, with 2 small ones, 1 middle size, and 2 large ones.

As you can see, the large triangles' hypotenuse is equal to one side of the whole square. The middle triangle's legs are 1/2 the length of the square. The small triangles' hypotenuse is 1/2 the length of the square. The small square's side is equal to 1/2 the middle triangle's hypotenuse, or the whole length of the small triangles' leg. The parallelogram's long side is equal to 1/2 the whole square's side, while the short side is equal to 1/2 of the hypotenuse of the middle triangle.

Is this doable?

Thanks!

Ron
 Logged
skwire
Global Moderator

Posts: 4,336

Another Coding Snack request? Om nom nom...

 « Reply #1 on: February 29, 2012, 11:07:31 PM »

Here's a preliminary screenshot:

 Logged

Target
Honorary Member

Posts: 1,463

 « Reply #2 on: March 01, 2012, 12:56:56 AM »

FWIW there are apps around that do similar things, ie calculating 'best fits' for cutting the maximum number of pieces out of a flat plane.

are there likely to be any more variables, eg varying the number of pieces?

and a suggestion - I have no idea if this possible or not, but it may get someone thinking.  Instead of measuring the sides, how about a drawing type application that lets you pick and place the various shapes into a defined outline.  The resulting image could be printed out and used as a 'template' (stick it onto your chosen material and cut along the lines)
 Logged

"Look wise, say nothing, and grunt. Speech was given to conceal thought" - Sir William Osler
cranioscopical
Friend of the Site
Supporting Member

Posts: 4,267

 « Reply #3 on: March 01, 2012, 07:43:54 AM »

Nice work, and back in under three hours
 « Last Edit: March 01, 2012, 08:43:48 AM by cranioscopical » Logged

Chris
rmo
Participant

Posts: 3

 « Reply #4 on: March 01, 2012, 01:43:11 PM »

Here's a preliminary screenshot:
(see attachment in previous post)

YES! Perfect!
 Logged
skwire
Global Moderator

Posts: 4,336

Another Coding Snack request? Om nom nom...

 « Reply #5 on: March 01, 2012, 03:05:32 PM »

YES! Perfect!

Here you go:  Tangram Calc
 Logged

rmo
Participant

Posts: 3

 « Reply #6 on: March 01, 2012, 08:56:26 PM »

Thank you so much!

Now I can input some numbers for different size tangram puzzles to see which sizes are easiest to make. Works like a dream and I love that it can be more or less exact, depending on what decimal points I want.

Now if only it could sharpen my saw blades!

Thanks again!!

Ron
 Logged
skwire
Global Moderator

Posts: 4,336

Another Coding Snack request? Om nom nom...

 « Reply #7 on: March 01, 2012, 11:27:58 PM »

You're very welcome.  I'm glad you've found it useful.  =]
 Logged

Pages: [1]   Go Up
 Reply  |  New Topic  |  Print