

Image Triangulation Experiment - gk1
http://snorpey.github.io/triangulation/

======
j2kun
I once tried implementing the classical Delaunay triangulation algorithm from
scratch and got close to a good solution, but never could iron out some major
bugs. I think of it as a testament to the difficulty of algorithms and
computational geometry.

~~~
minopret
There's a very clear exposition and implementation in the book and code
library _The Stanford Graphbase_. It's reasonably simple for the computer.
It's not so simple for the algorithm designer.

------
HardyLeung
Neat. I have a related project called Polygonian --
[http://www.polygonian.com](http://www.polygonian.com) \-- runs on browser and
requires Chrome Native Client that does something similar. Here's the output
of a Lincoln portrait using similar point count:

[http://imgur.com/lpKVILV](http://imgur.com/lpKVILV)

~~~
spydum
seems like it's using gradients? for some reason looks less.. triagular that
way

~~~
HardyLeung
Yes, linear gradient within each triangle. It has a non-gradient mode but not
turned on. The difference is minor though: Gradient = more "silky" and less
triangular. No gradient = a bit more flat.

------
wgx
This one's older, but a lot more fun IMO
[http://alteredqualia.com/visualization/evolve/](http://alteredqualia.com/visualization/evolve/)

------
bane
Ack, I thought this was a way to use two photos of a location from different
angles to figure out where in the world it is.

------
pimlottc
> "drop an image in the browser to triangulate it."

Am I the only one who finds this annoying? I would much rather be able to use
any image on the web by submitting a URL than searching for something on my
local drive.

~~~
pornel
Unfortunately the platform makes the annoying solution easy, and the one you
prefer hard.

D'n'd and forms give full access to the image data relatively easily, and it
works completely client-side without server's involvement.

OTOH due to same-origin policy getting data from a random URL on the Internet
is (intentionally) hard. "Simple" proxying via own server is tricky to do
without accidentally building tool that could be abused for DoS or anonymous
download of something that you wouldn't want to be associated with.

~~~
pimlottc
Good points, I hadn't thought about the app being completely client-side and
the restrictions that entails.

Still, in ye olde times, it was pretty common to accept image URLs. You might
be able to do some fairly simple rate limiting on the proxy to help prevent
abuse. Maybe the net was just a more innocent place back then.

Anyhow, if it only works with images dragged from the user's local computer,
it should really say so. It's especially confusing on Chrome, where UI cues
like the mouse cursor changing suggest that dnd between windows should
actually work. It generates a drop event and everything, although it appears
that the DataTransfer item just contains the image URL and not its actual
contents.

