
Shapeme – Evolve images using simulated annealing - antirez
https://github.com/antirez/shapeme
======
antirez
Context:
[https://news.ycombinator.com/item?id=8710147](https://news.ycombinator.com/item?id=8710147)

~~~
ics
This is how you fuel the HN addict.

------
phkahler
Now do video compression with it. Do the first frame just like this, then
start with that as the first generation to evolve the next frame and so on.
Maybe have a way to dynamically vary the number of triangles - especially when
the scene changes, you may even want to discard everything and start over if
the first generation on a frame is a bad fit. Resolution independent video
compression at last ;-)

------
fogleman
I also used simulated annealing for this problem. But I only added one
triangle at a time.

[http://stackoverflow.com/questions/3848108/reproducing-
image...](http://stackoverflow.com/questions/3848108/reproducing-images-with-
primitive-shapes-graphics-optimization-problem)

I'll see if I can dig up the code.

It's a fun problem. I still think about it a lot.

------
JohnHaugeland
Neat.

I did one of these too, a while back:
[https://github.com/StoneCypher/canvolver](https://github.com/StoneCypher/canvolver)

~~~
tekni5
Very cool, easy to test as well.

------
elwell
You don't have to be so self-deprecating of your code quality.

~~~
throwaway823734
Although in this case, to be honest, the code is not that great. Lots of
repetition/noise-- plenty of opportunity for factoring.

~~~
bkirwi
If you find yourself creating a throwaway just so you can criticize someone's
coding style on a quick graphics experiment, you may want to reconsider your
life choices.

~~~
antirez
np I'm a strong believer in internet anonymity ;-) And btw the user was not
mean, there are people on Twitter that with their real names are very
offensive, so probably not just a matter of being anonymous or not (but that
plays a role also, indeed).

------
MasterScrat
FYI this is from the guy who makes Redis.

------
based2
[http://www.arte.tv/guide/fr/044053-000/la-joconde-
devoilee?a...](http://www.arte.tv/guide/fr/044053-000/la-joconde-
devoilee?autoplay=1?autoplay=1)

