function Point(x, y) {
  this.x = x; this.y = y;
}

function Shape(p) {

  this.origin = p;
  this.getDistance = ShapeGetDistance;

  function ShapeGetDistance() {
    return Math.sqrt((this.origin.x * this.origin.x) +
		     (this.origin.y * this.origin.y));
  }
}

function Circle(p, radius) {
  this.origin = p;
  this.radius = radius;
}

Circle.prototype = new Shape();

var c = new Circle(new Point(12, 14), 20);

c.getDistance();
c.origin.x;

