- Often when working on microcontroller projects you need a background function to run at regular intervals. This is often done by setting up a hardware time...Often when working on microcontroller projects you need a background function to run at regular intervals. This is often done by setting up a hardware timer to
- To make a density map from a 2D set of data, the first step is to compute values for the third dimension. (Gnuplot has no facilities for computing these va...To make a density map from a 2D set of data, the first step is to compute values for the third dimension. (Gnuplot has no facilities for computing these values automatically.) The simplest way is to make a 2D histogram; the plot is divided in small 2D regions, and the z-values are proportional to the number of points inside these regions. The following Python script will make an histogram from a time series of two dihedral angles.
- Last week, Diaspora — the OSS privacy-respecting social network — released a “pre-alpha developer preview” of their source code. I took a look out it, mos...Last week, Diaspora — the OSS privacy-respecting social network — released a “pre-alpha developer preview” of their source code. I took a look out it, mostly out of curiosity, and was struck by numerous severe security errors. I then spent the next day digging through their code locally and trying to get in touch with the team to address them, privately. In the course of this, I mentioned obliquely that the errors existed on Hacker News, and subsequently was interviewed by The Register and got quoted in a couple of hundred places.
- Elementare Einführung in PostScript als Programmiersprache, Demonstrationsbeispiele aus dem Bereich der Farbenlehre u.a.
- JSON.simple is a simple Java toolkit for JSON. You can use JSON.simple to encode or decode JSON text.
- Or: everything you never wanted to know about arctangent implementations and weren't afraid to not ask.
- This routine will take an 8 bit integer that corresponds to the numerator of a fraction whose denominator is 256 and find its arctangent. So the input rang...This routine will take an 8 bit integer that corresponds to the numerator of a fraction whose denominator is 256 and find its arctangent. So the input ranges from 0 to 255 which corresponds to 0 to 255/256 = 0.996 . The output for an arctangent routine that returns a floating point number would be from 0 (atan(0)) to 0.783 (atan(255/256)) radians; or if you prefer, 0 to 44.89 degrees. However, this routine scales the output so that pi/4 radians (or 45 degrees) corresponds to 256. So for the input range of 0 to 255 you get an output of 0 to 255 ( atan(255/256) * 256 / (pi/4) is about 255). It's probably a little more interesting to see an intermediate data point or two:
- I needed a quick arctangent function using integer arithmetic, so I could convert (Δx, Δy) target locations to turn angles.
- by polynomial approximation
- The Art of Computer Programming Addison-Wesley Professional, (January 2011)
- HiPC, volume 4873 of Lecture Notes in Computer Science, page 197-208. Springer, (2007)
- Addison-Wesley Longman Publishing Co., Boston, MA, USA, 2nd edition, (1998)
- (2005)


user