Ejemplo n.º 1
0
 public static function fromPoints($point_a, $point_b, $point_c)
 {
     $plan = new Plan();
     // n: AB x AC
     // u: AB
     // v: AC
     // p: OA
     $u = Vector::fromPoints($point_a, $point_b);
     $v = Vector::fromPoints($point_a, $point_c);
     $point = Vector::fromComponents($point_a->x(), $point_a->y(), $point_a->z());
 }
Ejemplo n.º 2
0
/**
 * Distance between 2 points.
 */
function distancePointPoint(Point $point_a, Point $point_b)
{
    $vector = Vector::fromPoints($point_a, $point_b);
    return $vector->getNorm();
}