//void setup()
//
//This is a function called 'setup'
//A function is like a question or command
//you can ask Processing
//Every function name has three parts,
//First is the "return type" which is:
//
// void
//
// 'void' means that this fuction doesn't
//actually give back an answer, it just silently
//does some work.
//The next part of the function name is picked by you
//It can be almost anything and should describe what the
//function does. In this example the name is
//
// setup
//
//This function is built into Processing. It runs once
//at the begining of your program and is the best place to
//get everything ready before the animation starts.
//
//Finally there is a list of 'parameters'. Parameters are
//just places for you to send information into the function
//so you can get it to do different things each time you
//call it.
//
//'Calling' a function is the same as 'Asking' a question
//
//For the 'setup' function there aren't any parameters -- it
//just does one thing in the same way every time and you can't
//send it any information so the parameter list is just written
//as a pair of braces with nothing between them like this:
//
// ()
//
//After the function is the function 'body'. This is a list of
//other commands that do the actual work of the function. The
//body is put inside a pair of curly braces { body }
//
//The body of setup only has one command in it:
//
// size(480, 800);
//
//'size' is another built in Processing command. It sets the
//size of the window for the application (480 pixels by 800 pixels).
//The numbers in between the braces are the 'parameters'.
//Try changing them to make windows of different sizes.
void setup() {
size(480, 800);
}
//
//This is a function called 'setup'
//A function is like a question or command
//you can ask Processing
//Every function name has three parts,
//First is the "return type" which is:
//
// void
//
// 'void' means that this fuction doesn't
//actually give back an answer, it just silently
//does some work.
//The next part of the function name is picked by you
//It can be almost anything and should describe what the
//function does. In this example the name is
//
// setup
//
//This function is built into Processing. It runs once
//at the begining of your program and is the best place to
//get everything ready before the animation starts.
//
//Finally there is a list of 'parameters'. Parameters are
//just places for you to send information into the function
//so you can get it to do different things each time you
//call it.
//
//'Calling' a function is the same as 'Asking' a question
//
//For the 'setup' function there aren't any parameters -- it
//just does one thing in the same way every time and you can't
//send it any information so the parameter list is just written
//as a pair of braces with nothing between them like this:
//
// ()
//
//After the function is the function 'body'. This is a list of
//other commands that do the actual work of the function. The
//body is put inside a pair of curly braces { body }
//
//The body of setup only has one command in it:
//
// size(480, 800);
//
//'size' is another built in Processing command. It sets the
//size of the window for the application (480 pixels by 800 pixels).
//The numbers in between the braces are the 'parameters'.
//Try changing them to make windows of different sizes.
void setup() {
size(480, 800);
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.