PDA

View Full Version : A visual puzzle


FuglyP99
05-17-2011, 06:31 PM
I was watching a series of lectures on Youtube when the professor described a puzzle that I found particularly interesting. It goes like this:

You have a triangle. Let's say it is equilateral.

You pick a corner of the triangle.

You draw an imaginary line from that corner halfway to another randomly chosen corner. Plot a point at the halfway mark.

You then pick another corner at random, and draw another imaginary line from the point you plotted, halfway to that corner, and plot another point.

You repeat that last step, say, a few thousand times.

What is the image that begins to form as more and more points are plotted?

You might be surprised.

I decided to write a little program to do it. If you're curious, you can download it here and see for yourself: http://www.cilution.net/Triangle.zip (you need Java installed to run it)

Try to guess what will be produced before letting the program show you.

Source is also included, if any of you out there are code monkeys like me.