public class Howdy { public int width,height; public String[] buf; public Howdy(int w,int h){ width = w; height = h; buf = new String[width * height]; clear(); } public void plot(int x,int y,String s){ int idx = y * width + x; if(idx >= buf.length){ System.err.println("Out of bounds: "+x+","+y+""); }else{ buf[idx] = s; } } public void circle(int x,int y,int r,String s){ for(double theta=0;theta<2*Math.PI;theta+=Math.PI/30){ int X = (int)(Math.cos(theta) * r) + x; int Y = (int)(Math.sin(theta) * r) + y; plot(X,Y,s); } } public void line(int x1,int y1,int x2,int y2,String s){ // line from point x1,y1 to x2,y2 } public void clear(){ for(int i=0;i