Hi there,

I am creating some 2D radial meshes, and I am interested in filling them with some smooth conic gradients. What I have come up with so far

for (int i = 0; i < 100; i++) {

mesh.addColor(ofColor(ofMap(sin(i * 0.1), -1, 1, 0, 255),

ofMap(sin(i * 0.11), -1, 1, 0, 255),

ofMap(sin(i * 0.12), -1, 1, 0, 255)));

}

works, but of course I am left with a sharp angle where the first and last point meet. I have come up with somewhat of a solution by essentially cutting out that part of the mesh and manually lerping between the colors, but I know there must be a smoother way.

See image below.

Any help would be greatly appreciated!