Measures of confusion with JSR-275
I love the idea behind JSR-275, a units of measurement API for Java (see here for a background article by Jean-Marie Dautelle, the lead author) but I wish there were more examples out there about how...
View ArticleUnleash your inner literary geek
Those good fellows at Pragmatic Programmers have come up with the geeky equivalent of NaNoWriMo - the annual event that encourages people to try their hand at writing - which they have christened...
View ArticlePragProWriMo begins
November is here and this not-so-young-anymore geek's heart has turned to writing. I'm taking up the challenge of PragProWriMo by committing (forcing, tricking...) myself to write every day. The target...
View ArticlePragProWriBlockMo
PragProWriMo has been even more challenging than I'd feared thanks to my sub-gnat concentration span and memory like a... you know, round thing with holes. While others have been trotting out chapter...
View ArticleK ?
Whisper the terrible words type erasure to any moderately experienced Java programmer and you're likely to see: fear loathing soul-crushing sense of defeat all of the aboveNow if you are a moderately...
View ArticleCubic spline interpolation
I spent a while today casting around for a simple, fast and just-good-enough cubic interpolation algorithm to use in the GeoTools library where it is to serve as a 'filter function' that can be used...
View ArticleA clip round the ear
Inspired by a recent discussion on the JTS user list about decomposing simple polygons into triangles, here is a program that demonstrates the brute force, ear-clipping algorithm. To run this you will...
View ArticleAnother clip round the ear
In the last episode I presented some code to triangulate a polygon using the ear-clipping algorithm. In this instalment the code has been extended to deal with polygons that have holes. Here are two...
View ArticleCircle packing with R
To visualize the results of a simulation model of woodland trees within R, I needed an algorithm that could arrange a large number of circles within a rectangle such that no two circles overlapped by...
View ArticleMeeting in the middle; or fudging model II regression with nls
My colleague Karen needed an equation to predict trunk diameter given tree height, which she hoped to base on measurements of trees in semi-arid Australian woodlands. This is the dark art of allometry...
View ArticleHomogeneity analysis of hierarchical classifications
I've spent more years than I care to remember analysing vegetation survey data (typically species abundances in plots) using a variety of software including my own algorithms coded in FORTRAN and C++....
View ArticleFun with the proto package: building an MCMC sampler for Bayesian regression
The proto package is my latest favourite R goodie. It brings prototype-based programming to the R language - a style of programming that lets you do many of the things you can do with classes, but with...
View ArticleMonte Carlo testing of classification groups
This is another article on the theme of defining groups in a hierarchical classification. A previous article described homogeneity analysis to visualize how any well any number of groups, defined at...
View ArticleSmooth as...
For a current project I needed a polygon smoothing algorithm in Java that: generated a curve passing through all polygon vertices had some way of controlling tightness of fit to the polygon fell within...
View ArticleBuild an application plus a separate library uber-jar using Maven
I've been working on a small Java application with a colleague to simulate animal movements and look at the efficiency of different survey methods. It uses the GeoTools library to support map...
View ArticleIDE errors with Maven projects after upgrading to NetBeans 7.2
A recent upgrade of NetBeans from version 7.1 to 7.2 seemed to cause problems with Maven multi-module projects. Normally, a newly created class in one Maven project module will be instantly visible to...
View ArticleFitting an ellipse to point data
Some time ago I wrote an R function to fit an ellipse to point data, using an algorithm developed by Radim Halíř and Jan Flusser1 in Matlab, and posted it to the r-help list. The implementation was a...
View ArticleCircle packing in R (again)
Back in 2010 I posted some R code for circle packing. Now, just five years later, I've ported the code to Rcpp and created a little package which you can find at GitHub.The main function is...
View ArticleStatic and moving circles
After the previous post on the packcircles package for R someone suggested it would be useful to be able to fix the position of selected circles. As a first attempt, I've added an optional weights...
View ArticleGraph-based circle packing
The previous two posts showed examples of a simple circle packing algorithm using the packcircles package (available from CRAN and GitHub). The algorithm involved iterative pair-repulsion to jiggle the...
View Articlepackcircles version 0.2.0 released
Version 0.2.0 of the packcircles package has just been published on CRAN. This package provides functions to find non-overlapping arrangements of circles in bounded and unbounded areas. The package how...
View Article