I am trying to emulate the representation of Leonardo da Vincis Mona Lisa as a continuous-line drawing at Enhanced graphs and Networks When I attempt it with an image of my own, it gives me an error on the last line;
Part::partd: "Part specification res[] is longer than depth of object. \!
It seems res has gone missing, how do I fix this?
10 months later, I tried again, (i think my version of Mathematica is updated) and it worked, no problems!
Did your kernel crash? The thing is that the error message says that res[] does not exist. So it either has never been calculated or it was deleted. The latter could happen if the kernel died on you, say because it ran out of memory or so.
My understanding of the error is that res is the list of shortest path points. res[] should access points from the list, as this is the same as the Part command, perhaps res is going out of scope when it shouldnt. Why this happens to me, and not to others I have no idea.
I am using Linux Ubuntu 14.04. I'll try the Wolfram Programming Cloud.
I tried again with a different image (I used Jorge Luis Borges image), in Mathematica it failed again at the last command, res[] error again.
This time it didnt work in CDF Player either, same res[] error
That is strange indeed. The error seems to say that the array res is not what we expect it to be. Have you had a look at that variable?
On which operating system are you? I have tried this on a number of Macs and it works alright. I just tried in in the Wolfram Programming Cloud and int works fine, too. Perhaps you can make a free Wolfram Programming Cloud account and check whether it works for you there?
I have resized the image programatically using:
It's not the Grayscale command. If I open the notebook in CDF (Player 9) it loads quickly, and produces the final tour image. However if I open it in Mathematica, and try to evaluate the notebook (it doesn't matter if I evaluate line by line, or the whole notebook at once), it always gives the same error on the last line.
That's odd. I wrote Graysscale, it reverted to grayscale. I changed it back again to Grayscale and it reverted to grayscale again. Perhaps i wasn't saving the notebook properly?
I have changed grayscale to Grayscale and it seems to work.
The notebook is attached.