Questions tagged [splines]

Questions on the spline-related functions of Mathematica (BezierCurve[], BSplineCurve[], etc.), or related to the theory and use of splines in Mathematica.

Filter by
Sorted by
Tagged with
11 votes
2 answers
758 views

Solve a PDE over a region defined by a Bézier patch

I am using NDSolve to find the solution to a PDE over an arbitrary domain. The domain is specified by a Bézier patch. ...
2 votes
1 answer
251 views

Confusion with SplineFit (Angle calculation)

This question is a continuation to [this other one][1] I am creating polymers (where each monomer is of equal length) using this method: ...
15 votes
1 answer
616 views

How to specify PDE Boundary condition on a B-spline?

Context I would like to solve a PDE on a boundary which is parametrized as a BSpline. I am trying to solve the force-free Grad-Shafranov equation on a boundary ...
1 vote
2 answers
93 views

Positive Change, Negative Change, and Total Change with Values on Graph

I am trying to show a change in cross-section geometry between years, and have good visual plots but would like actual values to use also. I am using spline curves to visualize the cross sections, ...
2 votes
3 answers
211 views

Coordinates of spline plot using ArcLength mesh function

The following code produces a 3D spline with equidistant interpolation points: ...
5 votes
2 answers
257 views

What do the arguments of a generated BSplineFunction mean?

For example, if we evaluate this: BSplineFunction@{{0,100},{200,50},{200,0}} we'll get ...
1 vote
1 answer
128 views

Proper way to discretize a parametric spline surface

Given that I have a triangular mesh model defined in obj format (1590 vertices and 300 faces), I reconstruct it to a single B-spline surface. Now I want to export ...
4 votes
2 answers
77 views

How to integrate 2 compoonent spline function

I have a Spline function defined as follows. Points = {{0, 0}, {0, 1}, {1, 1}, {1, 0}, {0, 0}}; bsf = BSplineFunction[Points, SplineDegree -> 1]; A Parametric ...
2 votes
2 answers
95 views

Options to find an analytical description of some points

I have a set of points {{x1,y1},...{xn,yn}} and I would like to have the analytical expression of a function that describes them reasonably well. So that I can plot this function on a ...
0 votes
0 answers
53 views

Getting Log10 axis in Graphics Function

In the output shown in the following image, I need x axis to be logarithmic (base 10) instead of linear. When I used ListLogLinearPlot function I got scattered points instead of the required B Spline ...
3 votes
2 answers
84 views

How to NIntegrate multiple ranges of data at the same time with an output that can be plotted?

I am trying to use the NIntegrate function to find the difference in the area beneath two 2 dimensional splines (how much area of the river bed was lost or gained from one year to the next) but, I ...
4 votes
1 answer
95 views

CaputoD of (Edge) BSplines

tl;dr Why does this works: CaputoD[BSplineBasis[{3, {0, 1, 2, 3, 4}}, 0, x], {x, 1/2}] // Simplify Whereas this fails ...
10 votes
1 answer
355 views

SplineDegree->1 does not work with BezierFunction?

This works (SplineDegree -> 2) ...
8 votes
2 answers
213 views

How to obtain the function of a plotted Bezier curve?

I have some control points and I could just plot the Bezier curve, but I also need to have the function! How can I get the exact function of the plotted Bezier curve?
7 votes
1 answer
280 views

BezierCurve is different from BezierFunction

I am constructing Naca type profiles with Bezier curves. ...
6 votes
3 answers
2k views

How to integrate a Bézier function?

I have: points = {{0, 100}, {250, 0}, {0, 300}, {500, 500}} And I want to know the area below the curve, so I came to: ...
6 votes
1 answer
267 views

Convert interpolating function to a Bezier curve

I've been wondering, is there a way to convert an interpolation into a sequence of BezierCurve objects that form each step in the interpolation? There is an easy ...
1 vote
1 answer
98 views

Recurrence relation for B-spline polynomials

I am trying to get the explicit polynomials of cardinal B-splines. So far I have this implementation (for cardial B-splines of degree 3 on the knots 0, 1, 2, 3): ...
1 vote
0 answers
134 views

How does Mathematica's B-Spline NURBS work?

I'm finding that Mathematica is getting hung up on a numerical integration and I suspect I can do it faster myself in C++. I can scoop the control points of the BSplineFunction out of the ...
3 votes
1 answer
348 views

Geogebra spline command in Mathematica

Spline(pts, order, Weight Function) Creates a spline with given order through all points. The weight function says what should be the difference of t values for point $P_i$ and $P_{(i+1)}$ given ...
1 vote
1 answer
304 views

Cubic spline fitting

If I have the following data: ...
6 votes
1 answer
403 views

Understanding Interpolation with Cubic Splines

My ultimate question: given data, what function is Interpolation with Method->"Spline" creating? I recall from my ...
5 votes
1 answer
130 views

Closed BezierCurve is cut in exported PDF or EPS

Bug introduced in 10.3 or earlier and persisting through 11.1.0 or later Exporting the filled Bézier curve to PDF or EPS yields ...
4 votes
1 answer
136 views

Why FilledCurve and BezierCurve or BSplineCurve do not fit

I want to draw the outline of a circle (it's actually the glyph period from Cascadia Code font): ...
10 votes
2 answers
906 views

Convert BSplineFunction into two Interpolating Functions

Is there a way to decompose a BSplineFunction output into two functions x[t], y[t] ...
1 vote
2 answers
101 views

Is task to find intersections of a line and a cubic Bezier curve really so hard?

I wrote formulas for parametric Bezier curves of different orders ...
4 votes
1 answer
141 views

BSplineFunction returns unevaluated when its degree is equal to the number of control points

Bug fixed in 13.0.0 [CASE:4855260] It seems that BSplineFunction always returns unevaluated without warnings, when its degree is equal to the number of control ...
3 votes
1 answer
217 views

how to PiecewiseExpand BSplineBasis to get Basis matrices of uniform B-splines presented in the paper?

As we all know, the definition of B-spline contains the B-spline basis function, which has the recursive form $B_{j,k}$ is the j-th degree $k-1$ polynomial. It has nonzeros only in interval $[t_j,t_{...
3 votes
0 answers
211 views

NURBS model from a entire mesh

I have a mesh in STL file format and imported it into Mathematica. data=Import["mesh.stl"]; or ...
12 votes
3 answers
443 views

Why is there a discrepancy between JoinedCurve/FilledCurve and the underlying BSplineCurve segments?

This may be related to How to discretize a BezierCurve?, but this question deals with BSplineCurves with specific SplineWeights, ...
2 votes
4 answers
631 views

How to fix problems solving for values of BSpline function?

I generated a spline function called f using the BSplineFunction with domain {t, 0, 1}. <...
6 votes
1 answer
137 views

Texture prevents JoinedCurve from closing

Bug introduced in 11.3 or earlier and fixed in 12.1 I am running Mathematica 11.3 and would like to see if this behavior is still present in newer versions of Mathematica before submitting a bug ...
11 votes
1 answer
872 views

Rendering PNG images to spline curves

I found something interesting on this page (Generic contour smoothing with shading) that could help me improve my images. Unfortunately, they can only be used with graphics generated by the software ...
4 votes
3 answers
695 views

Generating a random scribble using BezierCurve won't smooth in 5th point

I'm working on generating a random scribble I'm using the code provided by a Wolfram reference(which I can't link because of 10 rep limitation of two links). This produced well looking scribbles: <...
3 votes
1 answer
301 views

Why Interpolation is slower than BSplineFunction?

This my question is concerned with previous about Tube cross-section. Let's use the same pts as in that question. ...
0 votes
1 answer
377 views

Plot a bezier triangle

I have to construct a bezier triangle that interpolates these 4 points: $\qquad (0,0,1),\,(1,0,0),\,(0,1,0),\,(0.5,0.5,0.75)$ However, the surface that I get is so weird. Anyone please can help me to ...
0 votes
0 answers
30 views

Plot a quadratic bezier triangular patch [duplicate]

I need to construct a triangular patch by using the 6 control points: $$\begin{array}{ccc} \left(\frac{1}{2},\frac{\sqrt{3}}{4},1\right) & \left(\frac{1}{4},\frac{\sqrt{3}}{4},2\right) & \...
1 vote
2 answers
167 views

Access to Interpolation expression of Mathematica's Interpolate command

To reproduce fits which have been done in the framework of a standard, I was reviewing the Interpolation engine of Mathematica (for InterpolationOrder -> 3) to get more information about the ...
0 votes
0 answers
52 views

Part::partw: error in Custom Spline Algorithm

I am attending a Calculus course where we use Wolfram as a supporting tool, and I was trying the algorithm provided for Spline interpolation and I get the error in the picture: ...
4 votes
1 answer
200 views

Find intersection points of arbitrary BSpline curve

I'm researching some computational geometry and am trying to find a method of determining the {x,y} intersection of a circle and BSplineCurve for further processing. ...
4 votes
1 answer
93 views

How can I control the length of the line segments used in rendering a BSplineCurve?

Mathematica seems to render rational Bézier curves (drawn with BSplineCurve) using polylines whose segments can be annoyingly long, while polynomial Bézier curves (...
1 vote
0 answers
89 views

Export Basis spline information to matlab

i am new to Mathematica. I have generated the contours of this image with the following code ...
7 votes
4 answers
1k views

Find smallest distance from a point to a Bézier curve

I wish to find the smallest distance from a point to a curved defined via a Bézier function. I want to do this automatically. For particular cases it is not to difficult. Here is a minimum working ...
4 votes
1 answer
146 views

Finding Functional Values from the Original Domain Using BSplineFunction

Providing a set of 2D points to BSplineFunction returns a function that requires that the input parameter to the function be between [0,1] no matter what the ...
5 votes
2 answers
312 views

Finding inflection points of 2D BSplineFunction

This code creates a jagged line in two dimensions and fits a BSpline function to it. ...
3 votes
3 answers
344 views

How to fit spline through points in $ \mathbb{R}^3$?

I have coordinates of points that represent a curve (for example, helix or centerline of moebius strip) in $ \mathbb{R^3}$. I want to fit a Bspline through these points. How to do this in Mathematica? ...
5 votes
1 answer
143 views

How to draw a colored curved shape

I can draw a polygon with a curved edge using B-splines or Bézier curves: ...
2 votes
2 answers
229 views

Best parameter for smoothing splines

I am trying to implement a module to determine the best value for the smoothing parameter of a smoothing spline interpolation of a given dataset. To calculate the cross-validation score of a given ...
5 votes
0 answers
106 views

Improving speed performance of 'Fit' with BSplines?

Context In the context of this (vaguely controversial) question, I am stumbling into a performance issue with Fit. Let me illustrate on fitting a set of ...
17 votes
3 answers
3k views

2D smoothing spline interpolation

Does Mathematica have 2D smoothing spline interpolation built in? I requires an interpolation method with smooth first derivatives and cubic bivariate splines fulfill this nicely. In python I would ...