one small suggestion, I generally like to wrap objects up in one constructor, to make it clear it's all together:

```javascript
var pt = {
  pt.x = x2,
  pt.y = y2,
  etc
};