Publications by Stéphane Laurent

Boolean operations on meshes with R(CGAL)

13.05.2022

I?m still working on my package RCGAL, that I already present in a previous post. This previous post was about the reconstruction of surfaces. Now I implemented the Boolean operations on meshes. Here are some simple examples. Union of two cubes: Intersection of two cubes (one rotated): Differenc...

1908 sym R (961 sym/2 pcs) 12 img

The ‘rAmCharts4’ package

14.05.2022

My package rAmCharts4 has a moderate success on Github (twenty stars). So I decided to present it here. Related To leave a comment for the author, please follow the link and comment on their blog: Saturn Elephant. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many ot...

548 sym 2 img

Hierarchical data visualization with Shiny and D3

19.05.2022

I refreshed my old package ‘dir2json‘ (5 years old). It uses a Haskell DLL and can only work on Windows. You can install it from Github: remotes::install_github("stla/dir2json") This package contains two Shiny apps. The first one allows to represent a folder structure as a tree network diagram (called...

1215 sym R (601 sym/3 pcs) 4 img

Animated multibarchart with (R)nvd3

19.05.2022

I really like the animated multibarchart of the JavaScript library NVD3. That?s why I did the ?Rnvd3? package. library(Rnvd3) dat <- reshape2::melt( apply(HairEyeColor, c(1, 2), sum), value.name = "Count" ) # style axis titles with CSS #### library(htmltools) CSS <- HTML( ".nvd3 .nv-axis.nv-x text.nv-axislabel, ....

665 sym R (415 sym/1 pcs) 2 img

Splitting RCGAL… and the connected components

26.05.2022

I published two posts here about my package RCGAL, the first one about surface reconstruction, and the second one about Boolean operations on 3D meshes. Now I decided to split this package into two packages: SurfaceReconstruction, and MeshesOperations. I think MeshesOperati...

5255 sym R (2537 sym/8 pcs) 6 img

Update of ‘gyro’

03.06.2022

I updated the gyro package (soon on CRAN). Here are the new features. Hyperbolic polyhedra in the Poincaré model The previous version of the package only dealt with hyperbolic polyhedra in the Minkowski model. Now it is possible to get hyperbolic polyhedra in the Poincaré model. I don’t provid...

2216 sym R (828 sym/4 pcs) 6 img

Expanding a polynomial with ‘caracas’

06.06.2022

I wanted to plot an algebraic isosurface with POV-Ray but the expression of the polynomial defining the isosurface was very long (the polynomial had degree 12). Moreover there was a square root in the coefficients (\(\sqrt{3}\)) as well as \(\cos t\) and \(\sin t\), where \(t\) is a parameter I want...

2252 sym R (1027 sym/6 pcs) 2 img

An example of the Minkowski addition

10.06.2022

Now the MeshesOperations package can construct the Minkowski sum of two polyhedra, thanks to the C++ library CGAL and the R package RcppCGAL. Let’s see an example: the Minkowski sum of Leonardo da Vinci’s 72-sided sphere and a truncated icosahedron. Here are these two polyhedra: The mes...

1690 sym R (4804 sym/4 pcs) 4 img

Hopf torus, circle by circle

12.06.2022

Remember my first post on the Hopf torus? I constructed it circle by circle. Below are some animations of this construction. I save the image each time a circle is added. The rgl package automatically centers the plot, and this gives a nice effect. First animation, three lobes, using a ...

1030 sym R (1681 sym/1 pcs) 6 img

SVG to PNG

16.06.2022

Here is a way to get a high-quality PNG image with R: save it as SVG first, then convert the SVG file to a PNG file, with the rsvg package. Let’s see. I construct a hyperbolic Delaunay triangulation with the gyro package: library(gyro) phi <- (1 + sqrt(5)) / 2 theta <- head(seq(0, pi/2, length.out = 11...

814 sym R (706 sym/3 pcs) 4 img