Code is poetryhttps://www.xarg.org/OpenSource Development, MySQL and PHP Blogenexarghttps://feedburner.google.comHow to plot a covariance error ellipsehttp://feedproxy.google.com/~r/exarg/~3/nuS_anHfefU/https://www.xarg.org/2018/04/how-to-plot-a-covariance-error-ellipse/#commentsTue, 10 Apr 2018 16:42:00 +0200Robert Eiselehttps://www.xarg.org/2018/04/how-to-plot-a-covariance-error-ellipse/A typical way to visualize two-dimensional gaussian distributed data is plotting a confidence ellipse. Lets assume we have data \(D\sim\mathcal{N}(\mu, \Sigma)\) and want to plot an ellipse representing the confidence \(p\) by calculating the radii of the ellipse, its center and rotation. The following plot shows randomly drawn data and the ellipses for \(p\in\{0.9, 0.95, 0.99\}\):

]]>https://www.xarg.org/2018/04/how-to-plot-a-covariance-error-ellipse/Create a circle out of three pointshttp://feedproxy.google.com/~r/exarg/~3/wiSjFxGMbJE/https://www.xarg.org/2018/02/create-a-circle-out-of-three-points/#commentsSun, 18 Feb 2018 01:12:41 +0100Robert Eiselehttps://www.xarg.org/2018/02/create-a-circle-out-of-three-points/A circle is a set of infinite points in two dimensions. However, a circle is clearly described by three of such points. The opposite direction is also correct as long as not all three points are on a straight line.

]]>https://www.xarg.org/2018/02/create-a-circle-out-of-three-points/Make a Fair Coin from a Biased Coinhttp://feedproxy.google.com/~r/exarg/~3/xrOf0CMNibw/https://www.xarg.org/2018/01/make-a-fair-coin-from-a-biased-coin/#commentsWed, 03 Jan 2018 17:29:26 +0100Robert Eiselehttps://www.xarg.org/2018/01/make-a-fair-coin-from-a-biased-coin/If we have a biased coin, i.e. a coin that comes up heads with a probability not equal to \(\frac{1}{2}\), how can we simulate a fair coin? The naive way would be throwing the coin 100 times and if the coin came up heads 60 times, the bias would be 0.6. We could then conduct an experiment to cope with this bias.

]]>https://www.xarg.org/2018/01/make-a-fair-coin-from-a-biased-coin/Mathematics of a roller chain animationhttp://feedproxy.google.com/~r/exarg/~3/SUgM8A-N3e4/https://www.xarg.org/2017/12/mathematics-of-a-roller-chain-animation/#commentsSat, 09 Dec 2017 23:04:39 +0100Robert Eiselehttps://www.xarg.org/2017/12/mathematics-of-a-roller-chain-animation/Given two circular sprockets \(C_1(M_1, r_1)\) and \(C_2(M_2, r_2)\) with their midpoint and radius, we want to find a way to put a chain around them and animate the links like this:

]]>https://www.xarg.org/2017/12/mathematics-of-a-roller-chain-animation/Operate a Syma S107G Remote Control Helicopter with an Arduinohttp://feedproxy.google.com/~r/exarg/~3/2e8aLA0PNL8/https://www.xarg.org/2017/07/operate-a-syma-s107g-remote-control-helicopter-with-an-arduino/#commentsFri, 14 Jul 2017 16:34:58 +0200Robert Eiselehttps://www.xarg.org/2017/07/operate-a-syma-s107g-remote-control-helicopter-with-an-arduino/Some time ago I saw people reverse engineering the infrared protocol of the Syma S107G toy helicopter and I wanted to get my hands on it as well. It is a coaxial helicopter, which means that it doesn't require a torque cancelling tail rotor. Yaw is controlled by using the speed difference to a second rotor underneath the main rotor, which spins in the opposite direction. It's really astonishing what good quality you get for just 20 bucks. It crashed quite often and it still flies like new.

]]>https://www.xarg.org/2017/07/operate-a-syma-s107g-remote-control-helicopter-with-an-arduino/How to map a Square to a Circlehttp://feedproxy.google.com/~r/exarg/~3/LGJCI2b-iak/https://www.xarg.org/2017/07/how-to-map-a-square-to-a-circle/#commentsWed, 12 Jul 2017 17:03:38 +0200Robert Eiselehttps://www.xarg.org/2017/07/how-to-map-a-square-to-a-circle/When you work with a game controller, you would expect the joystick coordinates to be circular. In reality, you get the information from two seperated axis, which spans a rectangular coordinate-frame. I was thinking about how to derive a way of mapping a rectangular grid to a circular space like so (use your mouse):

]]>https://www.xarg.org/2017/07/how-to-map-a-square-to-a-circle/Using Gamepads in JavaScript via node.jshttp://feedproxy.google.com/~r/exarg/~3/9KNb0Mf17TA/https://www.xarg.org/2017/07/using-gamepads-in-javascript-via-node-js/#commentsTue, 11 Jul 2017 16:53:43 +0200Robert Eiselehttps://www.xarg.org/2017/07/using-gamepads-in-javascript-via-node-js/I needed game controller support in node.js for a bigger JavaScript robotics project I'm currently working on. There are a few libraries already but none of them were sufficient for this job, so I wrote an own library called gamecontroller myself.

]]>https://www.xarg.org/2017/07/using-gamepads-in-javascript-via-node-js/Set up Internet Sharing on Mac OSX using Command Line Toolshttp://feedproxy.google.com/~r/exarg/~3/dyploJzT9GI/https://www.xarg.org/2017/07/set-up-internet-sharing-on-mac-osx-using-command-line-tools/#commentsMon, 03 Jul 2017 14:00:24 +0200Robert Eiselehttps://www.xarg.org/2017/07/set-up-internet-sharing-on-mac-osx-using-command-line-tools/Even if Mac-OSX has a Unix core, Apple put some layers on top of it, which makes it rather hard to freely hack around. That's why I wrote an own small DHCP server recently. Configuring a Mac (Macbook Pro in my case) to act as a NAT router is hairy as well. Sure, there are the sharing options, but they're quite limited and bring their own DHCP server, with no control over it anymore.

]]>https://www.xarg.org/2017/07/set-up-internet-sharing-on-mac-osx-using-command-line-tools/A pure JavaScript DHCP implementationhttp://feedproxy.google.com/~r/exarg/~3/zvQkNfVOk6Q/https://www.xarg.org/2017/06/a-pure-javascript-dhcp-implementation/#commentsTue, 27 Jun 2017 14:19:48 +0200Robert Eiselehttps://www.xarg.org/2017/06/a-pure-javascript-dhcp-implementation/When people connect to a WIFI to get internet access, they expect everything to work out of the box. This works because a new client on a network gets configured via the DHCP protocol. Most local routers have DHCP servers on it to deliver router-, DNS- and IP- information. What most people don't know is, how many options really can be configured with DHCP, as DHCP is expected to do just what is expected of it, without thinking about it anymore.