Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Need help with Pythagore...
EATYone
Advanced
Posts: 67
Permalink
Post Need help with Pythagore...
on: August 18, 2016, 11:13
Quote

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 😎
Image
Image

EATYone
Advanced
Posts: 67
Permalink
Post Re: Need help with Pythagore...
on: August 18, 2016, 11:17
Quote

🙁
Image

EATYone
Advanced
Posts: 67
Permalink
Post Re: Need help with Pythagore...
on: August 18, 2016, 11:19
Quote

You can find all files here :

https://dl.dropboxusercontent.com/u/8208110/AAD.zip

...

EATYone
Advanced
Posts: 67
Permalink
Post Re: Need help with Pythagore...
on: August 18, 2016, 11:20
Quote

My config will never change : 700mm witdh, and parameter by default

EATYone
Advanced
Posts: 67
Permalink
Post Re: Need help with Pythagore...
on: August 18, 2016, 13:43
Quote

From where come from this distortion???? 🙁 🙁 🙁
Image
Image

EATYone
Advanced
Posts: 67
Permalink
Post Re: Need help with Pythagore...
on: August 18, 2016, 21:26
Quote

Pb ok, that was a problem of scaling 🙂 Happy 😎 😎 😎

Image

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Need help with Pythagore...
on: August 18, 2016, 22:34
Quote

Happy to help 🙂

EATYone
Advanced
Posts: 67
Permalink
Post Re: Need help with Pythagore...
on: August 19, 2016, 09:49
Quote

You learn me a lot of things Sandy, just by reading your code as a book 😉

Guillaume

EATYone
Advanced
Posts: 67
Permalink
Post Re: Need help with Pythagore...
on: August 22, 2016, 22:22
Quote

Blob detection + Norvegian + Geomerative = love for me 😛
Image
Image

ianmcmill
Newbie
Posts: 8
Permalink
Post Re: Need help with Pythagore...
on: September 9, 2016, 19:58
Quote

Very nice. Keep it up!

EATYone
Advanced
Posts: 67
Permalink
Post Re: Need help with Pythagore...
on: September 10, 2016, 17:30
Quote

Will Be soon available

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.029 seconds.