// flower.java click on points, connect the dots import java.awt.*; import java.awt.event.*; public class flower extends Frame { int height = 400; int width = 400; int n = 128; flower() { setTitle("flower"); setSize(width,height); setBackground(Color.white); setForeground(Color.black); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); setVisible(true); } public void paint(Graphics g) { double t = 1.0; double r; double dt = Math.PI/64.0; double rmax = width/2.0; double m = 4.0; int x1, y1, x2, y2; g.setColor(Color.black); r = Math.cos(m * t); x1 = width/2 + (int)(rmax*r*Math.cos(t)); y1 = height/2 + (int)(rmax*r*Math.sin(t)); for(int i=0; i