Hi,
I’m trying to interpolate between two PShape loaded from SVG.
I’ve got this error message :
morph() accepts holeless single polygons only (for now).
I created the svg with inkscape, here’s the files, where is the bug ?
import micycle.pgs.*;
PShape sh, go, goal;
void setup() {
size(640, 360, P3D);
goal = createShape();
sh = loadShape("one.svg");
go = loadShape("two.svg");
sh.disableStyle();
go.disableStyle();
}
void draw() {
goal = PGS_Morphology. interpolate(sh, go, 0.1);
background(102);
shape(goal, 0, 0);
}
And one of svg :
<svg width="60.2mm" height="48.1mm" version="1.1" viewBox="0 0 60.2 48.1" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(-11.7 -10.2)" fill="none" stroke="#000" stroke-width=".265px">
<path d="m30.6 17.1 12.1-6.71 14.7 11.3 14.5 1.43-0.283 35.1-42.4-1.52-13.2-17.4 13-11z"/>
</g>
</svg>
Thanks