Programs to Analyze [3/11]
Programs to Analyze
This chapters presents several programs for you to analyze.
By analyzing complete programs you can get valuable understanding of many important concepts.
Many of the programs in this chapter are the same as the programs previously used for demonstrational purposes.
The first program, presented on this page, is the simplest. Just for a warmup.
This program uses a functional getter .seta from type color.
The signature of functional getter color.seta is:
- colorA color.seta(
- num alpha
- )
The parameter alpha sets the desired transparency of the resulting color, which is returned as a value of type colorA. This parameter must be in the range 0-100.
If you have previously skipped the analysis of this program (you shouldn't have), now is your chance to revisit it.
Same for this program. If you have previously skipped the analysis of this program (you shouldn't have), now is your chance to revisit it.
Again the same for this program. If you have previously skipped the analysis of this program (you shouldn't have), now is your chance to revisit it.
This program animates a bouncing ball. Can you change the force of gravity so that it appears that the ball is lighter?
This program can draw a graph, move the graph with arrow keys and it can zoom in and out using PgUp and PgDn keys.
The function to be drawn is specified in the first statement of the program.
For a better implementation of the zoom, examine the multiline comment inside the source code.
This program was previously presented as a demonstrational program. The procedure DrawArrow was left unexplained.
This program visualizes vector rotation. It was previously presented as a demonstrational program.
This program animates some strings. It was previously presented as a demonstrational program.
Here is the random jumping rotating zombie program.
<< F2:Prev - - F4:Next >>