Hacker Dudes// alternate deck. same feed.
FEED ~15/h Δ0 ────:──── LINK ░ SIGNAL
95%
SPOOLED 0/45 CYCLE 61339.745.126.25
Show HN: Impossible Machines: declaratively program the physical worldimpossiblemachines.xyz
81pts/22 comments/4d/─
by bhaprayan / hn> / « feed
▲▼ skinfaxi18:36 hn>

This is cool! I think it would be interesting to expand the language of the world. Right now the interaction with the bell or door is limited (basically binary). Even with binary it would be cool to say ring the bell three times or play shave and a haircut and then a mechanical device that could generate that frequency would be created (for ex a simplistic one would be to skip every other ring for ringing the bell). I guess that would require the world/the objects to account for interactions over some recording period.

▲▼ bhaprayan18:46 hn>

Thanks! Great idea, I hadn’t realized the interaction is binary. It would be cool to allow for "continuous" inputs too. The world would have to account for interactions over a recording period right.

Behind the scenes, I’ve tried to make the audio production realistic, so there’s some acoustic modeling going on (eg echoes, attenuation of sound, etc). But yes you could imagine having the input forces be continuous and having the mechanism trying to figure out how to reproduce the sound exactly.

▲▼ skinfaxi23:59 hn>

I love this idea of declarative modeling of the world because it seems to me to be the way that we as humans do it. I think the hard part about declarative is understanding intent beyond simple interactions. The current limited framing limits the expression one is capable of in the world but of course these are all tradeoffs.

─ 1 more ─
▲▼ jdw6418:47 hn>

It seems people think alike. Something that inspired me in the past also had a similar implementation.

[1]https://www.microsoft.com/en-us/research/publication/motion-...

▲▼ bhaprayan19:01 hn>

That was cool! Watched the demo video, didn't go through the paper yet. I'm running a simple heuristic to test for candidate solutions and running them through Rapier (https://rapier.rs), but simulated annealing to efficiently search the configuration space would be a nice extension.

▲▼ jdw6419:07 hn>

Your work is wonderful, too.

─ 1 more ─
▲▼ pshc19:13 hn>

The Incredible Machine vibes.

▲▼ bhaprayan19:48 hn>

Embarrassed I'm just finding out about this, very cool! Neat that they simulated air pressure too. I should try that, would be fun to influence the texture of the sound.

▲▼ SeanAnderson20:35 hn>

woah lol. I 100% assumed you used it as inspiration for your software.

─ 1 more ─
▲▼ mcphage19:29 hn>

Disney's research lab did something along these lines some years ago for making a point follow a path. You draw a path, and it generates the linkages required to match that path as closely as possible. They've had a lot of follow-up work since, but I remember this video for it: https://youtu.be/DfznnKUwywQ?si=F-5NZxKu4hP_mand

▲▼ bhaprayan21:16 hn>

Really neat demo! I skimmed through the paper and it looks like they’re using a precomputed database to find an assembly that matches the motion (presumably as a seed to instantiate the solver). That’s definitely more efficient than what I have right now (though perhaps less versatile). I like that they manufactured a few of the characters using 3D printing! That was definitely on my mind, really happy to see they did it.

Some of the mechanisms (belt drives etc) might be a little tricky with 3D printers, but would be very cool to see the mechanism tangibly realized.

▲▼ donalddominko20:03 hn>

This is actually very interesting idea you had. I watched the demo and played with it and I am looking for a link to repo - I would like to know how did you implement the system achieving the outcome.

▲▼ bhaprayan20:57 hn>

Happy to open source, the code is a little messy right now, so I’ll clean it up and post a link in a few days!

High level:

I’m using ThreeJS for the rendering and Rapier (https://rapier.rs/) for simulating bodies, joints, collisions, forces, etc. The mechanism is solved for using a simple heuristic search (eg constraints, etc that you introduce in the scene) and then run through Rapier to find a configuration that works, though there are definitely more sophisticated ways to do this. The audio is based off a sound pack which I tried to make physically realistic so impacts are panned relative to the camera, with compression and a small generated reverb.

▲▼ insiderprint22:32 hn>

This is fancinating!

▲▼ bhaprayan22:38 hn>

Thanks, happy to hear you liked it!

▲▼ verdantNorth07:44 hn>

This is a clean take on Go. What would you change if the workload grows?

▲▼ pinePulse08:06 hn>

This is a clean take on Go. What would you change if the input is messy?

▲▼ wemakethings12:00 hn>

This is great. Had fun playing around with it. Do you plan to add more elements and more challenges? 'Describe the world, not as it is, but as you wish it to be.' - Loved that line!

▲▼ bhaprayan16:55 hn>

Thanks! Glad to hear it was fun and that you loved that line. Thought it would be the simplest way to describe the underlying concept. Did you have any elements / challenges in mind that may be fun?

I was primarily thinking about more sources, obstacles, and sinks. Right now the solver picks a random solution so it may be interesting to optionally make that deterministic too.