Skip to content

Instantly share code, notes, and snippets.

@federico-pepe
Created September 16, 2015 10:44
Show Gist options
  • Select an option

  • Save federico-pepe/e75821815141b02aa7be to your computer and use it in GitHub Desktop.

Select an option

Save federico-pepe/e75821815141b02aa7be to your computer and use it in GitHub Desktop.
Utilizzo delle variabili II: Esempio 1
/*
* Utilizzo delle variabili II: Esempio 1
* by Federico Pepe
* http://blog.federicopepe.com
*/
int ellipseX; // dichiarazione della variabile
void setup() {
size(540, 540);
ellipseX = 0; // inizializzazione
}
void draw() {
background(255);
ellipse(ellipseX, height/2, 50, 50);
ellipseX = ellipseX + 1; // aumento il valore di ellipseX
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment