title: javascript polygon intersection
body: <p>I have used the code in the following :
  <a href="http://www.amphibian.com/blogstuff/collision.html" rel="nofollow">http://www.amphibian.com/blogstuff/collision.html</a>. in the html test file I have changed the the first triangle to </p>
  
  <pre><code>triangle1.addPoint({"x":-20, "y":-20});
  triangle1.addPoint({"x":-20, "y":20});
  triangle1.addPoint({"x":20, "y":20});
  triangle1.addPoint({"x":20, "y":10});
  triangle1.addPoint({"x":10, "y":10});
  triangle1.addPoint({"x":10, "y":-20});
  </code></pre>
  
  <p>now when I move the other triangle with inside this shape before crossing it gives me wrongly intersection. Any idea where could be the problem?</p>