Hi,
I'm working on my own "little" soft for the Polargraph. A really lite Polargraph Controller... I can for for the moment generate cool SVG with blob detection, Geomerative, and with a part of Jan Krummrey spiral code...
Some problems with Blobdetection and image filtering are there, but it's quite ok... Spiral Norvegian style is reeaaaalyyy cool...
But ... I would love generate my own queue text file.... So i've just applied Pythagore theory to calculate all movment but it seems that it's not enough 🙁
on the second picture, normaly it have to be a rectangle...
void translateShapeToCMD(){
//drawBackground ();
shp = RG.loadShape(outputSVGName);
float pointSeparation = simplVal;
float xa,ya,xb,yb; // Native coordinates
float l1,l2; // length of coord
int l1pg,l2pg; // Length for txt fil INT needed
RG.setPolygonizer(RG.UNIFORMLENGTH);
RG.setPolygonizerLength(pointSeparation);
polyshp = RG.polygonize(shp);
pointPaths = shp.getPointsInPaths();
effaceEcran();
print ("nombre de points :");
println (pointPaths.length);
for (int i = 0; i<pointPaths.length; i++){
stroke(0);
beginShape ();
for (int j=0; j<pointPaths[i].length; j++){
print ("X:");
print (pointPaths[i][j].x);
print (" Y:");
println (pointPaths[i][j].y);
xa = pointPaths[i][j].x;
ya = pointPaths[i][j].y;
xb = xa;
yb = ya;
l1 = sqrt((pow(xb,2)+pow(yb,2)));
l2 = sqrt((pow((700-xb),2)+pow(yb,2)));
//l1 = (pow(700, 2) - pow(yb, 2) + pow(xb, 2)) / (700*2);
//l2 = sqrt(pow(xb,2)-pow(l1,2));
l1 = map (l1,0,700,400,1200);
l2 = map (l2,0,700,400,1200);
l1pg = int (l1);
l2pg = int (l2);
output.print("C17");
output.print(",");
output.print(l1pg);
output.print(",");
output.print(l2pg);
output.println(",2,END");
vertex (xb+185,yb+87);
}
endShape ();
}
}
this how i try to obtain my queue...
If anyone can give me some advice 😎
|