This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Eventi mousePressed() e mouseReleased() | |
| * by Federico Pepe | |
| * http://blog.federicopepe.com | |
| */ | |
| void setup() { | |
| size(500, 500); | |
| background(255); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Eventi keyPressed() e keyReleased() | |
| * by Federico Pepe | |
| * http://blog.federicopepe.com | |
| */ | |
| void setup() { | |
| size(500, 500); | |
| background(255); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int lunghezza; | |
| lunghezza = 110; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int circleX; // dichiarazione | |
| void setup() { | |
| size(400, 400); | |
| circleX = 100; // inizializzazione | |
| } | |
| void draw() { | |
| ellipse(circleX, 110, 50, 50); // utilizzo | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int circleX; // dichiarazione | |
| void setup() { | |
| size(400, 400); | |
| circleX = 100; // inizializzazione | |
| int circleY = 110; // dichiarazione e inizializzazione | |
| } | |
| void draw() { | |
| ellipse(circleX, circleY, 50, 50); // utilizzo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Utilizzo delle variabili II: Esempio 1 | |
| * by Federico Pepe | |
| * http://blog.federicopepe.com | |
| */ | |
| int ellipseX; // dichiarazione della variabile | |
| void setup() { | |
| size(540, 540); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Utilizzo delle variabili II: Esempio 2 | |
| * by Federico Pepe | |
| * http://blog.federicopepe.com | |
| */ | |
| int ellipseX; // dichiarazione della variabile | |
| void setup() { | |
| size(540, 540); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void setup() { | |
| size(700, 500); | |
| } | |
| void draw() { | |
| println("Mouse X: " + mouseX + " : Mouse Y: " + mouseY); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Utilizzo della funzione random() - Esempio: 1 | |
| * by Federico Pepe | |
| * http://blog.federicopepe.com | |
| */ | |
| void setup() { | |
| size(700, 500); | |
| background(255); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Utilizzo della funzione random() - Esempio: 2 | |
| * by Federico Pepe | |
| * http://blog.federicopepe.com | |
| */ | |
| float radius; | |
| void setup() { | |
| size(700, 500); | |
| background(255); |