Example #1
0
Tracer::FrameType
Tracer::GetLocalFrame(const PointType& pt) const
{
  VectorType gradient;
  this->DerivativeAt(pt, gradient);
  gradient.Normalize();
  gradient *= stepSize;

  // compute the tangent
  VectorType tangent;
  tangent[0] = - gradient[1];
  tangent[1] =   gradient[0];

  return std::make_pair(tangent, gradient);
}
Example #2
0
Tracer::VectorType
Tracer::GetTangent(const PointType& pt) const
{
  VectorType gradient;
  this->DerivativeAt(pt, gradient);

  // compute the perpendicular
  VectorType tangent;
  tangent[0] = - gradient[1];
  tangent[1] =   gradient[0];

  tangent.Normalize();
  tangent *= stepSize;
  
  return tangent;
}