BRIDGES
  • Articles
  • BRIDGES
Search Results for

    Show / Hide Table of Contents
    • Settings
    • LinearAlgebra
      • Vectors
        • DenseVector
        • SparseVector
        • Vector
      • Factorisation
        • SparseQR
      • Matrices
        • DenseMatrix
        • Matrix
        • SparseMatrix
        • Sparse
          • CompressedColumn
          • CompressedRow
        • Storage
          • DictionaryOfKeys
    • Algebra
      • Measure
        • IDotProduct<TSelf, TValue>
        • IMetric<TSelf>
        • INorm<TSelf>
      • Sets
        • IGroupAction<TSelf, TValue>
      • Fundamentals
        • IAddable<T>
    • Solvers
      • GuidedProjection
        • Energy
        • GuidedProjectionAlgorithm
        • LinearisedConstraint
        • QuadraticConstraint
        • VariableSet
        • EnergyTypes
          • SegmentOrthogonality
          • SegmentParallelity
        • Interfaces
          • IEnergyType
          • ILinearisedConstraintType
          • IQuadraticConstraintType
        • QuadraticConstraintTypes
          • CoherentLength
          • LowerBound
          • UpperBound
          • VectorLength
    • Arithmetic
      • Polynomials
        • Multivariate
          • Monomial
          • Polynomial
        • Univariate
          • Polynomial
          • Specials
            • Bernstein
            • BSpline
      • Numbers
        • Complex
        • Quaternion
        • Real
    • Geometry
      • Euclidean3D
        • Basis
        • BSplineCurve
        • BSplineSurface
        • Circle
        • Frame
        • Line
        • NurbsCurve
        • NurbsSurface
        • Plane
        • Point
        • Polyline
        • Ray
        • Segment
        • Sphere
        • Vector
      • Kernel
        • BSplineCurve<TPoint>
        • BSplineSurface<TPoint>
        • CurveParameterFormat
        • IGeometricallyEquatable<T>
      • Projective3D
        • Point
    • DataStructures
      • PolyhedralMeshes
        • IEdge<TPosition>
        • IFace<TPosition>
        • IMesh<TPosition>
        • IVertex<TPosition>
        • FaceVertexMesh
          • Edge<TPosition>
          • Face<TPosition>
          • Mesh<TPosition>
          • Vertex<TPosition>
        • Abstract
          • Edge<TPosition, TVertex, TEdge, TFace>
          • Face<TPosition, TVertex, TEdge, TFace>
          • Mesh<TPosition, TVertex, TEdge, TFace>
          • Vertex<TPosition, TVertex, TEdge, TFace>
        • HalfedgeMesh
          • Edge<TPosition>
          • Face<TPosition>
          • Halfedge<TPosition>
          • Mesh<TPosition>
          • Vertex<TPosition>

    Class BSpline

    Class defining a B-Spline polynomial.

    Inheritance
    Object
    Polynomial
    BSpline
    Implements
    IGroupAction<Polynomial, Double>
    Inherited Members
    Polynomial.Degree
    Polynomial.Item[Int32]
    Polynomial.Zero
    Polynomial.One
    Polynomial.Derive(Polynomial, Int32)
    Polynomial.Add(Polynomial, Polynomial)
    Polynomial.Subtract(Polynomial, Polynomial)
    Polynomial.Opposite(Polynomial)
    Polynomial.Multiply(Polynomial, Polynomial)
    Polynomial.Multiply(Polynomial, Double)
    Polynomial.Multiply(Double, Polynomial)
    Polynomial.Divide(Polynomial, Double)
    Polynomial.Coefficient(Int32)
    Polynomial.IGroupAction<Polynomial, Double>.Multiply(Double)
    Polynomial.IGroupAction<Polynomial, Double>.Divide(Double)
    Namespace: BRIDGES.Arithmetic.Polynomials.Univariate.Specials
    Assembly: BRIDGES.dll
    Syntax
    public class BSpline : Polynomial, IGroupAction<Polynomial, double>

    Constructors

    | Improve this Doc View Source

    BSpline(Int32, Int32, Int32, IList<Double>)

    Initialises a new instance of BSpline class by defining its index, degree and knot vector.

    Declaration
    public BSpline(int spanIndex, int index, int degree, IList<double> knotVector)
    Parameters
    Type Name Description
    Int32 spanIndex

    Index of knot span on which the current BSpline is defined.

    Int32 index

    Index of the B-Spline polynomial.

    Int32 degree

    Degree of the B-Spline polynomial.

    IList<Double> knotVector

    Knot vector of the B-Spline polynomial.

    Fields

    | Improve this Doc View Source

    _knotVector

    Knot vector associated with the current BSpline.

    Declaration
    protected List<double> _knotVector
    Field Value
    Type Description
    List<Double>

    Properties

    | Improve this Doc View Source

    Index

    Gets the index of the current BSpline.

    Declaration
    public int Index { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    KnotVector

    Gets the knot vector associated with the current BSpline.

    Declaration
    public double[] KnotVector { get; }
    Property Value
    Type Description
    Double[]
    | Improve this Doc View Source

    SpanIndex

    Gets the index of knot span on which the current BSpline is defined.

    Declaration
    public int SpanIndex { get; }
    Property Value
    Type Description
    Int32

    Methods

    | Improve this Doc View Source

    ComputeCoefficients(Int32, Int32, Int32, IList<Double>)

    Sets the coefficients of the current BSpline polynomial.

    Declaration
    protected static double[] ComputeCoefficients(int spanIndex, int index, int degree, IList<double> knotVector)
    Parameters
    Type Name Description
    Int32 spanIndex

    Index of knot span on which the current BSpline is defined.

    Int32 index

    Index of the BSpline polynomial.

    Int32 degree

    Degree of the BSpline polynomial.

    IList<Double> knotVector

    Knot vector of the BSpline polynomial.

    Returns
    Type Description
    Double[]

    The coefficients of the BSpline polynomial.

    | Improve this Doc View Source

    EvaluateAt(Double, Int32, Int32, IList<Double>)

    Evaluates the BSpline at a given value.

    Declaration
    public static double EvaluateAt(double val, int index, int degree, IList<double> knotVector)
    Parameters
    Type Name Description
    Double val

    Value to evaluate at.

    Int32 index

    Index of the BSpline to evaluate.

    Int32 degree

    Degree of the BSpline to evaluate.

    IList<Double> knotVector

    Knot Vector associated with the BSpline to evaluate.

    Returns
    Type Description
    Double

    The value of the BSpline the given value.

    Remarks

    The code is adapted from algorithm 2.4 described in the NURBS Book, by L. Piegl and W. Tiller.

    | Improve this Doc View Source

    EvaluateAt(Double)

    Computes the current BSpline at a given value.

    Declaration
    public override double EvaluateAt(double val)
    Parameters
    Type Name Description
    Double val

    Value to evaluate at.

    Returns
    Type Description
    Double

    The computed value of the current BSpline.

    Overrides
    Polynomial.EvaluateAt(Double)
    | Improve this Doc View Source

    EvaluateBasisAt(Double, Int32, Int32, IList<Double>)

    Evaluates a BSpline basis at a given value.

    Declaration
    public static double[] EvaluateBasisAt(double val, int knotSpanIndex, int degree, IList<double> knotVector)
    Parameters
    Type Name Description
    Double val

    Value to evaluate at.

    Int32 knotSpanIndex

    Index of knot span containing the value.

    Int32 degree

    Degree of the BSpline basis.

    IList<Double> knotVector

    Knot vector of the BSpline basis.

    Returns
    Type Description
    Double[]

    The values of the non-zero BSpline polynomials of the basis, i.e. those ranging from N_{knotSpanIndex - degree, degree} to N_{knotSpanIndex, degree}.

    Remarks

    The code is adapted from algorithm 2.2 described in the NURBS Book, by L. Piegl and W. Tiller.

    | Improve this Doc View Source

    EvaluateBasisDerivativesAt(Double, Int32, Int32, IList<Double>, Int32)

    Evaluates the BSpline basis' derivatives of a given order, at a given value.

    Declaration
    public static double[][] EvaluateBasisDerivativesAt(double val, int knotSpanIndex, int degree, IList<double> knotVector, int order)
    Parameters
    Type Name Description
    Double val

    Value to evaluate at.

    Int32 knotSpanIndex

    Index of knot span containing the value.

    Int32 degree

    Initial degree of the BSpline basis.

    IList<Double> knotVector

    Initial knot vector of the BSpline basis.

    Int32 order

    Order of the derivatives.

    Returns
    Type Description
    Double[][]

    The values of successive derivatives of the non-zero BSpline polynomial of the basis, i.e. those ranging from N_{knotSpanIndex - degree, degree} to N_{knotSpanIndex, degree}.
    The first index corresponds to the order of derivation, the second to the index of the BSpline polynomial shifted to start from zero.

    Remarks

    The code is adapted from algorithm 2.3 described in the NURBS Book, by L. Piegl and W. Tiller.

    | Improve this Doc View Source

    EvaluateDerivativesAt(Double, Int32, Int32, IList<Double>, Int32)

    Evaluates the BSpline derivative of a given order; at a given value.

    Declaration
    public static double[] EvaluateDerivativesAt(double val, int index, int degree, IList<double> knotVector, int order)
    Parameters
    Type Name Description
    Double val

    Value to evaluate at.

    Int32 index

    Index of the BSpline to evaluate.

    Int32 degree

    Initial degree of the BSpline to evaluate.

    IList<Double> knotVector

    Initial knot Vector associated with the BSpline to evaluate.

    Int32 order

    Order of the derivative.

    Returns
    Type Description
    Double[]

    The value of the successive BSpline derivatives at the given value. The index corresponds to the order of derivation.

    Remarks

    The code is adapted from algorithm 2.5 described in the NURBS Book, by L. Piegl and W. Tiller.

    | Improve this Doc View Source

    FindKnotSpanIndex(Double, Int32, IList<Double>)

    Identifies the index of the knot span containing a given value, using a binary search.

    Declaration
    public static int FindKnotSpanIndex(double val, int degree, IList<double> knotVector)
    Parameters
    Type Name Description
    Double val

    Value to locate in the knot vector.

    Int32 degree

    Degree of the BSpline basis.

    IList<Double> knotVector

    Knot vector of the BSpline basis.

    Returns
    Type Description
    Int32

    The (zero-based) index of the knot span containing the value.

    Remarks

    The code is adapted from algorithm 2.1 described in the NURBS Book, by L. Piegl and W. Tiller.

    | Improve this Doc View Source

    SetKnotVector(IList<Double>, Int32, out List<Double>)

    Sets the knot vector of the current BSpline polynomial while ensuring its validity.

    Declaration
    protected static bool SetKnotVector(IList<double> knotVector, int degree, out List<double> knotList)
    Parameters
    Type Name Description
    IList<Double> knotVector

    Knot vector to evaluate.

    Int32 degree

    Degree of the B-Spline polynomial.

    List<Double> knotList

    Knot vector to set.

    Returns
    Type Description
    Boolean

    Implements

    IGroupAction<TSelf, TValue>
    • Improve this Doc
    • View Source
    In This Article
    Back to top By ENPC and the Build'In Platform