Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
puzzle

Subject: puzzle

From: Pusok Lorand

Date: 15 May, 2011 17:35:04

Message: 1 of 3

Hello I need help to make my project, and I would like to ask from Matlab Central.
So, I have a square box witch the computer must divide at random in unghiular parts
 then the user must put the parts back as they where in the square
 the second part , the user must displace the parts and the computer must put them back.
Thank you very much your help :)

Subject: puzzle

From: John D'Errico

Date: 15 May, 2011 17:51:05

Message: 2 of 3

"Pusok Lorand" wrote in message <iqp2s8$e5s$1@newscl01ah.mathworks.com>...
> Hello I need help to make my project, and I would like to ask from Matlab Central.
> So, I have a square box witch the computer must divide at random in unghiular parts
> then the user must put the parts back as they where in the square
> the second part , the user must displace the parts and the computer must put them back.
> Thank you very much your help :)

What have you done? What is your question?

We will not do it for you, as the important part of such
a project is in thinking it out. This is what you are
being asked to learn.

Define the problem. Break it up into small manageable
parts. Solve each part, one at a time. Eat a programming
elephant one byte at a time.

Subject: puzzle

From: Roger Stafford

Date: 16 May, 2011 02:48:05

Message: 3 of 3

"Pusok Lorand" wrote in message <iqp2s8$e5s$1@newscl01ah.mathworks.com>...
> Hello I need help to make my project, and I would like to ask from Matlab Central.
> So, I have a square box witch the computer must divide at random in unghiular parts
> then the user must put the parts back as they where in the square
> the second part , the user must displace the parts and the computer must put them back.
> Thank you very much your help :)
- - - - - - - - -
  I assume that 'unghiular' is Romanian for 'angular', 'triangle', 'quadrangle', or, in general, a planar polygonal piece. (Or does the word "box" imply you are dealing with a three-dimensional object?)

  As John says we cannot solve the problem for you. However, I would suggest if it is polygonal pieces you are to assemble, that you find the inner angles of each polygon and the lengths of their edges. In searching for various ways of assembly I believe it would be helpful to find angles on different polygons that add up to 1) 360 degrees for possible internal points, 2) 180 for the square's edges, and 90 degrees for the square's corners. Also look for cases where angles sum to 180 and fit against another polygon edge without a vertex there. Another thing to look for are edges that have equal lengths. By taking such things into account you can hopefully reduce the total number of ways of arranging the polygons.

  Still, if the square is divided into a very large number of pieces there is a frightening number of combinations to try altogether. It is hard for a computer to compete with a human assembling the pieces of a jig-saw puzzle. It is something that humans do very well.

Roger Stafford

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us