Freesteel Blog » 2013 » November

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.

Saturday, November 30th, 2013 at 1:58 pm - - Kayak Dive 1 Comment »

There was a brief window of weather this week which was enough for three divers to get out on Cosmo’s boat on Thursday: Becka, me and someone much more competent than us with a rebreather from Ormskirk.

Although the sea was very calm, the visibility didn’t look good at an inshore site, so we moved off to the Wreck of the Counsellor in deeper water, and dived that.

It was black as midnight down there with barely 0.75m working visibility, so we came up pretty swiftly. Don’t waste risk; only do something dangerous if you’re getting something out of it.

My second tank was only a 10Litre, because my 12Litre was completely empty when I fetched it from the garage. Maybe something leaked. Fortunately this was meant to be a shallower dive, on the Wreck of the Speke, which, I was told, is on its side half buried in the sediment so you can go into its hold along the sea bed.

The anchor must have landed square in front of this opening, because we blundered away from it for quite some distance before we hit the wreck — from the inside!

Not good. According to the video footage, we were lost for 3 minutes, which is a very long time. While we got away with it, our margin for error was down to the width of a prawn’s antenna, because all it would take is a regulator snagged from your mouth by a bit of twisted metal or a exploding o-ring, and then we’d be toast.

There was a dredger at work on the channel, which might have accounted for the visibility.

Back in the harbour all the little boats piled into the lock following the usual delay waiting for tide to rise high enough to be over the sill. Everyone else had been out in the estuary fishing for cod. Becka challenged me to a game of “spot the female”. Not a single one among them. What is it about fishing and women?

Anyhow, that was enough excitement for one week.

Wednesday, November 20th, 2013 at 8:24 pm - - Adaptive

How software actually gets developed. I came up with this idea over in Denmark when I heard the usual complaints about linking motions going over the top in a retract motion when they could stay down and traverse all hither and thither around the obstacles to get from one position to the next.

There’s always something. Last year it was the order of the cutting and the lack of multi-core processing. No one is complaining about those anymore. Either we fixed it, or they got bored.

Anyhow, I decided I’d show them why you don’t want that kind of a path by planning to do a stay-down path no matter how twisted and complicated it is, and then you can see it’s a lot slower than a straightforward no-nonsense retract motion.

This idea got onto the forum, and it sounds like people want it.

Very well.

I guess that delays my other attempts to make an improved minimal retract linking where it jumps over from one place to another on a hump, like you get with finish machining linking, only it was going to avoid uncut stock and be able to deviate sideways slightly to miss any upstands. There’s a difference between being the fastest toolpath and looking good.

Getting rid of all the retract linking moves is going to look good — we hope. Otherwise it might turn out to be a mad scribble. Who knows until we try it?

So, this requires an implementation of the much-known A* search algorithm on the weave structure. It’s been a long time since I’ve been into this area of the code. I’ve made about three false starts to get anything out, but now I know what I am doing. This is my first picture I’ve got.

Theoretically, because the search can spread out into every single cell in the weave structure, it will always find a connection no matter how complicated.

Now the trick is to improve it by ripping out sections of the path and replacing them with straighter and smoother motions. Oh, and also test for collisions with uncut stock as well in order to avoid it.

Might be slower, but since it now calculates in parallel on separate cores of the computer it will only be a problem if it becomes the bottleneck.

This is parallel program optimization. It’s no longer necessary to make your functions as fast as they possibly can be. They only have to not the slowest of all the jobs that run in parallel.

It’s like a team race where it only counts when every single member of the team has crossed the finish line. So if you have a couple of really fast sprinters on your team it won’t make any difference.

We could make things even slower by completing this linking function for every possible order of cutting. Rather than, at the end of each pass, picking one of the five next paths to go to according to which one is closer, you build a complete linking motion to each and pick the one that actually has the shortest link, a bit like a quantum wave function collapse.

Saturday, November 16th, 2013 at 11:50 am - - Machining, Whipping

A lot’s been going on in the world. It’s out of my hands. I don’t know anything or have any influence over it, so what I say shouldn’t matter. Very sensitive. Yadda yadda. Got to watch out because it’s publicly listed companies and there’s shares and high-stakes gambling and all that money stuff.

Funnily enough, private non-listed companies that do not have any jittery share-holders or regulations to worry about are even more extremely secretive about their businesses. I wonder if they bother to invent positive and vaguely plausible excuses for their secrecy when there is apparently no commercial reason for it.

Secrecy is actually about power in all frames. This is the week that the TPP trade agreement got leaked. The text outlines a vast expansion of no-strings-attached corporate monopolies (aka “Intellectual Property”) in all sectors of the economy — policies that have been soundly and democratically rejected in the past. There’s no reason to keep that stuff secret, except in order to facilitate a plan to ram it through into law in an instant as a shock to the system in an opportune moment.

Not sure why I’m talking about that. I wanted to talk about food.

(more…)

Wednesday, November 6th, 2013 at 7:25 pm - - Machining

Let’s make a set of 50 random points, distributed like so:

N = 50
xs = [ random.gauss(0,25)  for i in range(N) ]
ys = [ random.gauss(0,11.9)  for i in range(N) ]
ys = [ y+x*0.3  for x, y in zip(xs, ys) ]
xm, ym = sum(xs)/N, sum(ys)/N
pts = [ (x-xm, y-ym)  for x, y in zip(xs, ys) ]

The displacement by (xm, ym) is so that average is centred on the origin to make things simpler. Here’s the picture:

(more…)