POV-Ray : Newsgroups : povray.general : POV-Ray question regarding simple graphical output : Re: POV-Ray question regarding simple graphical output Server Time
30 Jul 2024 14:30:32 EDT (-0400)
  Re: POV-Ray question regarding simple graphical output  
From: Carl
Date: 7 Dec 2008 11:25:01
Message: <web.493bf6ebd17c5e789948e10@news.povray.org>
Larry Hudson <org### [at] yahoocom> wrote:
> About 20+ years ago I wrote one in C, which I periodically rewrote every
> 5 years or so as my programming skills improved.  Eventually I did it in
> C++ as well.  (Although these were specifically pentomino programs, not
> generic polyomino solvers.)

I started off with pentominos too but wrote the code general enough that it
could be used with just about all the polyominos.  I remember defining all the
shapes for the octominos but though my code did work with them it wasn't
optimized enough to be able to actually find solutions to any shapes in
anything close to a reasonable time.  I so wish I still had that code, I'm so
rusty at coding now it will take me a while just to figure out how I did the
backtracking.  If you are interested in the type of puzzle I'm trying to solve
with backtrack now here is an example:

http://www.smart-kit.com/s1512/untouchable-11-visual-spatial-puzzle-contest/

I'm listed there as Carl H and I've solved the hard and very hard versions by
hand but solving the Impossibly Hard version by hand is taking a long time.
The person who made the puzzle is aware of two solutions so it sounds like he
himself isn't aware of how many there might be so now I not only want to solve
it but to find out just how many solutions it has.

> HOWEVER, these were all DOS-based programs
> using the text-mode screen, but with colored block characters.  I never
> did succeed in doing a real graphical version.  In addition, they used
> some direct-to-text-screen-writing routines that I also wrote myself.
> Besides displaying the results, it saved the solutions in text files as
> well.

I think I'll start in Quick Basic 4.5 and also use colored block characters.  I
know how to get it to write the solutions to an ascii file as well.

> I probably still have these sources floating around here someplace, but
> I don't know if I could find them -- I'm VERY disorganized here.    :-(

Believe me I know, I'm the same way.  I've just spent the last two days scanning
about 500 3.5 inch floppies to see if I had a copy of my old program somewhere.
No luck.  So I'll be starting from square one.  If you can find your source code
I'd love to take a look at it.  I did some digging on-line as I remember when I
did this the first time I was pretty much following an example I had found.
The best I can find now is this:

http://ce.et.tudelft.nl/~knop/puzzles.html

And I think I can work from the pseudo code found there.

> If you want to learn a "real" programming language, one that is often
> recommended as a first language is Python.  It's a beginner's language
> in that it's quite easy to learn, but it's a VERY effective and useful
> language (with graphics libraries as well).  It's much more versatile
> than any version of BASIC.  You might find this link an interesting
> read:  http://www.linuxjournal.com/article/3882
> And Python is open-source and available free for Windows, Linux and the
> Mac.  Of course, this has nothing to do with your polyomino question...

Nice article.  You are the second person to recommend Python to me and I now
have it downloaded and installed on my PC.  That article was also a very
interesting read but looking at the sample code he posted here:

http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/038/3882/3882l4.html

makes me nervous.  I'm sure he's doing something well over my head but it looks
like Greek to me.  I think I'll get some working code in Quick Basic first and
then start with some very very simple tasks in Python first and from there see
if I can port my code over and add the pretty graphics.

I've also read many good things about C and C++ and to be honest I'm not sure of
the difference between the two but I've never be able to find the time to try
and teach myself either and what exposure I have had makes me think I should
try to take a couse instead of jumping in by myself.  Python sounds like
something I might be able to teach myself on my own.  I did ok learning POV-Ray
and found the whole process fun and enjoyable.

Thanks for ALL the help everyone.  If anyone has any polyomino solving code they
are willing to share in any language I'm all ears.  If I get some working Quick
Basic 4.5 code that can solve the Untouchable 11 problem I'll be happy to share
it with anyone that is interested.  Maybe I can even find some help porting it
to something that makes it look pretty.

Again thanks for all the help.  The group here is one of the smartest and
friendliest I've ever sound on line.

Carl


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.