43 votes
Accepted

How to perform Loop subdivision on a triangle mesh with Mathematica?

We need quite a bit of preparation. In the first place we need methods to compute cell adjacency matrices from here. I copied the code for completeness. ...
user avatar
40 votes
Accepted

Smoothing 3D contours as post processing

As announced before, here my take on the mean curvature flow for surfaces. The code is rather lengthy and I tried to recycle as much as possible from this post about finding minimal surfaces (solving ...
user avatar
25 votes
Accepted

Catmull-Clark and Doo-Sabin Subdivision Implementations

Catmull-Clark Subdivision Indeed, I have some code for Catmull-Clark subdivision and I planned to post it here for quite some time. This seems to be a good opportunity. The code is optimized for ...
user avatar
18 votes

How to get a smooth ridge from a binary image

You could try some kind of blurring or low-pass filter to smooth out some of the irregularity. For example ...
user avatar
  • 83.4k
18 votes

How to calculate the first derivative from experimental data

You have a few options. If your data is not noisy at all it is much cleaner. When I say not noisy, you don't want a lot of random variation from $x_i$ to $x_{i+1}$. If you have that type of noise, ...
user avatar
  • 462
17 votes
Accepted

Generic contour smoothing with shading

Update: Collecting the steps in a function: ...
user avatar
  • 350k
17 votes

Catmull-Clark and Doo-Sabin Subdivision Implementations

Doo-Sabin Subdivision To my own surprise, Doo-Sabin subdivision is in many ways much easier to implement than Catmull-Clark subdivision. The only real problem I met was to compute the faces created at ...
user avatar
14 votes

Rounding an Irregular Polygon

A quick hack, essentially interpolating a point travelling at constant speed on polygon edge and averaging the position over a time interval: ...
user avatar
  • 14.7k
13 votes
Accepted

Interpolating noisy data

Using Quantile regression might produce results you want -- you have to experiment with the number of knots or the knots locations. Get data: ...
user avatar
12 votes
Accepted

Improve the mesh smoothing procedure

Here is an answer to question 1. I'll comment on question 2 at the end. The thing to realize is that the connectivity never changes during the smoothing algorithm. So to speed things up we compute ...
user avatar
  • 36.1k
11 votes

Interpolate the noisy data

This gets the data: data1 = Get["https://pastebin.com/raw/Z3GGhH2b"]; There are outliers in the data. This can be seen with this command: ...
user avatar
11 votes
Accepted

Rounding an Irregular Polygon

Not an anwser, yet. This is how the curve shorthening flow would act on the cells: As you can see, the cells lose contact. So this is probably not what you are looking for, right? Something similar ...
user avatar
10 votes

Replace elements in list larger than x times the magnitude of the previous value with the mean of its neighbours

If you have a lot of data to process I propose a vectorized numeric approach for efficiency. ...
user avatar
  • 264k
10 votes
Accepted

Faster way to do this smoothing?

All smooths in this post Here are all smooths in this post: The line "smooth" is the one derived in the question. The lines for "smooth2" and "smooth3" were the motivation to derive the Quantile ...
user avatar
10 votes
Accepted

Interpolate the noisy data

For impulsive noises, you are probably better off with a Median filter than with a Gaussian Filter, since it is better able to remove the effect of outliers. ...
user avatar
  • 65.7k
10 votes

Smoothing a cusp in plotted data

The data in Mathematica format is ...
user avatar
10 votes

Generic contour smoothing with shading

Mean curvature flow and Laplacian smoothing can also be applied to the graph of a piecewise linear function for smoothing. Here a very brief and imperfect demonstration (using the function ...
user avatar
9 votes
Accepted

What exactly do DerivativeFilter and RidgeFilter do with the scale parameter?

DerivativeFilter calculates two sequential convolutions of original image with one-dimesional gaussian kernels. First with vertical kernel and then with horizontal ...
user avatar
  • 7,666
9 votes

Derivative of contour in ContourPlot

This seems to be a perfect candidate for DifferentiatorFilter: ...
user avatar
  • 95.2k
9 votes

Generic contour smoothing with shading

Not perfect but a good start, the idea is to use your method to transform boundaries and then use this transformation rules for points used by original output: ...
user avatar
  • 133k
8 votes
Accepted

Smoothing out data points in a ListDensityPlot

This is due to the interpolation. If you turn off the interpolation by InterpolationOrder -> 0 you will see symmetric plot. ...
user avatar
  • 15.5k
8 votes

Derivative of contour in ContourPlot

You can use polynomial regression approach as suggested in this answer: ...
user avatar
8 votes

Smoothing 3D contours as post processing

...
user avatar
  • 350k
8 votes

Smoothing noisy data

(Comment in order to clarify the question.) Is this what you want to get? If yes, that can be done with Quantile Regression as explained in this answer for the question you linked in your answer, "...
user avatar
8 votes

Code or algorithm for the built-in function SavitzkyGolayMatrix

GeneralUtilities`PrintDefinitions@SavitzkyGolayMatrix
user avatar
7 votes

How to smoothen a surface given as a mesh?

In my opinion this question isn't 'well enough' defined, but is this something you're after? Essentially I plot the iso-surfaces of a certain distance in order to smoothen the mesh, then rescale to ...
user avatar
7 votes

How to smoothen a surface given as a mesh?

I've just finished an implementation of the mean curvature flow and I'd like to give some examples of what it can do for you: ...
user avatar
7 votes

Derivative of contour in ContourPlot

Signal-processing is not one of my strengths, but I think we used to use low-pass filters to remove such noise. It seems to work here: ...
user avatar
  • 217k

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