I'm wondering if it's possible to draw a cube without lifting your pencil. Similar to the old envelope one which i'm sure everyone has tried at one point, except this has a practical use. I'm trying to create a line list ( list of vertices with each successive vertex creating a line ) to represent a cube ( or whatever a 3D rectangle is called )
//
// 6 7
// ------------------------------
// /| /|
// / | / |
// / | / |
// / | / |
// / | / |
// / | / |
// / | / |
// / | / |
// / | / |
// 2 / | 3 / |
// /----------------------------/ |
// | | | |
// | | | | +Y
// | 4 | | |
// | |-----------------|----------| |
// | / | / 5 |
// | / | / | +Z
// | / | / |
// | / | / | /
// | / | / | /
// | / | / | /
// | / | / | /
// | / | / | /
// | / | / |/
// |/ |/ ----------------- +X
// ------------------------------
// 0 1
//
Not sure how the above ASCII art will turn out, but, i'm sure you'll get the idea. This seemed like the most appropriate forum to post this in... if not, i'm sorry :)
edit: The closest i've gotten is missing 2 lines, so any better than that would be good.
Hmm, I don't think so... At every corner, three lines meet. Thinking about it, if there are an odd number of roads going to somewhere, you'll have to either start or stop there. But since there are more than 2 corners, you can't do it without drawing some line twice?
*shrug* When I said two, I meant three. Is three missing lines the closest possible?
(http://users.hfx.eastlink.ca/~ebrooks/tiger.jpg)
Hope this helps / brings light:
http://mathforum.org/isaac/problems/bridges1.html
http://www.contracosta.cc.ca.us/math/konig.htm
http://members.aol.com/tylern7/math/euler-8.html
Euler almighty came to this solution (called "The Network Formula"):
V+R-L=1
Where:
V = Vertices (intersections) in the network
L = Lines in the network
R = Regions (enclosed areas) in the network
If it doesn't help, at least you got a little curios. Enjoy =)