Posted By

Homitsu on 06/03/10


Tagged

Processing


Versions (?)

Tre Tetraktis


 / Published in: Processing
 

URL: http://www.isiaurbino.net/mathema/?p=443

Sketch realizzato nel 2010 da Valentina Rachiele e Davide Homitsu Riboli per gli studenti ISIA Urbino nell'ambito del corso "Matematica per il Design.

  1. //Creo l'ambiente
  2. size(400,400);
  3.  
  4. //La linea successiva mi serve solo nel terzo caso
  5. //float varia = width/8;
  6.  
  7. /*
  8.  
  9. //START TETRAKTIS PER VALORI ASSOLUTI
  10.  
  11. triangle(0,400,50,300,100,400);
  12. triangle(100,400,150,300,200,400);
  13. triangle(200,400,250,300,300,400);
  14. triangle(300,400,350,300,400,400);
  15.  
  16. triangle(50,300,100,200,150,300);
  17. triangle(150,300,200,200,250,300);
  18. triangle(250,300,300,200,350,300);
  19.  
  20. triangle(100,200,150,100,200,200);
  21. triangle(200,200,250,100,300,200);
  22.  
  23. triangle(150,100,200,0,250,100);
  24.  
  25. //END TETRAKTIS PER VALORI ASSOLUTI
  26.  
  27. */
  28.  
  29. /*
  30.  
  31. //START TETRAKTIS PER VALORI GESTITI TRAMITE VARIABILE DI SISTEMA
  32. // Funziona bene solo su ambienti a dimensioni divisibili x 8 //
  33.  
  34. triangle(0,height,width/8,(height/4)*3,width/4,height);
  35. triangle(width/4,height,(width/8)*3,(height/4)*3,width/2,height);
  36. triangle(width/2,height,(width/8)*5,(height/4)*3,(width/8)*6,height);
  37. triangle((width/8)*6,height,(width/8)*7,(height/4)*3,width,height);
  38.  
  39. triangle(width/8,(height/8)*6,width/4,height/2,(width/8)*3,(height/8)*6);
  40. triangle((width/8)*3,(height/8)*6,width/2,height/2,(width/8)*5,(height/8)*6);
  41. triangle((width/8)*5,(height/8)*6,(width/8)*6,height/2,(width/8)*7,(height/8)*6);
  42.  
  43. triangle(width/4,height/2,(width/8)*3,height/4,width/2,height/2);
  44. triangle(width/2,height/2,(width/8)*5,height/4,(width/8)*6,height/2);
  45.  
  46. triangle((width/8)*3,height/4,width/2,0,(width/8)*5,height/4);
  47.  
  48. //END TETRAKTIS PER VALORI VALORI GESTITI TRAMITE VARIABILE DI SISTEMA
  49. */
  50.  
  51. /*
  52. //START TETRAKTIS PER VALORI GESTITI TRAMITE VARIABILE DICHIARATA
  53.  
  54. triangle(0,height,varia,varia*6,varia*2,height);
  55. triangle(varia*2,height,varia*3,varia*6,varia*4,height);
  56. triangle(varia*4,height,varia*5,varia*6,varia*6,height);
  57. triangle(varia*6,height,varia*7,varia*6,width,height);
  58.  
  59. triangle(varia,varia*6,varia*2,varia*4,varia*3,varia*6);
  60. triangle(varia*3,varia*6,varia*4,varia*4,varia*5,varia*6);
  61. triangle(varia*5,varia*6,varia*6,varia*4,varia*7,varia*6);
  62.  
  63. triangle(varia*2,varia*4,varia*3,varia*2,varia*4,varia*4);
  64. triangle(varia*4,varia*4,varia*5,varia*2,varia*6,varia*4);
  65.  
  66. triangle(varia*3,varia*2,varia*4,0,varia*5,varia*2);
  67.  
  68. //END TETRAKTIS PER VALORI GESTITI TRAMITE VARIABILE DICHIARATA
  69.  
  70. */

Report this snippet  

You need to login to post a comment.