Anonymous user
Sierpinski triangle/Graphical: Difference between revisions
→{{header|ActionScript}}
(ActionScript) |
|||
Line 6:
=={{header|ActionScript}}==
<lang ActionScript3>
package {
Line 14:
/**
* A
*/
public class SierpinskiTriangle extends Sprite {
/**
* Creates a new
*
* @param n The order of the
* @param c1 The background colour.
* @param c2 The foreground colour.
Line 34:
* Generates the triangle.
*
* @param n The order of the
* @param c1 The background colour.
* @param c2 The foreground colour.
Line 65:
return;
// Recursively generate three
var sub1:SierpinskiTriangle = new SierpinskiTriangle(n - 1, c1, c2, width / 2, height / 2);
|