Quote:
Originally Posted by Ensign Steve
So the reason your final solved image looks like a big circle (or 15-ish-sided regular polygon) is that your program starts with the largest face? If it started with a triangle, the final image would be shaped like a triangle on the outside, yes?
|
Yes, spot on.
Quote:
What do you use to draw the graphs? I downloaded JUNG but I'm not enamored with it. It has way more bells and whistles than I need. I feel like trying to cobble something out using plain old Graphics2D.
|
I've been using the simple Java graphics library written by Professor Sedgewick and his colleagues and recommended for us to use on his Algorithms course. It's really just a simple wrapper around the more standard Java graphics library - but it's great to use for stuff like this as it hides away unnecessary details and lets you just get on with drawing.
There are also simple Java libraries for reading from files and standard input, formatting output, playing sounds and music - all free and you can also browse and modify the source code if you wish.
Take a look at the so-called
'booksite' for Sedgewick's Algorithm course. Click on 'Code' and then scroll down till you see StdDraw.java There are instructions there on how to set up an environment where everything you need is included in the classpath - so all the functions are available as if they were built-in to Java - you don't even need to put "import blah.blah" in your source code to use it.