Comment

Comment by vanderZwan

Really cool!

So it looks like you're first applying Delauny triangulation to the color points, and then apply linear interpolation along the created triangles using Barycentric coordinates? Did I get that right? Pretty elegant solution (not to mention all the other little details that went into designing the interface).

edit: wait, if I'm placing a outside the existing shape it's projected to the closest line and linearly interpolates on it? Nice, this is really thought through!

The colors still looks a bit strange along the triangle edges sometimes, and glancing at the source code it seems like you're mixing in linear RGB[0] so it's not that. I guess that just means that I'm looking at a saddle point in the color space?

(this made me wonder how smoothing functions would work for triangle meshes (that aren't secretly quads split into two triangles), and a quick search suggests that could be quite a deep rabbit hole to fall into)

[0] https://github.com/grgrdvrt/poulette/blob/main/src/utils/col...

parent vanderZwan 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton