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

learn more… | top users | synonyms

1
vote
1answer
49 views

BSplineFunction defies numerical solution

I am trying to find an intersection between a straight line and a BSpline. The lines: ...
1
vote
1answer
62 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
91 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. ...
10
votes
2answers
240 views

How to boost the performance of my own BSplineFunction

In my CAGD package, I implemented a CAGDBSplineFunction[] like built-in BSplineFunction[]. ...
2
votes
2answers
92 views

How to make a graphics with a point of intersection

This is current method can do this ...
4
votes
1answer
71 views

Unexpected behavior of BSplineFunction and BezierFunction

$Version ParametricPlot[BezierFunction[RandomInteger[100,{3,2}]][t],{t,0,1}] 10.4.1 for Microsoft Windows (64-bit) (April 17, 2016) Crazy result.But ...
0
votes
1answer
80 views

Visualize a pretzel using a closed cubic B-spline and Tube [closed]

I want to visualize a 3D nonplanar pretzel using a closed cubic B-spline displayed with Tube. I'm just absolutely lost on the whole thing. The closest pretzel ...
3
votes
1answer
68 views

Exporting sharp corners in Bézier curves to pdf

I'm a bit baffled by this. I have a number of arrows in a series of diagrams, and I'm defining the arrowheads using Bézier curves such as ...
3
votes
1answer
36 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 original domain of the points. In the 2D ...
0
votes
1answer
62 views

Convert parametric to cartesian

I'm drawing a Bézier surface. ...
9
votes
1answer
240 views

How to define a custom 2/3D graphic primitive like built-in?

There are lots of basic graphic-pimitive in Mathematica, such as 2D- pimitive: Line[], Circle[], Disk[] and 3D-pimitive: ...
5
votes
1answer
122 views

How to evaluate BSplineFunction

I have the following code to plot value of a bspline curve but it doesn't evaluate when I specify weights and knots and I'm not sure what's going wrong, the weights ...
2
votes
1answer
91 views

How to use BezierCurve or BSplineCurve to define a quarter of a circle?

I know the command Circle can do that too, however, I want to be more flexible later on and want to know how to define this with the above mentioned functions. ...
8
votes
1answer
195 views

Produce a spline from a set of {{x, y}, z} points and get its parameters/expression

I have produced a set of points in a variable of the type {{x1, y1}, z1},{{x2, y2}, z2}, ,... }, where {x, y} should be the ...
9
votes
2answers
163 views

How to optimize my own BezierFunction?

A few months ago, I asked a question about the implementation of Bezier surface. Please see here for a full detail. I also know that BezierFunction[] is built-in ...
1
vote
1answer
182 views

Move a point along a curve

I am trying to implement the de Casteljau algorithm to trace a point along a Bézier curve. I already have the Bézier curve in place given by the control points ...
5
votes
2answers
226 views

Filling between two B-spline curves

I am trying to fill the space between two curves (curve1 and curve2) I generated since long but unable to do so. Can some one help on this please. The following is the code snippet. ...
1
vote
0answers
47 views

Extracting control points from BezierFunction

given a Bézier surface, is there a simple way to express $g_{12}$ (from the First fundamental form) again in Bézier form? More precisely, I have control points and a Bézier function $f$: ...
5
votes
3answers
212 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: ...
9
votes
3answers
380 views

Implementation of tensor product formula

For the Bézier surface, which owns the following matrix definition: $$\begin{align*} \mathbf S(u,v)&=\sum_{i=0}^m \sum_{j=0}^n \mathbf P_{i,j} B_{m,i}(u) B_{n,j}(v)\\ &=\small \begin{pmatrix}...
0
votes
0answers
82 views

Problem with BSplineCurve 3D

I have a problem using the function BSplineCurve [ ] . I have to represent a line passing through about 3000 points in 3D. I managed to plot the points separately, but when I use the 3D BSplineCurve []...
5
votes
1answer
84 views

How to use BSplineFunction for calculating derivative

I have a set of data like the following data = {{x1,y1},{x2,y2},{x3,y3},......} Now I use ...
6
votes
0answers
64 views

Artefact at joints within BSplineCurve of low Opacity

I want to eliminate the dots of higher opacity that occur at the joints within a BSplineCurve of low opacity. Small rectangles of greater opacity, shown below, ...
1
vote
2answers
84 views

Creating B-splines using a For Loop

I'm very new to Mathematica (as will make itself clear with this question) and I'm trying to create a program that makes b-splines to fit n points. I'm not quite sure how to reference the i-th point ...
9
votes
1answer
231 views

How to discretize a BezierCurve?

Bug introduced in version 10.0 and persisting through 10.4 DiscretizeGraphics is new in 10.0. I need to create a discretized region from a ...
1
vote
1answer
59 views

Different results with BSplineSurface and BSplineFunction [closed]

There seems to be some differences when plotting a surface with BSplineSurface and with BSplineFunction. ...
1
vote
1answer
87 views

How to plot a linear vector tangent to a bezier surface?

I have a bezier surface and its parameters are u and v. The partial differentiation with u as variable gives me a vector in the direction of u. I need to plot this vector. I plugged in a particular ...
4
votes
1answer
133 views

How to get coordinate from spline interpolation

Hi, I would like to find 10 coordinates between each points of this spline interpolation. I have done some research, but cannot find an appropriate answer. Any help will be appreciated. ...
15
votes
2answers
507 views

How to generate a closed B-spline curve?

I wrote a function called deBoor using the Cox-de Boor algorithm to generate a B-spline curve. ...
0
votes
0answers
42 views

How do I change a 3d bspline curve to a polygon based graphic? [duplicate]

I have a graphics image generated with bsplines: Graphics3D[Tube[BSplineCurve[pts], 2]] I want to export this to a .stl file. To do so I know I need to modify ...
8
votes
1answer
110 views

Where is the other half of my fourth degree Bézier curve?

Bug introduced in 10.0.0 and fixed in 10.2 When I enter the following command, half of the fourth-degree spline is missing from the graph (i.e. it doesn't touch the last point). Is this a bug in ...
0
votes
0answers
52 views

Working with Piecewise functions - Hexsplines

I'm trying to use the convolution definition of hexsplines, that is, a hexspline is the convolution of the indicator function of a hexagon (of sidelength 1 and centre $(0,0)$ ) with itself. I'm ...
11
votes
1answer
279 views

How to specify PDE Boundary condition on Bspline?

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 ...
2
votes
2answers
205 views
6
votes
2answers
225 views

What's the difference between Interpolation[pts, Method -> Spline] and BSplineCurve?

Last month, I answered a question about spline interpolation,please see here Now I do the following operations ...
0
votes
0answers
40 views

3D interpolation [duplicate]

I have four column data with first 3 column denoting x,y,z and fourth column energy. x variable is actually angle. Now I want to interpolate over all three indepdent variable (x,y.z) with ...
2
votes
1answer
185 views

Confusion with SplineFit (Angle calculation)

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

Why are these methods giving me different results? (Trying to test SplineFit)

I am creating a polymer(where each monomer is of equal length) using this method: ...
2
votes
1answer
136 views

How to find if x-y point falls within a closed BSplineCurve

Here's a simple Manipulate with a closed BSplineCurve, and a Locator. ...
5
votes
1answer
154 views

Multidimensional arbitrary precision spline interpolation on the grid

This question is a generalization of the previous one for multiple dimensions. In the answer to that question an implementation for the clamped spline interpolation for 1D case and arbitrary degree of ...
12
votes
1answer
267 views

How can I make FilledCurve smoother?

In How can I generate and randomly assign color to annular sectors? J.M. showed an interesting way to create a sector graphic using FilledCurve. Unfortunately it ...
4
votes
3answers
646 views

How to find a length of a curve constructed using Spline?

By fitting the data using spline, I have created a curve. sp = SplineFit[data1, Cubic] I am trying to divide this curve into small segments of equal length. To ...
7
votes
0answers
106 views

Color Snapping When Using VertexColors with a Tube with BSplineCurve as an Argument

I think I've identified a bug in how VertexColors are treated when rendering a Tube object where the underlying data is a ...
6
votes
2answers
200 views

How do I get my spline based arrows to have rounded ends?

I would like to change the how the ends of the spline arrows in my figure are rendered to be "rounded", but ...
3
votes
1answer
299 views

How can I make a pretzel shape using Bézier curves?

I am trying to make a pretzel shape,but I cannot seem to get the loops even. Eventually, I need to make the pretzel shape loop in 3D so I need to nail the 2D concept first. Here's what I have so far....
3
votes
1answer
193 views

Failed to create a special random-disturbed initial condition for partial differential equation [closed]

I try to use BSplineFunction to creat a initial condition for NDSolve which has periodic boundary condition, that is realized by ...
2
votes
1answer
242 views

Interpolation of a NURBS curve

Known that NQ=P where N is the Bspline basis function, Q is the control point that we wish to locate, P is the data points given ( the curve must pass through it) is there any way to modify the "N" ...
3
votes
1answer
99 views

How to make the result of Piecewise be a closed interval?

Description This question comes from two questions. Namely Q1 and Q2 The defintion of B-Spline basis function as shown below: Let $\vec{U}=\{u_0,u_1,\ldots,u_m\}$ a nondecreasing sequence of real ...
1
vote
1answer
86 views

Bspline weights

I change weigts of my points, but nothing has changed. What should i do to solve this problem? ...
1
vote
1answer
86 views

BSplineSurface problem

Why does the result of this function is straight line.If problem is in the order of my points, what order is correct? ...