Tuesday, February 11th, 2014 at 5:43 pm - Adaptive
Taking a break from all my other mindful notions to do some proper work on this stay-down linking job.
I have an A-star function that works on the underlying weave structure. The white zones refer to the weave which defines the interior of the contour, and the red zones are the places where it’s safe to go without colliding with the uncut stock.
Most A-star algorithms involve one start point in each tile which spreads out to all sides of the tile. But in my implementation the paths from the sides of the tile are pulled from the receiving end, so it’s possible to have two start points in the same tile with two paths going through, as shown above.
Wednesday, February 5th, 2014 at 8:33 pm - Canyon
Spotted the new(ish) Liverpool Wakepark on the docks when I cycled passed it on the weekend while taking a break from endless, endless coding every day.
So we booked a ride on a fine grey February afternoon.
The place (called “Industry.1″) is dude central, and appropriately disorganized and friendly. Downstairs from the changing rooms numerous fire service bods were practicing how to rescue each other with tow lines from the static salt water. Looked a bit dull, but they can’t justify wakeboarding on working time. If this flooding goes on much longer, they’d do better to get their training at one of those artificial whitewater courses where they’d get washed off their feet and they added tree branches into the flow. See that river: that’s your high street.
I took my caving wetsuit, still muddy from the last time I used it in July. This finally got it clean.
And we’re off. It’s probably exactly the same as water-skiing, except without the power boat, the mess and the noise. I never had rich enough friends to do that.
Becka seemed to enjoy it a heck of lot more than snowboarding. Or canyoning.
We both got standing and going in a straight line before our time was up.
Not bad for something that’s literally a quarter of a mile away from home. How lucky is that?
Now, back to work. This ain’t the summer yet.
Friday, January 24th, 2014 at 6:07 pm - Adaptive
Sometimes it’s a relief to be certain that I’m doing something which is exactly what I am paid to do. All the rest of the mouthing off comes for free. Though maybe it’s important to always question what you are paid to do, so you don’t wind up wasting everyone’s time doing something that’s actually pointless.
After having got the A* routing through the weave structure to work based on my unpatented subdividing model of a 2D area that forms the geometric basis of the adaptive clearing non-gouging motion algorithm, I noticed that it did not give enough sample points for a linking pass to be within tolerance. The route, which must avoid uncut stock, requires a greater sample rate than the basic weave cells. These cells were sampled to a resolution along the boundary contour so that it would be within tolerance, but it is insufficient to handle the uncut stock structures that exist in the interior space of this area partway through the clearing cycle.
There are two options to deal with this insufficiency of sampling. Either add in an additional sample rate system, or improve the basic underlying weave sampling structure.
Tuesday, January 14th, 2014 at 6:47 pm - Adaptive
A quick day’s work to make a multi-threading percentage progress handling object in Python that handles residuals.
Let’s start with the test code (which I wrote after the working code — take that TDD!):
class ACProgress: def __init__(self): self.sumprogress = 0 def ReportProgress(self, lprogress): self.sumprogress += lprogress print "The progress is at:", (self.sumprogress *100), "percent" def addprogress(a, n): for i in range(n): acprogress.ReportProgress(a/n) time.sleep(0.05) acprogress = ACProgress() addprogress(1.0, 25)
This prints numbers up to 100% in steps of 4%.
Now we want to do this in threads.
The stay-down linking code relies on an implementation of the A* search algorithm to quickly find a connecting path between the start point and end point by spreading a network of paths in an optimal way.
There’s a couple of nice animations from Wikipedia showing what they look like.
Suppose we have a network of paths, like so:
The path from Start to A and the path from Start to B rank the same in the priority queue because:
length(Start, B) + distance(B, End) < length(Start, A) + distance(A, End)
(The length function is the length of the green path, while the distance function is the length of the yellow path.)
According to the A* algorithm, the next step should extend outwards from the point B before we go from A on the basis that there could potentially be a direct path that takes us all the way from B to the End point that is shorter than the best one we are going to get by extending A.
But this is impossible, because the theoretical best direct path cuts through many paths (including the Start to A one) before it reaches End, and any one of these paths could be substituted up to the point of intersection into that Start-B-End path to make it shorter, which is illogical, captain.
Therefore, if there is going to be a shorter path from Start that passes through B, then it will have avoid at the very least the girth of the search tree, defined as a line connected two extreme points, like so:
And when you use this to increase the value of distance(B, End) in the formula above to the length of the two segments required to get round the girth line on either side (whichever is shorter), you don’t get quite so much unnecessary sprawl near the Start point. You can add more girth lines if you like.
It’s a small improvement, but practically for free, and may make a big difference for a lot of realistic cases where there is one major obstruction.
Friday, January 3rd, 2014 at 5:26 pm - Weekends
Well, it was a plan. Xmas is a drag, what with either having to go away on holiday or spend days overeating with the family feeling inadequate because you didn’t bring any presents. My thoughts of a flying holiday in Lanzarote had been deemed impractical, and Becka’s plans for a week XC skiing with friends in Norway looked equally difficult due to the lack of passenger ferries.
I’d had this walk in Wales on my mind for ages. Let’s do it, I said.
“But the weather will be crap.”
Exactly. It’s only a walk, and we wouldn’t be wasting good weather on something that doesn’t depend on good weather. In fact the worse it is, the more adventurous it will be. It’s only Wales. It’s not like the Pacific Crest Trail. How bad can it be?
Thursday, December 19th, 2013 at 12:29 pm - Whipping
It was getting rather full of electronic accretions that kept me awake at night. The server disks had been moved four years ago with everything left intact. It would have been easier to have renewed it another year, but I decided that it’s best to do this sort of spring cleaning when things were quiet.
Back when you had to buy computing resources by the barrel, you had to throw a big on-going party to use up all the resources. But nowadays you can buy it by the glass, which means each project can go into a separate container, which makes each one cleaner and easier to retire. It’s a nightmare when they are all in the same box and start depending on each other in unpredictable ways. The apache httpconfig file in there was a disaster area.
So many projects get started. And so many lie around half finished.
Here’s the Eulogy.
@symroe: @frabcus you’re killing seagrass??
@frabcus: Eulogy #1: Ah http://seagrass.goatchurch.org.uk/ it was nice sysadmining you all these last 8 years.
@frabcus: Eulogy #2: You did so much – in the early days running codeabode (a version control hosting thing with @rufuspollock) and
@frabcus: Eulogy #3: and parlparse (powers @theyworkforyou, @publicwhip) while it looked like @dodspeople might support it, and so many years since
@symroe: @frabcus just logged in to seagrass (for the last time), and found a copy of ‘MP fight!’ in my home directory!
@frabcus: Eulogy #4: For a while you were popular: with caving software and blogs and SaveParliament and Think Twice conference
@philipjohn: @frabcus Yay Save Parliament #memories
@frabcus: Eulogy #5: Changing the world around you with the move of ethereal bits in the electric dark of a new information age
@frabcus: Eulogy #6: Later you were the first place to have direct links to United Nations documents (UNDemocracy) and crowd-sourced election leaflets
@frabcus: Eulogy #7: All the while, tirelessly helping millions find out how their MPs voted, with PublicWhip and its @theyworkforyou feeding API
@symroe: @frabcus you missed out the first scraperwiki on seagrass!
@frabcus: Eulogy #8: Your hardware changed, you moved to Manchester. Yet stil your heart was the same, your systems Debian stable, your RAID monitored
@frabcus: Eulogy #9: In your twilight years all gradually left. Abstraction, commodification, the cloud in the real sense of IaaS. And your services
@kindofwater: @frabcus Thought about how we now just delete servers in the cloud. They have no personality. Total immateriality.
@kindofwater: @frabcus When I used to work at the University of Kent we turned off an ancient Sun server with similar ceremony.
@frabcus: Eulogy #10: Gradually left early adopter – either dieing, or entering mainstream to grown up servers.
@frabcus: Eulogy #11: And now finally, your paymaster sees no point in your bills. The energy of controlling you dispersed. You must go.
@frabcus: Eulogy #12: Put down like an old cat, when really you are at the prime of life. Your vhosts gradually erased, email directed from you.
@frabcus: Eulogy #13: The clock ticking on the last DNS entry pointing to your port.
@londonlime: @frabcus this one made me well up!
@frabcus: Eulogy #14: Ah seagrass, times were good. To the server afterlife – reformatted and reincarnated, like an @Mythic_Beasts you will rise again
@Floppy: @frabcus I’m humbled to be part of that story. It was truly a hero among servers. #seagrass
Monday, December 16th, 2013 at 11:53 am - Whipping
More important than charity work (aka filling in for the failures of political governance), there’s volunteer work for the electoral system. For some reason society believes that the business of placing options on the ballot sheet and publicizing what they mean is not something that needs to be done systematically and professionally, like, say, collecting the garbage.
So here we are at 6am on the morning of Thursday 5 December collecting our batches of get out the vote leaflets from the Green Party candidate who has been working this city council Riverside Ward for years.
Here’s the leaflet:
Tuesday, December 10th, 2013 at 6:40 pm - Adaptive
Of course, I could be going down another blind channel. But for the moment it looks like it is getting closer as I progressively fiddle with the search algorithm and allow it to pick the exit points from each cell and not stick to the mid-point of each edge.
Saturday, November 30th, 2013 at 2:56 pm - Cave
Short note on the previous weekend. There was a meeting at Andy Eavis’s house under the Humber Bridge following their great cave chamber laser scanning projects in China over the summer. Somehow I got invited, probably because I say I can able to do things with CADCAM software, and such forth.
We cycled from Brough behind the BAe factory where they make the Hawk “Trainer” jets. Funny how there’s so many “Trainer” jets being exported. What a laugh. Doesn’t do any harm. They’re not “weapons”. Like those “replica” hand-guns with a complete set of working parts. Or a presidential candidate who says that he smoked, but did not inhale. Far too few people laugh at these official lies to stop them sticking.
Andy is the current president of the International Union of Speleology, an off-shoot of the International Congress of Speology, the 16th of which I went to in Brno this summer in the Czech Republic. It’s a fantastic bureaucracy, worthy of Kafka, where Andy is named as the coordinator of the Long, Deep and Large Caves Commission, among about a hundred other commissions.
Of course, none of the commissions is in charge of new technology that would be game-changing for cave surveying. Nor do they have anyone who is particularly interested in cave survey software (at the Congress, we had to have our meeting in a cafe round the back). If I was in charge I’d establish a Commission on the Relevance of Commissions and do some long-overdue weeding.
Anyways, we got to see some of the point clouds being rendered by the experts using the open source Cloud Compare software. As standard practice, the point cloud was thinned to make it renderable.
Someone there need to produce a video of a flythrough and wanted to use all the points, and didn’t know how as the expensive software they used crashed when it received more than 10 million points. What crappy software engineering. I worked with him on a work-around.
I haven’t had time yet to download and install Autodesk ReCap to see if it is up to the job. Probably not. We’re getting hit with trillions of laser scanner points now, and no one with a budget is taking it seriously in the software world yet. (I do, but I don’t have a budget, do I?)
Quite coincidentally, someone sent this youtube video about a company called Euclideon claiming to be able render unlimited point clouds at a reasonable frame-rate using just the CPU. It’s a great little video. I’ve watched all of it twice.
There’s been a lot of controversy around the claim, which is not surprising for something that’s been worked on for seven years without releasing a product.
I think I may have worked out what’s going on here, after a long sleepless night. If I have it right, the technique does not allow you to zoom; you can only move nearer or further from the view.
I don’t need any more distractions. Maybe I’ll toy with an implementation once we do start getting our own cave scans to play with.