title: Pool/Billiards trig
body: <p>ok i am trying to get a pool game going in c#/java.</p>
  
  <ul>
  <li><code>start</code> = back of pool cue(x,y)</li>
  <li><code>end</code> = front of pool cue(x,y)</li>
  <li><code>circles</code> = list of balls (x,y,r)</li>
  </ul>
  
  <p>So every time you move your mouse I update <code>start</code>, <code>end</code> and then I loop through `circles check if it intersects. Then this is my problem I need to figure out what will happen with ball if I hit it at the intersection point( will it go right up down).</p>
  
  <p>How will I do this. I looked at some examples on google but could only find example where they did it with vector and that way over my head....</p>
  
  <p>my first thought was get the angle of the pool cue and from the circle mid point draw a line the same angle but for some reason that is wrong. It might be my <code>GetEnd</code> function</p>
  
  <pre><code>    public Point GetEnd(Point start, double angle, int len)
      {
          double y = start.Y + (len * Math.Sin(angle));
          double x = start.X + (len * Math.Cos(angle));
  
          return new Point((int)x, (int)y);
      }
  </code></pre>