Skip to main content

Timeline for answer to Paint Starry Night, objectively, in 1kB of code by Marco13

Current License: CC BY-SA 3.0

Post Revisions

19 events
when toggle format what by license comment
Dec 28, 2021 at 4:31 comment added stevec +1 for the last one. It's beautiful!
Oct 17, 2016 at 21:28 history edited mbomb007 CC BY-SA 3.0
edited body
Aug 7, 2016 at 14:53 comment added Marco13 @MegaMan I only had to golf it a little, to obey the 1024 bytes limit. Golfing it more could allow me to use maybe 9 or 10 points instead of 8, but I tried this, and the results had not been better then. Again, this was mainly recreational/experimental to try out the path of Voronoi+Optimizer, knowing that there are other approaches that could yield a higher score.
Aug 7, 2016 at 8:19 comment added univalence You could golf a lot though removing whitespace so you can try to optimize further.
Feb 19, 2016 at 14:01 comment added DeveloperACE If you could put it on github that would be great! I'm in no hurry so take your time.
Feb 19, 2016 at 13:59 comment added Marco13 @ACE I see. If you have Java, you can just type javac V.java to compile it, and java V to run it, and it will create the image. (But to avoid misunderstandings: Of course this does not do the Voronoi computation or this animation thingy. It just runs the image generation program, using the Voronoi points that I computed with a (larger) program that employs the techniques that I described). Maybe I can throw this on GitHub as well, but it's rather messy, it would take some time to clean it up, and I'm rather busy with other stuff ATM).
Feb 19, 2016 at 13:51 comment added DeveloperACE Yeah, I'm just trying to find out how I can run this on my computer...
Feb 19, 2016 at 9:56 comment added Marco13 @ACE I'm not sure what the term "App" refers to here, but I assume that the answer is "Eclipse" ...
Feb 19, 2016 at 2:56 comment added DeveloperACE @Marco13 what app did you use to write this code in?
Feb 15, 2016 at 20:04 comment added Marco13 @ACE What exactly should this library do? For the "fine grained" voronoi pattern, there already are sophisticated image manipulation programs. The optimizer was straight from the apache library. And beyond that, I hardly see a realistic application case for "creating a voronoi diagram (with few points) that resembles an image".
Feb 13, 2016 at 22:21 comment added DeveloperACE You should make a library for this
Jan 29, 2016 at 14:43 comment added Marco13 @neocpp There are different optimizers in this package. I tried others, some use only some gradient-descent, and some use GA-like approaches as well (at least that's what I guess, when they have a parameter called "population size"). And that's the problem: The algorithms have many parameters, and their meaning is not always obvious. (I even considered writing a meta-optimizer, that tries out different parametrizations for the optimizers, to see which parametrization brings the best end result ;-)). It's a complex topic, and I'm no expert. BOBYQUA worked ok-ish, so I used it
Jan 29, 2016 at 13:10 comment added neocpp I don't quite know how the optimization works (it looks deterministic to me), but it may help to run a few cases with random starting vectors if it's fast enough. At least when I ran my GA with 8 points it consistently found solutions which were a few hundred points below what was posted, and increasing the number of points seemed to produce strictly better solutions.
Jan 29, 2016 at 10:18 comment added Marco13 @Chloe I tried this, to some extent: Increasing the number of points to 10 or 12 caused a lower score in the end. It's certainly possible to tweak the optimizer to achieve a higher score there, or golf the code even more and then use maybe 14 points (and then possibly achieve a higher score with the current optimizer configuration), but there are far too many degrees of freedom to explore this exhaustively. I just thought that this Voronoi thing may be a neat idea, and tried to achieve a "good" result with reasonable effort.
Jan 29, 2016 at 0:53 comment added Chloe You can squeeze a few more bytes using import java.util.*; In fact change all import classes to asterisks.
Jan 28, 2016 at 18:09 comment added Marco13 @neocpp I added a short paragraph and an example image with a larger number of points.
Jan 28, 2016 at 18:09 history edited Marco13 CC BY-SA 3.0
added 756 characters in body
Jan 26, 2016 at 20:28 comment added neocpp +1 Voronoi is a good idea, with more points I think the image will look pretty good subjectively speaking (at least the art style should be interesting). I'll probably try it out in a bit if you don't mind.
Jan 26, 2016 at 20:08 history answered Marco13 CC BY-SA 3.0