Show HN: A working 3D model of an Enigma machine
enigma.designI watched the excellent Veritasium video [1] on the Enigma machine, and watched the full animation by Jared Owen [2], but was still a bit confused on how the inner mechanics of an Enigma machine work. I used Astra to build out the inner components through a combination of reference images, writing out hundreds of extremely detailed prompts, and building my own inspection tools to ensure that every part is sized and positioned in a historically accurate way.
It's still a work in progress, but would love any feedback on the experience so far!
1. https://www.youtube.com/watch?v=JsBZOcqZerk
2. https://www.youtube.com/watch?v=ybkkiGtJmkM
Good job, I like the many cutaways to show exactly what's going on inside.
You may be interested in my simulation of Enigma (https://enigma.virtualcolossus.co.uk) which I wrote back in 2021 (pre-AI!). One of several I've done.
Try it on an Android phone to look around it in VR or on PC/Mac for easier use. You can even send messages to other users over the internet using the radio & Morse key.
Yours is amazing work, and certainly a higher degree of fidelity than I was able to achieve with AI assistance. The initial motivation behind this was largely driven by curiosity around the rotor motion (the ratchet and pawl assembly), and then into how the wiring actually works. For my brain, I needed to press the keys a hundred times and watch the current flow before it started making sense.
I'm curious about how you worked out the inner dimensions and part placements so accurately. Thank you for providing this marvelous free resource!
Maybe of interest https://observablehq.com/@tmcw/enigma-machine
Thank you for the link! I love Observable notebooks.
I love the presentation! Would you mind sharing the source code?
Thank you for the kind words! As mentioned in the other comment below, I'll open-source it very soon and update the site with a GitHub link.
Really cool project! The only thing I noticed is that the performance feels a bit slow at times, and it could use a little more fluidity, especially when interacting with the model.
Other than that, everything feels really well done. Building something like this in JavaScript/HTML, especially with a 3D model this detailed, must be quite challenging from an optimization standpoint.
Great work!
Thank you!! I was also hitting performance issues, especially on mobile - I think the latest version has gotten it a bit closer to a smoother experience, but there is still a lot of low-hanging fruit on making this more fluid (especially the step transitions).
Cool work. There are some of this educational gems here. Is there a site which combines these treasures (like in a virtual museum?)
Thank you! Very honored to be considered an educational gem :)
Neat, would be great to have it in WebXR with hand tracking, imagining 2 modes :
- AR where the machine can be put on your desk, next to documents
- VR where the machine is in context, e.g. a 3D model of German Naval Signals HQ in Guernsey, eventually stepping back to a broader context.
This is such a great idea. I didn't know about WebXR before reading your comment, and was delighted to see that this is a relatively easy thing to implement. I need to find some VR goggles to borrow so I can test this out, but I'll optimistically push out an update within the next day with the WebXR update.
It would be nice to be able to back up in the sequence. There were a few times where I realized I had not fully understood a previous step and would have like to be able to review some previous steps.
Otherwise this is completely excellent!
Thank you for the suggestion and the kind words! Completely agree that the navigation is a bit unintuitive, will work on fixing that tonight :)
This is really cool. The attention to detail on the internal mechanics is impressive, especially the inspection tools you built. Looking forward to seeing where you take it!
Thank you! My dream is to have a working Bombe [1] which can decrypt the Enigma traffic in your browser.
Inspection tools ensure historical accuracy; great effort!
Thank you!!
Seems pretty cool but unfortunately the poor performance on mobile (Chrome 154 and Android 17) makes it unusable for me. I'll have to check it out on desktop.
Thank you for the tip about mobile performance, my apologies for neglecting it and I'm working on fixing it right now!
No need to apologize. Hit me up when you work out the kinks and I'll give it a go again.
I revamped the mobile experience last night, let me know what you think!
Hmm. It may be slightly better but I'm still getting a very stuttery framerate and slow response time. Could just be me. I'm on a Pixel 11 Pro though so it's not like I'm on an ancient device or anything.
Tested and fine on 6th gen iPad Mini, if anyone is interested.
The coolest and pre-slop simulator is here:
https://www.ciphermachinesandcryptology.com/en/enigmasim.htm
A pity that our governments allow such cool tech to be stolen.
Super cool!
good jobs!