4 ms·
I've played with this kind of stuff in the past, it's a lot of fun. Have you tried shading the triangles so each is colored as the interpolation of the color at
by pacaro 11y ago
I've played with this kind of stuff in the past, it's a lot of fun. Have you tried shading the triangles so each is colored as the interpolation of the color at the vertices?
I've wondered what a video codec for this would look like, compute the triangulation for I frames and in between just tweak the location of the points, when triangulation is totally broken, time for a new I frame. It's somewhat slow to compute, but displays well on hardware optimized for displaying triangles...
- EllipticCurve 11y agoDidn't think about that, good idea as a small extension! But I don't think, a video codec would work. Or maybe just with very few points/triangles. Depending on the point-selection (equally distributed is a lot faster!) it takes some time between 50s to 5 minutes for a triangulation of about 4000 Points. For just a few hundred it could work, but I don't think it's good enough for real-time. (Displaying is no concern. You can render thousands of triangles in real-time)
- pacaro 11y agoI'm startled at your triangulation time. I last did serious work with Delauney triangulation in 1998 or so, and was triangulating ~1000000 points in a few of hours (on a machine with only 4MiB of RAM)
- EllipticCurve 11y agoNever tried so many points, maybe I give it a try later. I think it's part time the language choice and the fact, that my algorithm probably runs in Omega(n logn) but might not reach O(n logn)... Maybe you got an idea: My bottleneck is to find the triangle in which a new point lies. Right now I go through the triangle-mesh in the direction of the point, hoping to find the right triangle fast. Most of the time, it does ...
- pacaro 11y agoMaintaining a quad-tree of your triangles will give you O(LogN)lookup