示例#1
0
        public override void Derivation2At(GeoPoint2D uv, out GeoPoint location, out GeoVector du, out GeoVector dv, out GeoVector duu, out GeoVector dvv, out GeoVector duv)
        {
            location = PointAt(uv);
            du       = UDirection(uv);
            dv       = VDirection(uv);
            double     pos = GetPos(uv.y);
            GeoPoint2D p2d = basisCurve2D.PointAt(pos);

            duu = new GeoVector(-Math.Cos(uv.x), 0.0, -Math.Sin(uv.x));
            GeoVector2D deriv1, deriv2;

            if (basisCurve2D.TryPointDeriv2At(pos, out p2d, out deriv1, out deriv2))
            {
                ModOp rot = ModOp.Rotate(1, (SweepAngle)uv.x);
                dvv = toSurface * rot * deriv2;
                duv = GeoVector.NullVector;
            }
            else
            {
                dvv = GeoVector.NullVector;
                duv = GeoVector.NullVector;
            }
        }