hi all,
I have this svg I want to import to processing and manipulate the vertices.
when I import the svg , there are some points I don’t want or need. I want just the vertices from the original curve nothing more, how to please?
in illustrator
in processing
import geomerative.*;
RShape grp;
RPoint[] pointPaths, handles;
float xmag, ymag, newYmag, newXmag = 0;
float z = 0;
boolean ignoringStyles = false;
void setup(){
size(600, 600);
// VERY IMPORTANT: Allways initialize the library before using it
RG.init(this);
RG.ignoreStyles(ignoringStyles);
RG.setPolygonizer(0);
grp = RG.loadShape("v2.svg");
// grp.centerIn(g, 100, 1, 1);
pointPaths = grp.getPoints();
handles =grp.getHandles();
}
void draw(){
background(255);
for(int j = 0; j<pointPaths.length; j++){
fill(255,0,0);
ellipse(pointPaths[j].x, pointPaths[j].y,5,5);
}
for(int j = 0; j<handles.length; j++){
fill(255,255,0);
ellipse(handles[j].x, handles[j].y,5,5);
}
save("jpg.jpg");
}
this thread is related to my pervious threads:
thread 1
thread 2