PAT - Function (Lesson)
Function
What is a Function?
A function is an algorithmic method that provides an answer to a question. In Alice a functional method is allowed access to internal parts of the object to allow for more fluid movement rather than sliding across the stage. The joint of a person object from the biped class has knee, elbow, finger and toe joints as well as head movement available and more.
Using function methods allows the programmer to provide realistic movement of the objects within a scene by fine tuning how the object moves.
Watch the video below to learn how to call a function. This last short video illustrates putting a function into a parameter which means the function must be done first, the answer found, and then the solution is passed to the procedure to use.
VIDEO SOURCED FROM ALICE.ORG Links to an external site. AND USED ACCORDING TO TERMS OF USE.