Archive for the ‘Uncategorized’ Category

Infusion moulding a kite-board

Sunday, July 6th, 2008

Ilkka (who runs kiteile.com) decided to make a kite-board by infusion moulding. He made 3-4 trials first, and this is the first full-size real kite-board. It’s now cured and out of the bag and it looks like everything worked fine.

Drama vid Skåldö färjan

Friday, July 4th, 2008

En motorbåt körde på Skåldö färjans vajer ca 19:30 tiden. Alla ombord verkade ha klarat sig utan större skador och fördes bort med ambulans. Motorbåten satt fast i vajern och brandkår + färj-kapten försökte först få loss båten, men det slutade med att färjan togs loss från vajern och båt+vajer sjönk till bottnen! Färj trafiken löpte normalt igen ca 20:45.

Här en animation där man ser båten sjunka: farjan_animation2 (5 Mb AVI-fil)

More pystones with shedskin

Monday, June 23rd, 2008

As I’m very much an amateur programmer with not too much time to learn new stuff I’ve decided my CAM-algorithms are going to be written in Python (don’t hold your breath, they’ll be online when they’ll be online…). The benefits of rapid development will more than outweigh the performance issues of Python at this stage.

But then I found Mark Dufour’s project shedskin (see also blog here and Mark’s MSc thesis here), a Python to C++ compiler! Can you have the best of both worlds? Develop and debug your code interactively with Python and then, when you’re happy with it, translate it automagically over to C++ and have it run as fast as native code?

Well, shedskin doesn’t support any and all python constructs (yet?), and only a limited number of modules from the standard library are supported. But still I think it’s a pretty cool tool. For someone who doesn’t look forward to learning C++ from the ground up typing ‘shedskin -e myprog.py‘ followed by ‘make‘ is just a very simple way to create fast python extensions! As a test, I ran shedskin on the pystone benchmark and called both the python and c++ version from my multiprocessing test-code:

Python version

Processes	Pystones	Wall time	pystones/s	Speedup
1		50000		0.7		76171		1.0X
2		100000		0.7		143808		1.9X
3		150000		0.7		208695		2.7X
4		200000		0.8		264410		3.5X
5		250000		1.0		244635		3.2X
6		300000		1.2		259643		3.4X

’shedskinned’ C++ version

Processes	Pystones	Wall time		pystones/s	Speedup
1		5000000			2.9		1696625		1.0X
2		10000000		3.1		3234625		1.9X
3		15000000		3.1		4901829		2.9X
4		20000000		3.4		5968676		3.5X
5		25000000		4.4		5714151		3.4X
6		30000000		5.1		5890737		3.5X

A speedup of around 20x.

5-axis simulation

Tuesday, June 17th, 2008

The people at EMC2 Fest (webcam here) made this AVI of 5-axis machining a sphere using some custom g-code and povray.

I’ve been playing around with vpython, so you can expect some CAM-related posts on drop-cutter in Python and associated 3D views or animations in the not too distant future.

multiprocessing pystone benchmark

Sunday, June 15th, 2008

A simple pystone benchmark using the python multiprocessing package. Seems to scale quite well - guess how many cores my machine has! :)


" Simple multiprocessing test.pystones benchmark "
" Anders Wallin 2008Jun15 anders.e.e.wallin (at) gmail.com "
from test import pystone
import processing
import time

STONES_PER_PROCESS= 10*pystone.LOOPS

def f(q):
    t=pystone.pystones(STONES_PER_PROCESS)
    q.put(t,block=True)

if __name__ == '__main__':
    print 'multiprocessing test.pystones() benchmark'
    print 'You have '+str(processing.cpuCount()) + ' CPU(s)'
    print 'Processes\tPystones\tWall time\tpystones/s'

    results = processing.Queue()
    for N in range(1,processing.cpuCount()+3):
        p=[]
        q=processing.Queue()
        results=[]

        for m in range(1,N+1):
            p.append( processing.Process(target=f,args=(q,)) )

        start=time.time()
        for pr in p:
            pr.start()
        for r in p:
            results.append( q.get() )
        stop=time.time()

        cputime = stop-start    

        print str(N)+'\t\t'+str(N*STONES_PER_PROCESS) \
              +'\t\t'+ str(cputime)+'\t'+str( N*STONES_PER_PROCESS / cputime )

Small Yachts

Tuesday, January 1st, 2008

I remember a quote from MMI some years back on the IOM “there’s nothing wrong with it another metre wouldn’t put right!”. Well the days of the A-boat and 10-Raters are pretty much gone in most countries, and now there are a number of sub-1-metre boats or kits becoming popular. Some are popular in great numbers, like the Micro Magic (see my post from Feb 2007). Here are two home-built boats/boat-types I’ve been notified of lately:

This one is 750 mm long, comes from NZL, and is called a Racing Sparrow. The website looks exceptionally good with a lot of information, pictures, and downloadable plans. Designer Bryn Heveldt has also written a book, available on Amazon, about building the boat. There’s a YouTube video here.

This is a Strathclyde 70 class (does the class have other ‘homepages’?) boat, also around 700 mm long, planked in balsa by Peter Trimmer (AUS). It’s actually a 70 % scaled down version of the Laerke IOM.

I wonder how these boats sail? I’ve sailed a MicroMagic a couple of times, so if anyone can comment and compare these two to a MicroMagic or an IOM I’d be interested. Do people really want the 1+ metre boats, or is racing just as fun with a smaller cheaper boat?

As before I would predict that any class that aims to be popular needs to have good availability of boats. There are a lot of MicroMagics and RC-Lasers around because you can buy them (more or less cheaply) over the counter at the hobby shop. It’s just a shame that usually the designs and class rules of home-builders and accomplished radio-sailors (you know, the ones who still have their A’s and 10R’s in the basement) seldom meet with the needs/requirements of people who are able to mass-produce a boat. I think currently there is no commercially mass-produced kit or ready-made boat sold that fits in any international class (A, 10R, M, IOM) ? The Windstar probably comes close, but I understand it requires a lot of modifications before it’s competitive with a standard IOM.

I’ve toyed with some ideas around IOM-production, but it’s not likely that 2008 will see major progress (too much else to do…). If anyone has some news or ideas let me know! Now it looks like we will have MicroMagic sailing at both the Helsinki Boatshow (Feb 08) and the Helsinki Model Expo (Apr 08) - and I did sort of promise last year that I would turn up with a boat of my own in 2008…

Update: There’s an article in the latest Model Yachting magazine about Jon Elmaleh’s latest project the Twang IOM. It’s going to be mass produced and will hopefully be available in the summer of 2008. No word on Jon’s site yet…

Trimaran on Foils

Saturday, December 8th, 2007

A fast but unstable way of radio-sailing.

WordPress 2.3 etc.

Tuesday, September 25th, 2007

There’s a new version of WordPress available, so I’ve upgraded. Unlike brand new buggy closed-source commercial software, I’ve found no problems with 2.3 “Dexter”.

I’ve been browsing through a lot of scientific papers lately, and was struck by just how bad Nature’s doi resolving sometime is. Try this for example: http://dx.doi.org/10.1038/nature04268
You get to a page with the article title, the authors, and the reference. But no sign of a link to the abstract, the HTML article, or the pdf article!?

I’ve also found a discussion on various pdf/paper archiving services. I’d like something that integrates well with EndNote, any ideas?

More Pixels Please!

Friday, September 21st, 2007

I reluctantly sold a 20″ 1600×1200 Viewsonic with the desktop machine when I switched to my current T60 laptop (14″ 1400×1050) about a year ago. The screen is not the strongest point of the T60, and that feeling has just been reinforced by looking at some 22″ Samsungs at work. Now prices have plummeted again so I convinced myself that I need a 24″ 1920×1200 Samsung 245B!

I need a smart way of managing my desktop for normal mobile use (1400 pixels wide), working at home with this new toy (1920 wide), and giving talks/lecturing with video-projectors that are usually only 1024 wide. Any ideas?

Somewhere… Way up high

Tuesday, June 19th, 2007