Home on Henrik's blog/Recent content in Home on Henrik's blogHugo -- gohugo.ioen-usTrying Julia/post/trying-julia/Sat, 05 Sep 2020 00:00:00 +0000/post/trying-julia/This weekend I decided to give Julia try. I took the “Introduction to Julia” and the first half of “Parallel computing” courses on JuliaAcademy. I downloaded Atom and Juno, and I quickly skimmed McNicholas and Trait's Data Science with Julia. Then, off to the races!
… meaning Google. Lots of Google.
I wanted to keep working on my usual Quadratic 2D map plots. In particular, I've been looking for ways to interactively explore the neighborhood of parameters for an attractor.Beyond gifs/post/beyond-gifs/Mon, 31 Aug 2020 00:00:00 +0000/post/beyond-gifs/I still haven’t found a good way to animate things in R. Sure, there are packages like {gganimate} that will interpolate your frames and stitch them together in a gif. But the results are always… underwhelming.
This weekend I decided to up the gif game. Instead of settling for a small, low frame rate image, I decided to try my hand on rendering a movie using R. While I have some more esoteric projects in mind, I chose to start with the classic Lorenz attractor.Book Notes: Statistical Rules of Thumb by Gerald van Belle/post/book-notes-statistical-rules-of-thumb-by-gerald-van-belle/Sat, 18 Jan 2020 00:00:00 +0000/post/book-notes-statistical-rules-of-thumb-by-gerald-van-belle/Gerald van Belle's Statistical Rules of Thumb is clever book with a clever format: A hundred or so heuristics for the practicing statistician and data scientist. Six of the chapters relate to statistical methods and cover things like experiment design, power calculations, and modelling. One chapter covers presentations, and the final covers the consultant's mindset towards clients.
Each rule has an easy formulation, similar to a cheat sheet. It also presents or references the rigorous basis for the rule.Stereo plotting in R/post/stereo-plotting-in-r/Mon, 06 Jan 2020 00:00:00 +0000/post/stereo-plotting-in-r/Here’s another neat trick I picked up from Julien Sprott’s book on Strange Attractors: that good ole’ 90s 3D effect you get if you focus outside of the image and frustratingly wait for that image to appear.
The technique I will use is called Cross-eyed stereo viewing, which works by the viewer crossing their eyes inwards. Let’s start with an example to see where we’re going.
To generate pretty pictures, I will mostly use the same technique as in my post about 2D quadratic iteraded map attractors, but now for 3D dittos.Hunting for Attractors/post/hunting-for-attractors/Sun, 05 Jan 2020 00:00:00 +0000/post/hunting-for-attractors/I came across this wonderful book by Julien C. Sprott about strange attractors, a book free to download no less! It is a book full of beautiful images. It also has lots of source code to generate the imaages yourself - if you read BASIC, that is. I decided to recreate some good parts with R.
In the book’s second chapter, I learned a neat trick to sift through the huge parameter spaces of these attractors to find beautiful patterns, something I’ve never known how to.Book Notes: Tell Me a Story by Roger Schank/post/book-notes-tell-me-a-story-by-roger-schank/Sat, 04 Jan 2020 00:00:00 +0000/post/book-notes-tell-me-a-story-by-roger-schank/I stumbled on Roger Shank's Tell Me a Story in a flea market. I'm not sure what made me pick it up, but it turned out to be one of these surprises that sometimes happen to you.
This is my second read of the book, which in itself is quite unusual. Last time I read it, about five years ago, I remember being blown away by the first chapter, while the rest made less of an impression.Polar rose garden/post/polar-rose-garden/Fri, 03 Jan 2020 00:00:00 +0000/post/polar-rose-garden/Polar coordinates always surprise me. I have a hard time reading them, but they tend to bring an organic feeling to whatever I plot.
A simple piece of graphics to render is a [polar rose](https://en.wikipedia.org/wiki/Rose_(mathematics). In their most simple form, these are described with the polar equation: $$r = cos(k \theta)$$ where $\theta$ is the angle and $r$ the radius of each point. $k$ is a parameter that determines what the rose will look like.Generative gravel/post/generative-gravel/Thu, 02 Jan 2020 00:00:00 +0000/post/generative-gravel/I just learned about Georg Nees, who was among the first people to create art using computers. I’ve never gotten deep into generative graphics, but find myself coming back to it every so often. Inspired by Nees’ 1968 piece Schotter (en: Gravel / Crushed Stone) I wanted to try my hand at manipulating squares using R.
library(tidyverse) theme_set(theme_void() + theme(legend.position = 'none')) Here’s the plan: Create a 10 columns / 20 rows grid of squares.