cyanshade wrote:Was bored at work, so I improved html2lux a bit. Because the bounding box method for finding the centre point of each land didn't work very well, I've replaced the function with a much better one.
Now the centroid (centre of mass) of each polygon is calculated and used as <armylocation>. It's surprisingly robust, to the point that you seldom have to tweak the placement by hand.
I've updated the copy at http://leela.homelinux.net/lux/
Do you mind if I snarf your area/centre subs? Gemisys.pl (random map generator, available in the plugins) has that same issue...and sounds like your method is much more generic than what I ended up using (since my polys are 'well formed' in the general case (they are all four or five point polygons and don't generally double back or cross-over themselves), I simply compute the average x, average y and use that.
Users browsing this forum: No registered users and 0 guests