components/utils/scripts/sylvester.js
function(obj) {
    if (obj.anchor) {
      // obj is a plane or line
      var P = this.elements.slice();
      var C = obj.pointClosestTo(P).elements;
      return Vector.create([C[0] + (C[0] - P[0]), C[1] + (C[1] - P[1]), C[2] + (C[2] - (P[2] || 0))]);
    } else {
      // obj is a point
      var Q = obj.elements || obj;
      if (this.elements.length != Q.length) { return null; }
      return this.map(function(x, i) { return Q[i-1] + (Q[i-1] - x); });
    }
  }
function(obj) {
    if (obj.anchor) {
      // obj is a plane or line
      var P = this.elements.slice();
      var C = obj.pointClosestTo(P).elements;
      return Vector.create([C[0] + (C[0] - P[0]), C[1] + (C[1] - P[1]), C[2] + (C[2] - (P[2] || 0))]);
    } else {
      // obj is a point
      var Q = obj.elements || obj;
      if (this.elements.length != Q.length) { return null; }
      return this.map(function(x, i) { return Q[i-1] + (Q[i-1] - x); });
    }
  }
function ( obj ) { if ( obj . anchor ) { // obj is a plane or line
 var P = this . elements . slice ( ) ; var C = obj . pointClosestTo ( P ) . elements ; return Vector . create ( [ C [ 0 ] + ( C [ 0 ] - P [ 0 ] ) , C [ 1 ] + ( C [ 1 ] - P [ 1 ] ) , C [ 2 ] + ( C [ 2 ] - ( P [ 2 ] || 0 ) ) ] ) ; } else { // obj is a point
 var Q = obj . elements || obj ; if ( this . elements . length != Q . length ) { return null ; } return this . map ( function ( x , i ) { return Q [ i - 1 ] + ( Q [ i - 1 ] - x ) ; } ) ; } }
Returns the result of reflecting the point in the given point, line or plane
Returns the result of reflecting the point in the given point line or plane