19 ms·
I wired a Christmas tree with 500 LED lights and calculated their 3D coordinates
- wcarss 6y agoI'll watch the whole video later (as standup maths is generally quite good!) but in quite a lot of skipping around just now, I'm a bit shocked not to have seen a rotating cube drawn on the surface of the tree. That's the one thing I was specifically expecting for some reason.
- qwertox 6y agoIn that case he might as well directly play Doom on his tree.
- danesparza 6y agoGive him a week. He'll probably have it up and running.
- qndreoi 6y agoTetris would be fun.
- ww520 6y agoYeah, shouldn’t be too difficult. I would imagine running a signed distance function between the light positions and the 3d cube model could do the job.
- jldugger 6y agoNope, just conic sections. Like a proper mathematician.
- twic 6y ago1. rotating cube 2. chrome spheres on a checkerboard 3. Bad Apple Sorry, those are the rules.
- asquabventured 6y agoIf you close your eyes just right you can almost imagine all the shit his wife gives him for all the time he spends on his useless hobby instead of helping out around the house.
- tsjq 6y agoLMAO !
- simmjaso 6y agoLmbo
- gus_massa 6y agoThis is his main job [1], so I guess he had no problems at home. https://en.wikipedia.org/wiki/Matt_Parker https://en.wikipedia.org/wiki/Matt_Parker Also, his wife has a technical background and have some similar activities (but not full time, IIUC), so she probably even helped. [1] Or at least this is the kind of potentially viral videos that can increase his internet presence and his revenue in the live talks and shows.
- 542458 6y agoI feel that OP’s idea that Parker’s wife wouldn’t be on board with “nerdy/tech-y stuff” smacks of sexism to me. No reason she couldn’t be an equal partner in this, or at least a non-detractor.
- pc86 6y agoHorse: He made a joke. Zebra: He's a sexist pig who can't fathom the idea of a technical woman working on something with her technical husband.
- DWakefield 6y ago100% agree. I did a very similar project this year - at my wife's insistence. Guess who's done most of the programming now that I've got the techy hardware side done?
- jcims 6y agoI love when folks combine technologies in a new domain and get neat results. This is a great little demo and probably a cool way to force yourself to learn the related technologies. My first thought was that this could be pretty easily commercialized, which meant someone has probably already done it: https://www.twinkly.com/ https://www.twinkly.com/ Here's the setup, actually seems like a pretty nice UX - https://www.youtube.com/watch?v=xMJ3bLBtGaQ https://www.youtube.com/watch?v=xMJ3bLBtGaQ Edit: They sell them at BestBuy, brb lol
- rbliss 6y agoI picked up a set of Twinkly lights this year and liked them so much I got a few more sets to give as gifts. The API appears to be local network accessible and there are a couple libraries written in python and node for playing around with them. The mobile app is decent, with a few bugs, but it does include a cool mapping feature to map the layout of lights so the effects work correctly. Definitely would recommend checking them out.
- jcims 6y agoJust got back and set them up. It's not cheap but it's a lot of fun!! My daughter now has a rainbow Christmas tree.
- isoprophlex 6y agoIs the 3D mapping that the app gives you available in the python libs? Eg. can you put the lights into a tree, get the coordinates with the app, and then continue hacking around with those libraries?
- BillinghamJ 6y agoWe have these on our office tree - bought them from John Lewis in the UK. Was very happy to find something like that as I felt Christmas decorations had been left behind in the smart home thing a bit
- mhh__ 6y ago
- axegon_ 6y agoHah, 16:13 funny thing this world... Not that long ago I was at a job interview where they asked me to write a function that checks for a winner for 4-in-a-row. I gave a solution which used pretty much the exact same algorithm except in a 2-dimensional space. What was really cool imo that the solution fits in ~11-12 lines of python, even without using creature comforts like numpy.
- lights0123 6y agoHah! Right as I wrote this: https://led3dmap.lights0123.com/ https://led3dmap.lights0123.com/
- gus_massa 6y agoHave you posted this in HN? It could be a nice submission. (It would be nice to see also the original video.)
- cbhl 6y agoIf you do two views 90 degrees apart, that limits your FOV to one side of the tree, right? (You can't see the back side?)
- lights0123 6y agoYes, but for my use case that wasn't a problem (the tree was see-through enough). For the few pixels that weren't visible to one or both angles, it automatically guesses its position based on the pixels before and after it.
- crtasm 6y agoNice! I was momentarily confused by: > Fully client-side: your video is never uploaded ... > Now, upload your video.
- amelius 6y agoHow about some AI/ML, so lights go on if you make a gesture, or if a person walks past the tree.
- Scoundreller 6y agoYou want a Christmas tree version of xeyes?
- amelius 6y agoYes, but xload would also be cool (even if much simpler to implement).
- jve 6y agoWhy some catchy name like AI for this? Connect some sensors that measure distance from object and use them.
- ourcat 6y agoA similar project was done here by someone who used an ESP32-CAM module to detect the location of each pixel. https://www.youtube.com/watch?v=Ueim2Ko8VWo&list=PL5vDt5AALlRddFW54YkTip0i4916RfZLu&index=1 https://www.youtube.com/watch?v=Ueim2Ko8VWo&list=PL5vDt5AALl...
- realreality 6y agoAll of this stuff will end up in the garbage, once the novelty wears off. But hey, 'tis the season for conspicuous consumption and waste!
- jonplackett 6y agoJesus Christ YouTube has a lot of ads now. I had to watch 2 before I started and then there were 3 more adbreaks. In a 20 minute video! I may as well go watch TV Also - cool project
- tsukurimashou 6y agoAds on youtube are horrible, luckily you can still use unlock to bypass them
- 411111111111111 6y agoYou can also just pay YouTube for unlimited ad-less videos (side from the sponsorship pitches that are so frequent nowadays) It's honestly a little worrying that people have the nerve to complain about ads if they can remove them entirely just by paying the fee. What makes you think you deserve free unlimited service?
- vlovich123 6y agoThis is always a frequent refrain but then you have to be actively ignoring the lessons of previous technological changes. TV was ad free. Then ads started appearing. Then you paid for cable to get rid of ads. Then ads started appearing there too. Advertising is a corrosive industry. I personally find it unlikely that YouTube Red will inevitably have the same fate. Hell, Netflix has experimented with ways to try to do that and eventually some experiment will succeed (they already do that to some extent by hiding it in their recommendation engine). [1] https://thenextweb.com/google/2017/09/18/google-youtube-red-ads/ https://thenextweb.com/google/2017/09/18/google-youtube-red-...
- rrrrrrrrrrrryan 6y ago> I personally find it unlikely that YouTube Red will inevitably have the same fate. Do you mean "won't"? Unrelated: I believe Netflix already makes some money from product placements in its "Netflix original" content.
- elliottkember 6y agoI do a lot of LEDs so this was fun to see. My plan is to use ARKit to calculate positions, which should save a lot of the time otherwise spent rotating the display. More or less the same approach as this, just finding the brightest (or greenest) point in the point cloud.
- seph-reed 6y agoFor anyone getting into LED stuff without much design background, I can not recommend this enough: desaturate your colors. pixel_RGB[i] = Math.max(90, pixel_RGB[i]) It will make an absolute world of difference in the aesthetic, and it's one line of code.
- deleted 6y ago[deleted]
- epaulson 6y agoIs there a good source of long strings of addressable lights that doesn't involve any soldering or cutting up wires to get the power right? I have bad luck with actual hardware projects and they usually end with the magic smoke escaping, so I'm really looking for something I can plug into a working power supply that's included in the box and can talk to over like a serial port or something else that I can just plug into a USB port.
- brk 6y agoThere are several options, search for "WS2811 LED String" for starters. I have used the same string (more or less) that OP shows in the video with ESP32's and/or Pixelblaze controllers for various projects.
- xnyan 6y ago> that doesn't involve any soldering You do you, but if I may suggest that if electronics projects interest you at all, it’s worth a little bit of time to learn some basic soldering skills. Not only will it give you a lot of flexibility, even just a little investment of time in learning basic soldering techniques will almost certainly save you time in the long run.
- tux 6y agoImpressive and only in 102-lines of python code; https://github.com/standupmaths/xmastree2020/blob/main/xmaslights-spin.py https://github.com/standupmaths/xmastree2020/blob/main/xmasl...
- konjin 6y agoA rather simple improvement would be to have all the lights flash their binary encoded position for the calibration step. You go down from calibration time O(n) to O(ln(n)). Using red/blue would be better than using on off for this since you can get a more accurate position read by averaging ln(n) shots for the location of a light. I believe something similar is used by some projection mapping software.
- fortzi 6y agoYou might even encode the position in color, and do it in O(1)! Depending on the sensitivity of your camera, though :)
- VectorLock 6y agoI've been thinking of doing this so long and its amazing the convergent evolution happening here. xlights.org seems like a fantastic project.
- yardstick 6y agoI wish the IPv6 Christmas tree was back! http://ipv6tree.bitnet.be/ http://ipv6tree.bitnet.be/
- notmine1337 6y ago> We were happily processing 96Mpps earlier today... Then suddenly we got a call from our uplink provider... They were actually amused to see 180Gbit/s of ICMPv6 traffic... They were not so pleased however with the saturated backbone links in 3 European countries...
- ruph123 6y agoI love Matt‘s work so much. His channel has grown well beyond „one of them Numberphiler’s personal channel”. Great to see!
- timonoko 6y agoI hereby predict "LED-paint". It is a mixture of luminescent particles, semi-conducting liquid and maybe some measure of resonating metal particles. You paint the wall with this paint and then let a computer and a camera learn how to make lights blink by generating suitable wave patterns and frequencies. There after you can show whatever you want on the wall.