Exemplo n.º 1
0
        public static Vector3D Normal(
            this IParametricSurface surface,
            Parametrisation parametrisation)
        {
            var du = surface.Derivative(
                parametrisation,
                DerivativeParameter.U
                );

            var dv = surface.Derivative(
                parametrisation,
                DerivativeParameter.V
                );

            return(Vector3D.CrossProduct(du, dv));
        }
Exemplo n.º 2
0
 public static Vector3D Derivative(
     this IParametricSurface surface,
     Parametrisation parametrisation,
     DerivativeParameter parameter
     )
 {
     return(surface.Derivative(
                parametrisation.U,
                parametrisation.V,
                parameter
                ));
 }
Exemplo n.º 3
0
        public void DrawDerivative(
            IParametricSurface surface,
            double u,
            double v,
            DerivativeParameter parameter,
            Color?color = null
            )
        {
            var point      = surface.Evaluate(u, v);
            var derivative = surface.Derivative(u, v, parameter);

            DrawVector(point, derivative, derivative.Length, color);
        }