4 colors theorem software

We have a JavaScript applet: https://www.kleemans.ch/four-color-theorem-map-solver
We draw a contour only by thick black straight lines. When you press “Solve” button, areas are colored, according to the 4 colors theorem, no more than 4 colors. Under the table for painting, there are several prepared examples. The program can be downloaded here:
https://github.com/akleemans/fourcolors
It seems that everything is working properly. The problem arises when we put another contours into the folder “examples”. Here is the version with contours, which I created in Paint:
https://drive.google.com/open?id=0B-u7dqmskzd5c0lDdDRGc1dMY1E
The program colors my contours areas (the first five examples), more than four colors. I don’t know why it happens. I wrote in this matter to the author, but he isn’t responding. I completely don’t know JavaScript. I only know that this code line stops procedure after 10 seconds:
if (millis () - start> 10 * 1000) {break; }
If we delete this line, the browser crashes error. I will be grateful for any help. Maybe someone of you knows any simpler way to realize idea of coloring the contours areas using 4 colors theorem? Maybe there are any other programs? It seems to me that this applet has everything what I need and it’s necessary to modify it only just a little.

Hi stellatus161 welcome to the forum

I’m confused. There are Java applets, but I have never heard of JavaScript applets.
The GitHub repo has a minified version of the script, but I didn’t see a development version.
The kleemans site has examples, but I did not see anything referring to “contours”
The drive file is broken. Did you give it an incorrect file extension?

Hi Mittineague,

Thanks a lot for your answer.

  1. For me applet means the same like little program or software. Can’t I talk like that?
  2. Exactly, in GitHub there is a file processing.min.js. “Min” means minified? This code is completely mess.
  3. Examples are contours.
  4. The link works correctly in my browser, but it isn’t necessary. My Paint contours are here:
    http://chomikuj.pl/stellatus/4+color+theorem+solver
    Please put them in “examples” folder.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.