title: Filling in Triangles in Dr.Java using standard draw
body: <p>So I have this program where I had to draw a spade, club, heart, and a diamond in uniform size. I accomplished the shapes but cannot figure out how to fill the triangles used for the spade and club. Would really appreciate any help!</p>
  
  <p>Only Problem: Fill triangles.</p>
  
  <pre><code>    public class CardSymbols
      { //beginning program
        public static void main(String[] args)
         { //beginning method
           StdDraw.setXscale(-1.5, +1.5);
           StdDraw.setYscale(-1.5, +1.5);
  
           //Drawing a Heart
          StdDraw.setPenColor(StdDraw.RED);//color for Heart &amp; Diamond
          double[] xh = {.6,.7,.8,.7};
          double[] yh = {-.725,-.825,-.725,-.625};;
          StdDraw.filledPolygon(xh, yh); //diamond
          StdDraw.filledCircle(+.65, -.675, .1 / Math.sqrt(2)); //half circles
          StdDraw.filledCircle(.75, -.675, .1 / Math.sqrt(2)); //half circles
  
  
          //Drawing a Diamond
          double[] xd = {.6,.7,.8,.7};
          double[] yd = {.775,.9,.775,.65};
          StdDraw.filledPolygon(xd,yd);
  
          //Drawing a Spade
          StdDraw.setPenColor(StdDraw.BLACK);
          double[] xs = {-.6,-.7,-.8,-.7};
          double[] ys = {-.7,-.8,-.7,-.6};
          StdDraw.filledPolygon(xs,ys); //diamond
          StdDraw.filledCircle(-0.75, -0.75,.1 / 1.4142); //half circle
          StdDraw.filledCircle(-0.65, -0.75,.1 / 1.4142); //half circle
          StdDraw.line(-0.7,-0.8, -.75,-.85); 
          StdDraw.line(-0.7,-0.8,-.65,-.85);   //forming a triangle
          StdDraw.line(-0.75,-0.85,-.65,-.85); 
  
  
          //Drawing a Club
         StdDraw.filledCircle(-0.75, 0.75,.1 / 1.4142); //half circle
         StdDraw.filledCircle(-0.65, 0.75,.1 / 1.4142); //half circle
         StdDraw.filledCircle(-0.7, 0.835,.1 / 1.4142); //half circle
         StdDraw.line(-0.7,0.7, -.75,.65); 
         StdDraw.line(-0.75,0.65,-.65,.65); //forming a triangle
         StdDraw.line(-0.65,0.65,-.7,.7); 
        } //end method
       } //end program
  </code></pre>