Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

3
votes
0answers
40 views

BSpline vs natural spline [on hold]

The BSpline in mathematica is defined mathematically here. These BSplines constitute basis for any Spline. But how do I define natural splines in mathematica, i.e. splines that are linear left of the ...
2
votes
1answer
24 views

Help with evaluation of the differential of a BSplineFunction?

It can be useful to generate a smooth random function over $[-L,L]$ with BSplineFunction: ...
0
votes
0answers
46 views

Function from a Curve

i would like to ask if it's possible to get a function from a B-spline curve besides 'InterpolatingPolynomial[]' . i'm trying to use the function to compute volume for the curve that will be revolved ...
0
votes
0answers
22 views

Computing the volume enclosed by revolving a B-spline

I would like to ask if it's possible to get a function from a B-spline curve besides InterpolatingPolynomial[...]. I'm trying to use the function to compute the ...
2
votes
1answer
90 views

How to reproduce old SplineFit function?

Prior to version 8, Mathematica included a SplineFit function that could be used, for example, in the form: ...
3
votes
2answers
142 views

Integrate an Interpolating function with Integrate command

i'm trying to integrate an Interpolating function, as simple as this ...
2
votes
1answer
49 views

Questions about higher order Bézier Curves

I can generate the same Bézier Curve using my own code as the curve generated by Mathematica's function BezierCurve, but when I increased the order of the curve, it ...
0
votes
2answers
99 views

How to generate a Bézier curve using 4 points(arbitrary), without using the built-in function of Mathematica?

How to generate a Bézier curve using 4 points(arbitrary), without using the built-in function of Mathematica? The main point is that we do not use the built-in function in Mathematica, instead use a ...
5
votes
1answer
140 views

BezierCurve is different from BezierFunction

I am constructing Naca type profiles with Bezier curves. ...
2
votes
1answer
90 views

Integrating an interpolating function: Hermite vs. BSpline

I have an interpolation through a list of points, which I need to integrate. The minimal working example looks as follows: ...
0
votes
0answers
58 views

How to write the code for a general B-spline function?

I write the code for B-spline basis and it works very nicely but now I need help to write code for general B-spline functions I would like the code to show the spline segment in this way:
3
votes
1answer
150 views

Generate a smooth random function (2D curve) with endpoints specification?

Here is a PDE example, adapted from Wolfram Documentation: ...
3
votes
0answers
91 views

The actual polynomial behind a BezierFunction [duplicate]

Let's say I have the following Mathematica code pts = {{0, 0}, {1, 1}, {2, -1}, {3, 0}}; F = BezierFunction[pts] How can I find the actual polynomial of the <...
2
votes
1answer
109 views

How to interpolate closed surface

With BSplineSurface, I was trying to interpolate data points belonging to a sphere, but unfortunately I don't get the right geometry closing: ...
6
votes
1answer
103 views

Efficiently fill sparse matrix involving BSpline

Context In order to implement regularised fitting in 2 or 3 dimensions (as is done say here) using BSplineBasis one needs to evaluate a basis over a set of data. ...
9
votes
2answers
517 views

Stiff BVP of nonlinear ODE, alternative/ enhancement to shooting method

Question: I have been trying to solve this coupled ODE set. \begin{align} ( \frac{ \mu^2}{B} +1 ) \Phi^2 + \frac{1}{A} {\Phi^{\prime 2}} + \frac{1}{2}\lambda \Phi^4 - \frac{A'}{r A^...
3
votes
2answers
144 views

Symbolic representation of a Bézier curve

The Bézier curve is defined by: $$C(t)=\sum_{i=0}^{n} {{n}\choose{i}} t^i (1-t)^{n-i} P_i$$ where the $P_i$ are the control points. I am trying to write it down in Mathematica. What I have is: <...
3
votes
3answers
201 views

FunctionInterpolation over an open interval

I'm trying to obtain an arc-length parametrization of a spline curve as per https://mathematica.stackexchange.com/a/8456. To do so, I need to calculate partial derivatives of such curve and then ...
0
votes
0answers
54 views

Display splines - problem with conditional expression

I have implemented cubic spline on my own and it is working properly (table SplineProbe consists piecewise of cubic functions). Right now I would like to display in ...
0
votes
1answer
290 views

How do I interpolate sparse data with a spline?

I have this data: data = {{0.2, 103}, {2, 13.9}, {20, 2.72}, {200, 0.8}, {2000, 0.401}, {20000, 0.433}} Is there any way of finding value at $x=5$ using ...
2
votes
3answers
177 views

Ways to quicken numeric integral over interpolating spline?

I have an integral of the form $$\int_1^{15000} f_1(k) f_2(k) dk,$$ where $f_1(k)$ is an interpolating function and $f_2(k)$ is some multiplicative function of k. I'm working with the following <...
2
votes
1answer
133 views

Transforming a Bézier Curve by a Complex Function

I have a method to plot a rectangular region and then plot the lattice transformation by some complex function $f[z]$. ...
7
votes
1answer
262 views

Length of a curve parallel to a spline

I have constructed a BSplineFunction through a set of random points: ...
3
votes
2answers
278 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: <...
2
votes
1answer
73 views

Tube@BSplineCurve not mapping correctly?

(There's a tl;dr at the bottom.) I'm attempting to do what's effectively fake branching in a random walk. I generate one random walk (in the real rather than the integers, but with steps of magnitude ...
5
votes
1answer
117 views

Fill space between two BezierCurves with random points

I asked a question about filling the space between two curves (Sin and Cos) with random points and the answer I received does ...
5
votes
0answers
200 views

Volume Deformation

I want to do a volume deformation based on Bezier volumes. For example, if I have a triangle mesh, then I want to deform the mesh into a weird shape like the example image attached here. Can anyone ...
5
votes
0answers
197 views

BSpline: construct surface from enclosing contours

I'm aiming to construct 3D shape from profiles (typical archaeological drawing stuff: front, side and top profiles views). Through several operation, I now have BSpline curves, which should define ...
2
votes
2answers
163 views

solve t for a (3D) Bézier curve at a given tangent vector

I'm aiming to solve t for a 3D cubic Bézier curve define through 4 points (start pt, 1st handle, 2nd handle, end pt) at which the curve has a given tangent vector (or better, a parallel one:) ...
4
votes
0answers
283 views

How to fit B-splines to unstructured grids (triangulated surfaces)?

As a continuation of trying to calculate curvature tensors on triangulated surfaces (here), I am interested in trying other methods. One approach is to use NURBS. To be more precise I would like to be ...
0
votes
1answer
237 views

Interpolating a function with splines

I would like to interpolate the following function ...
5
votes
0answers
87 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 ...
3
votes
1answer
153 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
3answers
157 views

Variables substitution in a B-Spline function

I have the following identity mapping expressed by tensor-product B-spline basis functions: ...
3
votes
3answers
208 views

Draw an alternating colors ring with B-splines

I want to draw a ring with alternating colors and an external radius r, width w and n sectors each with angle θ = 2π/n. n should be even ≥ 4 (The B-spline definition I used below to simulate the ...
4
votes
1answer
256 views

Plot 2D B-spline curve on 3D B-spline surface

I've been working on this for days. I am trying to plot the B-spline 2D curve (figure '8') on the 3D surface. How can I do that? Can anyone help me with this? Here, I provide code that I use to ...
-2
votes
1answer
411 views

Create a spline function to interpolate a 3D surface [closed]

Here's my problem, I have an spreadsheet that contains data, a 202x202 matrix with x,y and z coordinates. The objective is import the data to mathematica, and then I need to create an interpolation ...
4
votes
1answer
245 views

Plot curvature comb

Does anyone here knows how to create a curvature comb as in the picture but for a 3D curve? For example if I use the 3D curve as below: ...
1
vote
0answers
72 views

Obtaining a piecewise polynomial from a plotted parametric curve using splines

Okay, so I have a picture and I have obtained a curve from it using this code: ...
2
votes
1answer
170 views

Inverse function does not get evaluated

I have a B-spline function, which is a function that is defined as a weighted sum of BSplineBasis function: ...
1
vote
1answer
66 views

Getting the wrong results from NArgMax

Consider the following code ...
5
votes
1answer
268 views

How to plot error curve between Bézier curve and a circle?

I have 2 curves on 1 axes. I've been working on how to plot the error between those 2 curves. I want to plot a new error curve on a new axes but I couldn't find the solution for this problem. Here ...
13
votes
1answer
651 views

How to calculate the numerical integral more efficiently?

Rencently, I ecountered the following numerical intergral: $$ \begin{cases} \mathbf I_1=\displaystyle \int_{t}\mathbf N' {\mathbf N'}^{\text T}{\rm d}t\\ \mathbf I_2=\displaystyle \int_{t}\mathbf N'' {...
12
votes
2answers
2k views

How to calculate the control points of a Bézier curve?

To plot a BezierCurve in Mathematica, I need control points. But, I do not know the control points; I only know the points through which the Bézier curve passes. ...
6
votes
1answer
142 views
3
votes
1answer
112 views

Getting a coordinate through a spline with length defined

Through other software I managed to obtain a spline with length of 200mm. The points would be these: ...
11
votes
2answers
701 views

smooth spline through airfoil coordinates

I am trying to produce a smooth spline curve through a set of airfoil coordinates. An example for the data I am trying to use is here, and I am reading the file like so to get rid of some extraneous ...
1
vote
1answer
95 views

BSplineFunction defies numerical solution [duplicate]

I am trying to find an intersection between a straight line and a BSpline. The lines: ...
2
votes
1answer
90 views

Finding a maximum of a Bézier function

Suppose I have a Bézier function $f:\mathbb{R}^2\to\mathbb{R}$ with random coefficients: ...
1
vote
1answer
133 views

Make a glyph using the BezierCurve function

There are a lot of applications that you make a glyph from a scanned image. Mathematica does have fine tools to interpolate curves like the BezierCurve[] function. ...