Skip to main content

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

Current License: CC BY-SA 3.0

Post Revisions

8 events
when toggle format what by license comment
Feb 16, 2016 at 20:36 comment added jamieguinan I tried using a filled-circle function based on the one you suggested (see also). It runs 170x faster, and with extra code space I was able to add another circle and optimize the score down to below 6500. Fun stuff. github.com/jamieguinan/starrynight
Feb 15, 2016 at 7:59 comment added neocpp That's interesting, as I wouldn't have been able to come with with an algorithm like yours on my own. It somewhat reminded me of the scan line circle fill algorithm (the name escapes me right now, but it's useful to avoid checking many points), but since it worked on decreasing radii I was curious if there was some special property to this one.
Feb 15, 2016 at 7:50 comment added jamieguinan @neocpp I thought there might be a simpler way to draw a circle, but I wanted to code this without googling anything, and using the trig functions was the best I could come up with. The algorithm you suggest is great, and probably faster, but it was not obvious to me.
Feb 14, 2016 at 6:26 comment added neocpp I really like this answer, but is there a reason you used this particular circle drawing function? The obvious version (check if ((x-xo)*(x-xo) + (y-yo)*(y-yo)) <= (r*r)) seems like it would be shorter and take out the dependency on math.h. With this size of image I don't think anything has a chance of overflowing either.
Feb 1, 2016 at 17:54 comment added oligofren Kudos for doing actual programming!
Jan 30, 2016 at 2:35 history edited jamieguinan CC BY-SA 3.0
added 141 characters in body
Jan 30, 2016 at 2:11 review First posts
Jan 30, 2016 at 2:16
Jan 30, 2016 at 2:09 history answered jamieguinan CC BY-SA 3.0