Adding a new point to a blob

In this example, 2 new blobs will be created, blobs[0] and blobs[1]
// Split a blob into two blobs
const blobs = new Blob().center().splitBlob(1,3);
blobs[0].color = blue;
My question is: let's say for blob[0], how do i add a new middle point between any 2 points of blob[0]? (without the use of clicking to the blob).

By the way, the purpose of this prototype is to create a pie chart from a blob by splitting the blob into multiple pie blobs.

There is an addPoint(percent, controlType) method of Blob and Squiggle. This may work for you, but normally things like Pie Charts are done with Shape() and using
f(), s(), ss(), mt(), lt(), a() and at() - those are the tiny API. But, maybe Blob manipulation will work.

i will first try addPoint. If it is difficult, i will go with Shape(). Thank you.

1 Like