Publications by Stéphane Laurent
Drawing a stereographic duoprism
In this post, I’ll show how to draw a stereographic duoprism using R, Asymptote and POV-Ray. With R library(rgl) A <- 8L # number of sides of the first polygon B <- 4L # number of sides of the second polygon # construction of the vertices vertices <- array(NA_real_, dim = c(A,B,4L)) for(i in 1L:A){ v1 <- c(cos(i/A*2*pi), s...
678 sym R (22309 sym/4 pcs) 8 img
Tooltips for the headers of a datatable in Shiny
In this post, I show how to use the qTip2 JavaScript library to create some tooltips on the headers of a DT datatable in Shiny, displaying some information about the columns, such as summary statistics. Firstly, we write a function returning some JavaScript code that creates some hidden div...
2192 sym R (5673 sym/7 pcs) 2 img
An orbit of the modular tessellation
I came across this interesting paper entitled Complex Variables Visualized and written by Thomas Ponweiser. In particular, I was intrigued by the generalized powers of a Möbius transformation (of a matrix, actually), and their actions on the modular tessellation. So I firstly impl...
1719 sym R (4122 sym/1 pcs) 2 img
Back to the parametric Hopf torus
In a previous post, I explained how to get a parameterization of a Hopf cylinder or torus. There is a clearer way, which I present here. For the Hopf map, the preimage of a point \(p=(p_x,p_y,p_z)\) on the unit sphere \(S^2\) is the circle on \(S^3\) with parametrization: \[ \begin{...
3253 sym R (5412 sym/8 pcs) 6 img
Drawing slices of a hypersurface with R
Let \(s \colon I \times J \times K \to \mathbb{R}^4\) be a parameterization of a hypersurface \(\mathcal{S}\), where \(I,J,K \subset \mathbb{R}\) are some intervals. I’m going to show how to draw the cross-section of \(\mathcal{S}\) by a hyperplane with R. For the illustration, we...
5121 sym R (3597 sym/13 pcs) 6 img
Focal quadrics and their lines of curvature
This blog post provides some R code for drawing focal quadrics and their curvatures lines with the rgl package. Ellipsoid The ellipsoidMesh function below generates a mesh of the ellipsoid of equation \[ \frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} = 1. \] library(rgl) ellipsoidMesh <- function(a,...
5573 sym R (15949 sym/14 pcs) 6 img
Child tables with DT, editing, exporting
I’m going to show how to use the DT package to do a table with child tables, and how to edit and export such a table. In order to do a table with child tables, one adds a list column to the dataframe of the main table; each cell of this column contains the child table of the corresponding row, given as a...
3100 sym R (13642 sym/13 pcs) 6 img
My RGL artworks
These are some of my artworks realized with the R package rgl. Source code is available in my gists. 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 other topics....
572 sym 36 img
The ‘kde1d’ package
It seems to me that the kde1d package (One-Dimensional Kernel Density Estimation) is not very known. I’ve never heard of it on Stack Overflow, except in an answer of mine. However this is a great package, IMHO. I’m going to show why I like it. The d/p/q/r family Estimating a density with the kde1d fu...
2107 sym R (1304 sym/6 pcs) 8 img
Haskell is fast
Updated title: Haskell is fast, but Julia is faster (see updates at the end). My R package ‘HypergeoMat’ provides a Rcpp implementation of Koev & Edelman’s algorithm for the evaluation of the hypergeometric function of a matrix argument. I also implemented this algorithm in Julia and...
3280 sym R (2084 sym/8 pcs)