import java.applet.*; import java.awt.*; import java.awt.image.*; import java.awt.event.*; import java.io.*; import java.net.*; import java.text.*; import java.util.*; import java.util.zip.*; public class floralPatterns1 extends BApplet { // Floral Patterns // by Grant Robinson // Press any key to refresh stage // Created 21 October 2003 // Updated 21 October 2003 int branchCount, branchMax; Branch[] branchArray; // data Type for array[] array name void setup() { size(400, 300); noBackground(); // removes screen refresh // noStroke(); //Compiler.disable(); framerate(8); refresh(); } void refresh(){ fill(100,0,0); noStroke(); rect(0, 0, width, height); stroke(150,30,0); branchCount = 0; branchMax = 100; branchArray = new Branch[branchMax]; sproutBranch(floor(random(6)), 1, width/2, height/2); //sproutBranch(3.5, 0, width, height/2); //sproutBranch(5, 0, width/2, height); //sproutBranch(0.5, 0, 0, height/2); } void loop() { // update all objects for (int i=0; i