I was wondering if anyone knows of some software (or an algorithm) for warping/interpolating 2D polygons? I’ve become a big fan of printing gcode generated by a python script without having to torture a pile of poor helpless triangles. I’m working on a print whose source shapes aren’t completely continuous, so I want to be able to interpolate some intermediate layers in a visually appealing way. This is similar to a loft operation in CAD, but the key is that it ‘looks good’, whatever that means.
The first algorithm I tried would find the centroid of the target polygon and sweep a ray from the centroid to points on the target polygon and find the corresponding point in the source polygon then interpolate along line that connects the points. This somewhat worked on simple prints, but doesn’t work with what I’m looking to print now (think fractals).
I need a smarter method of picking corresponding points and something better then a simple linear interpolation of the corresponding points. I suspect I need something that interpolates linearly in area, so one polyline will grow/shrink into the other more organically. Any ideas?
For reference, I attached some images of my earlier attempts at generated gcode.