Phun: Clock with Balls
So about a week ago I discovered Phun, a 2D physics sandbox. It’s an awesome toy. You should check it out. Anyway, I made one of those ball clocks. It was a lot more work than I thought it would be, but at least it’s done and I can stop obsessing about it. (Well, it does get stuck occasionally so maybe I can’t. And I wonder if I could do the same thing with water. How about a thing that builds a wall and knocks it over? So many possibilities…)
I just put up a video on YouTube (after spending a really long time figuring out how to encode one the right way). You however, are lucky, and can see a good quality version of this video. You might need to install VLC to play it though. If you already have Phun installed, you can also download the .phn file. Just unzip and drop it in your Scenes folder.






I'm Tim and this is my blog. I just started a year-long trip around the world on 7/1/08.
February 26th, 2008 at 3:53 am
Hi!
Awesome thing, this one is truly an example of what you can do with a tool like Emil’s and just a little creativity.
However, when I tried running the .phn-file, something weird happened, the half-minute counter didn’t work as expected, and indeed many of the flippers just kept flipping when even just one ball hit them. However, this was more or less solved by turning off air friction.
Also, sometimes, the balls would catch on the conveyor belt, a problem that seemed to get worse over time..
All in all, it worked absolutely great, though
Regards
Petter Ericson
February 26th, 2008 at 8:05 am
Hmm… Strange that it didn’t work right. I have noticed that when I switch to a different virtual desktop but leaving Phun running, the conveyor belt is more likely to get stuck. (It’s on a list of things to look at some day.) I think this is because something about the simulation changes (maybe it happens less often). I’ve only tried it on my own PC (Athlon 64 3000, GeForce4 MX). What kind of PC are you running?
Can you get me video or something of the see-saws just spinning on and on? I haven’t seen that at all.
I’m glad you enjoyed the download anyway.
Tim
February 27th, 2008 at 6:16 am
I run an Athlon 64 X2 4600+ with a GeForce 7300 LE, so quite a bit faster than your machine. Even so, you should be able to see the seesaws malfunctioning by just turning air friction on, as this seems to make the balls and seesaws move just a little too slowly for them to work correctly.
As for stuff catching.. unfortunately it seems to happen quite often, and as a result, the catch doesn’t always work as intended, meaning the ball dispenser does an extra revolution, pushing two balls into rotation at the same time, which is the really dangerous situation, since that’s when the conveyor get really stuck.
All in all, things seem to get out of sync when the conveyor starts catching and going slower than intended..
However, I’ve made some tweaks (mostly setting the friction of some components to zero) and got something which at least does not snag as much..
Take a look at http://www.acc.umu.se/~pettter/clock2.phn if you’re interested.
February 27th, 2008 at 8:11 am
That is faster. I also tried it on a Core2 Quad at 2.66GHz, Quadro FX3450/4000, which is also a lot faster than my home machine. It works about the same as at home though. Sometimes the conveyor gets stuck, but that’s all. I’ve still yet to see any spinning of the seesaws. I tried both with air friction on and off. BTW, I developed the clock with air friction on.
I’ve been trying to not lower the friction to 0 anywhere to keep it maybe possible to build the model in real life, but we’ll see how possible that is.
Which seesaw specifically do you see spinning? How many balls are involved in that?
I guess I’ll have to spend some time this weekend improving the ball collecting mechanism. I have some ideas, but it’ll come down to experimentation.
I will definitely take a look at your modification when I get some time.
Tim
March 7th, 2008 at 1:45 pm
I’ve made yet a new version with some rollers here and there to stop the balls from clogging. It has run a number of hours without hitches, so it seems to work somehow
Take a look at http://www.acc.umu.se/~pettter/clock5.phn
With your permission, I’d like to add it to the new Phun wiki page, with due credit to you, of course.
As for the spinning seesaws, it starts with the half-minute one already. Are you sure you’re using the latest beta (3.12) ?
Cheers.
/Petter
March 10th, 2008 at 10:22 am
That’s nice. Some time I’d like to play with it and use fewer motors/0 friction elements, but it looks like I won’t take the time to do that anytime soon.
You’re welcome to distribute the file as you see fit. A link back here would be appreciated.
I’m definitely using 3.12. What do you mean exactly by spinning seesaws? The half minute one does jump around kind of wildly before settling, but it always settles in time.
Tim
March 11th, 2008 at 3:14 am
Well, after the first see-saw (the one tipping after half a minute) has tipped away its balls the first time, the next ball to go on it hasn’t gathered enough speed to go all the way to the other side, so to speak..
Some pictures:
clock.phn, just loaded, note that air friction is ON
http://www.acc.umu.se/~pettter/phun1.png
The first see-saw tipping.
http://www.acc.umu.se/~pettter/phun2.png
The next ball starting to get on..
http://www.acc.umu.se/~pettter/phun3.png
But that’s as far as it comes
http://www.acc.umu.se/~pettter/phun4.png
Before it rolls back
http://www.acc.umu.se/~pettter/phun5.png
..and off
http://www.acc.umu.se/~pettter/phun6.png
It goes on like that with every subsequent ball. This is with clock.phn, beta 3.12, air friction on, nothing else changed..
Hope this helps.
/P
March 11th, 2008 at 6:45 pm
Sadly all those links are 404s…
Tim
March 12th, 2008 at 11:46 pm
Dammit! Fixed now.
/Petter
April 14th, 2008 at 5:26 pm
I can’t figure out how to open the clock file with phun. would you please explain in full detail how to do this. Im Not very good with computers so i am lost at what to do. i really like the program phun, and i saw your clock on youtube and i immediately wanted to make one. i couldnt figure it out so i would like to have the real thing to look at. please and thank you.
July 1st, 2008 at 5:30 am
Hey this is a great program. I discovered it about a week ago. I have made a couple machines but they are not very good. I would like to know where to download your .phn file so i can see how things work better and obviously watch it.
Thanks
July 1st, 2008 at 5:33 am
Nevermind i found it but thank you and it is a really cool machine
June 20th, 2009 at 4:22 am
I’m surprised that you’ve encoded the file as .ogg, but then again, it works, so hey…
Phun is definitely a great program to build pretty much anything in. I’m still learning it through trial and error, rather than reading the help pages, but thats how I do things.
I like your clock alot. It shows just one of the many different and complex things that can be created and simulated accurately with Phun.
Excellent work. I’d like to see more things you’ve created.