# Articles by Stéphane Laurent

### Interpolating non-gridded data

March 5, 2023 |

I still wrapped a part of the C++ library CGAL in a R package, namely interpolation. The purpose of this package is to perform interpolation of bivariate functions. As compared to ex... [Read more...]

### Animating a ‘rgl’ mesh at constant speed

February 26, 2023 |

The purpose of my package qsplines is to construct quaternions splines. This is a port of the Python library splines, written by Matthias Geier. A quaternions spline is a sequence of quaternions interpola... [Read more...]

### Mapping a square to a circle

February 24, 2023 |

Denoting by $$F(z \,|\, m)$$ the incomplete elliptic function of first kind, the function $\varphi(z) = -\sqrt{i} \, F\bigl(i \sinh^{-1}(\sqrt{i} \, z) \,|\, -1 \bigr).$ is a conformal mappi... [Read more...]

### The plasma effect: correction

February 10, 2023 |

There’s a kind of error in the previous post. In this formula: $\exp\Bigl(-\frac{{(i/n-0.5)}^2 + {(j/n-0.5)}^2}{0.025^2} \Bigr),$ the indices $$i$$ and $$j$$ should range from ... [Read more...]

### A (kind of) plasma effect in R

February 9, 2023 |

I found such an algorithm on Paul Bourke’s website: take a random matrix $$M$$ of size $$n \times n$$ (we’ll take $$n=400$$), real or complex; ... [Read more...]

### The Mandelbulb in R

February 7, 2023 |

In this post, I provide some R code which generates a mesh of the Mandelbulb, a well-known 3D fractal. The Mandelbulb is an isosurface, and I use the rmarchingcubes package to get a mesh of ... [Read more...]

### Passing a function from R to C++

February 5, 2023 |

The algebraicMesh function of my package cgalMeshes takes as inputs a trivariate polynomial $$P(x,y,z)$$, a number $$\ell$$ and some other parameters, and it returns a mesh of the isosurfa... [Read more...]

### Update of the ‘cgalMeshes’ package

January 27, 2023 |

I made some progress on the cgalMeshes package, that I introduced here. The new version is not on CRAN yet. In particular, one can know assign some properties to the meshes (the cgal... [Read more...]

### More on the ‘Reorient’ transformation

January 20, 2023 |

I presented the ‘Reorient’ rotation in a previous post. I figured out three things: there’s an easy precise definition of this rotation, that I didn’t give; ... [Read more...]

### Exact integral of a polynomial on a simplex

December 1, 2022 |

The paper Simple formula for integration of polynomials on a simplex by Jean B. Lasserre provides a method to calculate the exact value of the integral of a multivariate polynomial on a simplex (i.e. a ... [Read more...]

### HTML widgets in Power BI

November 23, 2022 |

Setting up an environment Example Notes Advanced example Arbitrary HTML ... [Read more...]

### The missing lazy numbers: implementation

November 18, 2022 |

In Haskell, for any type T (for example Double), there is a corresponding type Maybe T. An object of this type either has form Just x, where x is of type T, or is Nothing. Thus one can use the May... [Read more...]

### The lazy numbers in R: correction

November 14, 2022 |

Because of a change I did in the lazyNumbers package, I have to post a correction to my previous post. The as.double function, called on a lazy number, was not stable. Now it is. In ... [Read more...]

### The lazy numbers in R

November 11, 2022 |

My new package lazyNumbers is a port of the lazy numbers implemented in the C++ library CGAL. The lazy numbers represent the real numbers and arithmetic on these numbers is exact. ... [Read more...]

### ‘CGAL’ meets ‘R6’: the ‘cgalMeshes’ package

November 2, 2022 |

My new package cgalMeshes (not on CRAN yet) deals with 3D meshes. All algorithms implemented in this package are performed by the C++ library CGAL. I already wrapped some CGA... [Read more...]

### A note on Shiny reactivity

September 23, 2022 |

In the ‘shiny’ package, the reactiveConsole function allows to enable reactivity at the console, for the purposes of experimentation and learning (that doesn’t work in a R Markdown document). ... [Read more...]

### The ‘Reorient’ transformation

September 14, 2022 |

If you follow my youtube channel then you have certainly seen the “ball” of twenty Hopf tori. Sometimes I call it the “Hopf flower”. How is it done? Well, firstly, I take twenty poin... [Read more...]

### Kantorovich distance with the ‘ompr’ package

September 11, 2022 |

Do you know my former blog? It contains four posts about the computation of the Kantorovich distance: Using Julia to compute the Kantorovich distance ... [Read more...]

### The compound of five tetrahedra

September 9, 2022 |

In this previous post I was wrong when I said I didn’t have a tool to compute the intersection of the compound of five tetrahedra: This can be achieved with th... [Read more...]

### Labelling the points of a ‘ggplot’ with Shiny

August 7, 2022 |

The Shiny app below allows to attribute a label to the points of a ‘ggplot’ by double-clicking on the points. library(shiny) library(rhandsontable) library(htmlwidgets) library(colourpicker) library... [Read more...]
1 2 3 4 5