top | item 44835879

Ultrathin business card runs a fluid simulation

1135 points| wompapumpum | 7 months ago |github.com

221 comments

order
[+] delichon|7 months ago|reply
Advantages of a business card sized hollow box partially filled with water:

  * more realistic fluid motion
  * cheaper, easier build
  * easier to debug
Disadvantages:

  * risk of wet butt when you sit down
  * less joy of doing hard things
[+] jrowen|7 months ago|reply
* less joy of doing hard things

Have you tried to fabricate such a box? I wouldn't be so sure.

[+] pfortuny|7 months ago|reply
It also solves a fluid mechanics problem much faster and more accurately than de digital one!
[+] animal531|7 months ago|reply
I love good finger toys at my desk to keep my ADD busy while I'm working. They need to be:

- Light: If they make a clanking noise every 5 seconds when you pick them up and put them down its just distracting.

- Plastic: There are other materials that work, but in general metals and fabrics react too strongly with your fingers over time, whereas plastic can be easily cleaned.

Having a little water window isn't a problem, but the water is also not as directly cool looking. Usually in the '90s you'd get those mixed color oil/water toys where the colors would make them stand out more, but shaking them would mix the substances causing them to lose function.

As such the electronic version is quite durable in comparison.

[+] kazinator|7 months ago|reply
Disadvantages:

  * excessively fast fluid motion at card scale
[+] kenny239|6 months ago|reply
things you get away with when you remove one level of simulation...
[+] ChrisMarshallNY|7 months ago|reply
Very nice, but probably a bit too expensive to just hand out.

I knew a chap that had a similar hardware business card (I don't remember exactly what it did, but it wasn't as cool as this one).

I remember that his card was pretty scuffed up, and he insisted I give it back, after he handed it to me. Bit weird.

[+] fidotron|7 months ago|reply
The typical Chinese sources have been selling "digital hourglass" type ornaments that work like this for a while.

There was a whole game based on this sort of thing back on the Acorn Archimedes: Cataclysm https://www.youtube.com/watch?v=3Byyz1Vlv8w It got remade for the 360, but the original was regarded at the time as surprisingly impressive for the machines it was running on.

[+] DonHopkins|7 months ago|reply
Wow what a cool retro fluid simulation game!

Oxygen Not Included simulates a whole bunch of different kinds of fluids and gasses, and has a sandbox mode and debug tools.

I love using it as a kidpix-like painting tool, just to see how all the different materials interact.

https://youtu.be/U0MevBWyfS8?t=295

[+] DonHopkins|7 months ago|reply
Is there a Digital Disco Ball?
[+] OisinMoran|7 months ago|reply
If you like this, you'll also love Mitxela's fluid simulation pendant [0], and likely all of his work! I'm consistently astounded by how informative and enjoyable his stuff his. He shares so much, so freely and it's so well produced, with a lovely voice to boot. Inspirational! Watch his vids, read his write-ups or both! We need more people like this.

[0] https://mitxela.com/projects/fluid-pendant

[+] unwind|7 months ago|reply
That was very clearly mentioned and linked in the article, too.
[+] nirava|7 months ago|reply
+1 for mitxela, dude never ceases to amaze
[+] msephton|7 months ago|reply
The circle works much better for the fluid simulation.
[+] wkat4242|7 months ago|reply
Wow that's a nice design.

£1200 for one though.. oof.

[+] _Microft|7 months ago|reply
If you are curious what PCB designs or schematics look like, you can use an online viewer for KiCad files to find out yourself:

https://kicanvas.org/?github=https%3A%2F%2Fgithub.com%2FNich...

@creator of the card (phirks?): have you considered further interactivity or maybe using the LED matrix for showing text or other information?

You could use touch buttons for control as they basically add nothing to the BOM?

Edit: this is of course really awesome as it is

[+] phirks|7 months ago|reply
>Amazing project, but the font on the back of the card is gross.

>It sort of reminds me of those research professors that have received multiple awards and their website is an unstyled HTML page with 4 links

>If they used a sans-serif font then they would have nailed it

>this particular serif font was also a poor choice out of the variety of serif fonts out there

>that's awesome, but i think since it's a business card the text on the back should be more legible (nicer font and/or bigger)

Ok, for real though, can someone just tell me what font to use? We can all see this isn't my strong suit and now you're in my head.

[+] modeless|7 months ago|reply
> board edge usb-c port

This is awesome. I bet we see a lot of these in the future once people realize it's possible to have a USB-C port on your board with no extra parts and zero soldering.

[+] lbourdages|7 months ago|reply
That must be very fragile! Gotta be careful when unplugging, pulling very straight.
[+] noveltyaccount|7 months ago|reply
I thought this was one of the most impressive parts of the design, had no idea this was possible.
[+] raincole|7 months ago|reply
Off topic, but where should one start learning writing physical simulation?

Several years ago I ran into this project [0] and got overwhelmed even the algorithm can be written in 88 lines of C++. I realized that out of all CS topics, physical simulation is probably the one I knew the less (not saying I'm a compiler/database expert or something, but at least I've implemented a toy compiler and some basic data structures used in database. When it comes to physical simulation my bran just draws a blank.)

[0]: https://github.com/yuanming-hu/taichi_mpm

[+] IIAOPSW|7 months ago|reply
Probably what you want is "numerical methods" and "computational physics".

"Physical simulation" is a very broad scope, so your code for simulating fluids is going to be very different from your code for simulating planetary orbits, and at times it may feel a bit ad hoc. But at its foundation physical laws are written in differential equations and linear algebra.

So whatever algorithm lets you numerically integrate several inter-related variables is going to be broadly applicable to simulating any physical phenomena. At the simplest end of the spectrum you just naively approximate integration by brute force. Eg at each step just update your physical state variables by doing velocity += acceleration, position += velocity. This is called Euler's method, and while simple, it accumulates unacceptable errors rather quickly in most circumstance. The more advanced approach is to use a method like Runge Kutta. In circumstances where you have some known property, like say energy conservation, you can implement a method which explicitly imposes the constraint. This is good for cases where the motion is highly periodic as it prevents the numerical error from accumulating exponentially in orbits that spiral out of control.

Of course at some point you'll have to grapple with the issue of if you are simulating trajectories of free particles or values of neighboring grid points in a field. This question of how best to encode physical systems and simulate them cuts to the heart of physics.

I'll leave it at the old cliche "information is physical"

[+] maccard|7 months ago|reply
Rigid body simulations are much much simpler. There’s a siggraph course from 2001 [0] which is a bit of a dense read but it will bring you all the way up to a full blown rigid body simulation and understanding the math behind it too.

[0] https://graphics.pixar.com/pbm2001/pdf/notesg.pdf

[+] Cthulhu_|7 months ago|reply
One thing that helped me was doing some tutorials for pico-8, an intentionally 'weak' game platform, one of which is a platform game with a simple / understandable inertia / gravity simulation (jumping, running left/right; think Mario). It was understandable enough with an x / y position for the character and a delta-x / delta-y representing their current speed. Every frame the dx / dy would get changed depending on player input and/or character state.

Ex: if player presses jump button, set state to 'jumping' and dy to 1. Every frame, dy = dy * 0.9. When dy <= 0, set state to 'falling'. Every frame, dy = dy * 1.1 until dy = 1 (terminal velocity). Then add some collision detection.

I think those basics are also behind the simpler physics simulations, the 'falling sand' types would be ideal for an application like this.

[+] stormfather|7 months ago|reply
Just go to Perplexity or something like that, its well trodden ground. And essentially, what you're doing is discretizing the relevant differential equations and getting that to run in a 2D or 3D cellular automaton.

I'll give you a simple example. For diffusion of heat between 2 points, the rate of change (first derivative) is proportional to the difference in temp between them. So you make an update rule for points on a grid that says "calc the average difference of a cell's temp with that of its neighbors, multiply by some constant, and that is the amount to update this cell at this time. Run that for every cell in parallel, many times." Then you tack on a visualization and you can watch the heat diffuse. A fun example would be the cooling of the proto-Earth. You can watch the crust form.

Heat diffusion is a good starter problem. So is gravitational interaction.

[+] dawnofdusk|7 months ago|reply
Essentially all physics simulations are either particle based or based on integration of differential equations (although in a computer both approaches involve a discretization which makes them somewhat computationally similar). You can consider reading through Numerical Recipes which is sort of the bible for this stuff for physicists, but it is aimed at scientific audiences with weak CS background. Something like Computer Simulation of Liquids by Allen could be a good start too. Let's be clear that the approach I'm talking about here is focused more on physical correctness: if you are a game designer it's not important that your fluid simulations are physically correct and more that it looks physically correct to a player, and there are a variety of more heuristic techniques for something like that.
[+] ethan_smith|7 months ago|reply
The Nature of Code by Daniel Shiffman is an excellent entry point - it teaches fundamentals of physics simulations with clear examples in Processing/p5.js.
[+] SequoiaHope|7 months ago|reply
Beautiful design! I want to say as a maybe helpful review point that I see overlapping silk in a few spots. Ideally it would be nice to clean that up, possibly removing all designators which for my personal preference would work, but some people might like to see those. Also I would choose a more playful font for the back text but I like playful. This is an excellent project, nicely done! I’m doing a lot of RP2350 LED work right now, I’ll have to see if I can run your code on the pendant I am designing.
[+] rwmj|7 months ago|reply
Would love to see more information about how it was built. He must have worked with a company that can do the surface mount assembly?
[+] Cyan488|7 months ago|reply
Electronics can be surprisingly easy and cheap to build these days. He designed the circuit and layout with software called KiCAD (free and open source) then submitted the designs to a fabrication house - probably a popular offshore one - that easily can handle that level of board and component placement complexity. It would probably cost only a few hundred to build and ship, with 1 month turnaround time.

You can also hand-assemble surface mount parts by applying solder paste carefully to the pads, then placing all the components on the paste and heating the board until all the solder melts. That would have very time consuming for all those LEDs!

[+] alnwlsn|7 months ago|reply
>He must have worked with a company that can do the surface mount assembly

He did (there are centroid files in the production folder, which tell the board house where to put the components), but you'd be surprised at how possible it is to assemble something like this by hand. You won't believe me, but I find it easier than through-hole soldering (because you don't have to keep flipping the board over).

But there's a 99.9% chance this was done in-house at JLC or PCBWay.

[+] Retr0id|7 months ago|reply
You can get boards like these made for single-digit dollars per unit* even at prototype scale, through companies like jlcpcb.

*I haven't looked at the specific parts for this board, the LEDs look nice and could be a little pricey.

[+] JKCalhoun|7 months ago|reply
Yeah, wondering how the LEDs were aligned so precisely. Some kind of silicone grid-like jig to hold them while the solder reflows? Or is it just pick & place robotics doing what they do with precision?
[+] DonHopkins|7 months ago|reply
Instead of a business card, I'd love an ultrathin pleasure card you can refill with virtual beer and virtually drink! You could input your weight, and it could track you BAC!

I made "PalmJoint", a beamable Palm pleasure card for CodeCon 2002, when everybody was beaming their contacts around by IR at conferences, I would beam an interactive doobie simulator a bunch of people could play together in a circle. Each person gets their own doobie, and you can have contests to see who can virtually smoke theirs the quickest, or keep it lit for the longest time. I never get around to implementing an IR token passing network:

https://donhopkins.com/home/images/PalmJoint.png

https://donhopkins.com/home/PalmJoint/Src/PalmJointMain.cpp

Some conferences of the era had kiosks with IR LEDs that beamed out a Palm app with a conference map and schedule, which would have been great to hijack for beaming out PalmJoints instead.

[+] catapart|7 months ago|reply
Ha! That's pretty cool.

My first thought with this card was that it could be "gamified" into something that kids would probably love. A clique-y, social thing where kids could "pour" some of their fluid into another's card, with NFC or something. User preference colors that don't change when "poured" could help indicate how many different people have interacted with your card.

But enough spitballing. There's no killer idea there. Just something I'll be amused to see show up as a value-add for some other kind of toy, or whatever.

[+] Cthulhu_|7 months ago|reply
I love it; I bought a secondhand Palm just before smartphones became a thing for cheap and had a lot of fun with it. I wonder if I still have it somewhere and whether it still works, I haven't seen it in ages though so probably not.
[+] serf|7 months ago|reply
small ad-hoc networks like that with IR and early bluetooth were a lot of fun.
[+] QuiCasseRien|7 months ago|reply
I love when people don't have to talk to explain how the hell they are expert in a domain.

This is a very good example, nice work !

[+] throawayonthe|7 months ago|reply
that's awesome, but i think since it's a business card the text on the back should be more legible (nicer font and/or bigger)
[+] stusmall|7 months ago|reply
Agreed. I'd never hire this embedded system engineer to do graphic design. /s
[+] gcapu|7 months ago|reply
Amazing project, but the font on the back of the card is gross.
[+] kuschkufan|7 months ago|reply
Impressive, very nice. Let's see Paul Allen's card!
[+] thrown-0825|7 months ago|reply
Awesome project, but why is this considered “ultrathin”?

I would think a business card that is as thick as a usbc port + pcb would be considered pretty thick.

[+] pornel|7 months ago|reply
The simple box-shaped container and low framerate/low gravity simulation doesn't show off what the FLIP algorithm can do.

The algorithm is a more expensive combination of two simulation methods to support both splashes and incompressibility, but the benefits are barely visible in the simple container.

[+] dmitrygr|7 months ago|reply
One note for the readers here: an electronic business card has a VERY LARGE effect on those you give it to. More than I expected when I made mine. It is surprisingly effective. Even if the BOM is $30, it'll pay for itself in the ease it adds to a job hunt easily