We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hey guys , I am trying to run this: https://github.com/mxgmn/ConvChain
Which has a processing version over here: https://github.com/buckle2000/ConvChainJava
How am I supposed to set it up correctly? I cant quite get it to work, im getting some errors.
I am assuming I was to run main.java...
Thx! :)
Answers
Re:
How have you set it up currently?
What specific error are you getting?
it's a java project that uses the processing library, you need to compile it using ant or mvn or a makefile or an ide or something, none of which is provided (pet hate of mine)
that's enough to get you the class files... i haven't got as far as running it...
(works in netbeans if you add the core.jar to the project)
(still can't get it to run from the command line)
ok, quick port to non-java8 here:
HOWEVER, the results look different from when i run it in netbeans so there might be a logical error somewhere. (original code left as comments)
(you'll need the images from the original copied into data folder)
ok, fixed. error was line 221
@jeremydouglass
Nevermind, obviously I was trying to run the main java file like a dummy.
@GoToLoop
Oh dear I hadnt anticipated it was going to be this complicated...im not familiar at all with this lamda stuff.
@koogs
You can run it in netbeans? (never heard of this) I'd like to run it in processing if possible...such a cool code.
Might be a bit beyond my skills....let me know if you figure it out
There is also a javascript port of a later version: https://github.com/kchapelier/wavefunctioncollapse (which includes colour) and a python version: https://github.com/ikarth/wfc_python (colour)
you mean like in the post directly above that one? posted 90 minutes earlier?
that huge slab of code is the processing version.
@koogs
Oh, haha! I thought you were just reposting the original main.java...so you actually have it working in processing on your end? Im not understanding what I would need to do to make it run....you have the pattern.java and generator.java together in that slab of code?
I have the original images in a folder called data, like you say.
I get a: unexpected token: href
tabs in processing are a falsehood, just there for organisational purposes. that code has the Pattern and Generator classes in it, which is enough.
cut and paste the entire thing into the editor, add the image using the menu or drag and drop and hit ctrl-r to run.
it's not very spectacular.
@koogs I see. Its not working for me though, im getting the error
"unexpected token: href"..?
I have the same images in the data folder.
Line 69 should just be @Override. The forum software breaks things.
Ah, think you can post it to pastebin? :3 Im getting a different error now: unexpected token > on line 107
Ah, ok, I think the pattern and generator classes have to be in files with .java extensions. I'll fork it on github.
here: https://github.com/acdean/ConvChainProcessing
download as zip file, unzip into your sketchbook and it should run.
@koogs
Wow! You rock man! Just one question, I want to remove the sample image from the processing window (which I have done) but how do I centre the output image to fill up the entire window?
https://imgur.com/a/znK2J
Clicking the up and down arrows seems to make it iterate, not sure if there are other keys im missing. Great work.
line 66 is the drawing.
image(output, 128, 0, 128, 128);
top left corner is at 128, 0 and is 128x128 in size. see the reference.line 70 - any key makes it iterate.
i'm still not sure what it does, what it's for...
Oh, I was also attempting to convert it. But for now my custom version is buggy! 3:-O
I've tried to make the
boolean[][]
array to represent row × col instead, but I've failed! X_XNonetheless, gonna leave its download link here for now: 8-X
https://GitHub.com/GoToLoop/ConvChainP5/releases
@koogs Got it now, thanks :) Looks great!
@GoToLoop I dont get whats wrong with it? Looks good to me, is it because you can't scale it bigger? How would I do that? ...ohh, changing the grid size is nice!!
Also if anyone feels up to the task...the colour version is probably a lot cooler: https://github.com/kchapelier/wavefunctioncollapse
...this is the javascript version. Has other options like N amount and symmetry.