In this blog post we will cover some of the basics of the Barnes Hut algorithm. This is completely new to me, it is not an algorithm I’ve used/studied before (and I am by no means an astrophysicist). Nonetheless it has piqued my interest so I have decided to write about it. In this blog I will be talking about 2 dimensions unless otherwise stated, this just makes the resulting code run a little quicker and output easier to visualise. Modifying the 2d code to be 3d (or even higher dimension) requires only minor revisions.
I've recently been learning about how to draw smoother curves that look more appealing. A common technique in professional CAD and font design software is to use a visualisation called a curvature comb to see how sharp or flat a curve is along its path. Here's an example of a curvature comb being used in Fontlab VI to smooth out bumpy spots in a font: To explain how this works, let's explore how Bézier curves work. Cubic Bézier curves Most vector graphics software uses cubic Bézier curves to display curved
J. Wong, E. Forsell, R. Lewis, T. Mao, and M. Wardrop. (2021)cite arxiv:2102.11297Comment: v2: Further reduce matrix algebra and fix typo in Section 5.3.3. Improve the relationships across Section 5.3.1, 5.3.2, and 5.3.3. v3: Change citation styles and update Section 5.3.2.