Skip to main content
23 votes
Accepted

Paul Klee's Notebooks: Loops Around Control Points

...
azerbajdzan's user avatar
  • 18.9k
20 votes
Accepted

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

If my answer for the 2D case lacks detail, it's because Typeset`MakeBoxes is an internal, undocumented function. That makes it hard to say anything authoritative ...
Simon Woods's user avatar
19 votes
Accepted

How to calculate the numerical integral more efficiently?

General When given an array of integrands NIntegrate is run separately over each array element. That is not necessary though, the core ...
Anton Antonov's user avatar
14 votes

2D smoothing spline interpolation

Update Since version 12, this functionality in integrated in Mathematica via the Option FitRegularization Following on @Ajasja's answer in the spirit of this answer one can in fact provide ...
chris's user avatar
  • 23k
13 votes
Accepted

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

Here is my approach: ...
xyz's user avatar
  • 625
13 votes

Paul Klee's Notebooks: Loops Around Control Points

How about this ...
yarchik's user avatar
  • 18.7k
12 votes
Accepted

How to obtain the function of a plotted Bezier curve?

In the documentation for BezierCurve, under Properties & Relations, it is written that a Bezier curve can be constructed from a sum of Bernstein polynomials. ...
C. E.'s user avatar
  • 70.7k
12 votes
Accepted

Rendering PNG images to spline curves

Extracting a spline from the image is easiest with ImageMesh. I've used the midpoints of the lines on the mesh boundary for the ...
flinty's user avatar
  • 25.5k
11 votes

Why does BezierFunction not follow BezierCurve at npts>4?

BezierCurve normally gives a composition of local 4point-Bezierfunctions. You get equal curves by setting ...
Ulrich Neumann's user avatar
11 votes

What do the arguments of a generated BSplineFunction mean?

Mimicking the spelunking in How to splice together several instances of InterpolatingFunction? We find ...
xzczd's user avatar
  • 66.8k
10 votes

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

I have done this before in some previous spline-related threads, but here it is again: ...
10 votes
Accepted

How to draw a colored curved shape

...
kglr's user avatar
  • 396k
10 votes

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

1. To get "the black curve (to) completely obscure the red curve" You can replace BSplineCurves with Lines using ...
kglr's user avatar
  • 396k
10 votes

What do the arguments of a generated BSplineFunction mean?

This is the full internal representation of BSplineFunction with all relevant parameters. You can fiddle around with the options, then open the information box and ...
Domen's user avatar
  • 26.5k
9 votes
Accepted

smooth spline through airfoil coordinates

After permuting the points so that the cusp is the first point (just like in Gypaets's answer), the methods of this answer can be used: ...
9 votes
Accepted

Different results using spline interpolation in Wolfram and MATLAB

Is the "Spline" same as splinetx? No. If not, is there a function in Wolfram like ...
J. M.'s missing motivation's user avatar
9 votes

Paul Klee's Notebooks: Loops Around Control Points

Not exactly as required but the result feels related somehow .. ...
vindobona's user avatar
  • 4,561
8 votes

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

Edit: I have reorganized my earlier answer and added a significant amount of new material. Transformed Equations As suggested in the question, the equations are simpler, if ...
bbgodfrey's user avatar
  • 61.6k
8 votes

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

To avoid the issue mentioned by kglr where points are repeated, you can just add another layer of list: ...
Carl Woll's user avatar
  • 131k
8 votes

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

Additional Problem In addition to the two problems I mentioned above, there was a third problem that ...
robjohn's user avatar
  • 1,071
8 votes
Accepted

Understanding Interpolation with Cubic Splines

We can confirm that the Interpolation produces a "not-a-knot" spline when using the "Spline" method by comparing the results of different spline ...
MarcoB's user avatar
  • 67.3k
8 votes

Convert interpolating function to a Bezier curve

The function hermiteToBezierPoints[] computes the Bezier control points for BezierCurve from values of the function and its ...
Michael E2's user avatar
  • 237k
7 votes
Accepted

How to boost the performance of my own BSplineFunction

You just need to fully compile your function: ...
xzczd's user avatar
  • 66.8k
7 votes
Accepted

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

You can use texture: ...
halmir's user avatar
  • 15.1k
7 votes

FunctionInterpolation over an open interval

I've been waiting for a good problem to use barycentric interpolation at the Gauss-Legendre points. It has excellent properties for analytic functions. Here we have a piecewise analytic function, so ...
Michael E2's user avatar
  • 237k
7 votes
Accepted

Symbolic representation of a Bézier curve

Here is how to manually implement a B├ęzier curve: ...
J. M.'s missing motivation's user avatar
7 votes
Accepted

Texture prevents JoinedCurve from closing

The bug had been fixed. Here we attach the result. $Version (* 12.2.0 for Linux x86 (64-bit) (December 9, 2020) *) Row[triangle /@ {True, False}]
cvgmt's user avatar
  • 75.1k
7 votes
Accepted

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

I'll answer the second one first, since that is relatively straightforward: The easiest way to get that matrix is ...
J. M.'s missing motivation's user avatar
7 votes

Geogebra spline command in Mathematica

Your link documents the default weight function but it doesn't say which kind of boundary constraints are used to obtain a unique spline. ...
Coolwater's user avatar
  • 20.3k
6 votes

ListSurfacePlot3D generates ugly artifacts

The following is a laborious procedure to build an homogeneous grid with angular symmetry. Not for the faint of heart, but it matches the original points quite well: ...
Dr. belisarius's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible