I am thinking about how I can best create equation defined shapes that can be manipulated as shapes, and am looking for advice about good ways forward for doing this.
I would like to replicate these shapes in my design and scale them and fill them and give them other custom dynamic behaviours. FYI in this instance I am looking at creating a shape based on touching mirrored ogive curves, forming a closed shape. (Though I’m not sure whether that matters - the key point is that the shape I want to create isn’t a primitive, and can’t be super-obviously assembled from primitives.) I could DRAW the shape I want on the canvas point by point by stepping through an equation at pixel resolution. But that just leaves me with a bunch of pixels.
Instead I think PShape seems the right construct to use. But I’m uncertain about the best way forward for creating a PShape. It seems to me like there are two possibilities:
One would be to mock the shape up by creating a whole huge bunch of vertices, stepping through the equation just as I would when I plot it out iteratively. This seems not super efficient…
Another approach would be to create an SVG in an external program, and import it into a Pshape. Then I guess I would be at the mercy of whatever vertex approximation happens under the hood? Which is probably better than my brute force attempt.
Am I missing some other approach that would be better? Anyone have any advice about good ways forward? (Including ‘Don’t do this’… )