HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
I wired my tree with 500 LED lights and calculated their 3D coordinates.

Stand-up Maths · Youtube · 386 HN points · 2 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention Stand-up Maths's video "I wired my tree with 500 LED lights and calculated their 3D coordinates.".
Youtube Summary
If you support me on Patreon at any point in December 2020 I will film your name on my xmas tree while I give you a thumbs-up of appreciation. https://www.patreon.com/standupmaths

Huge thanks to Eugénie von Tunzelmann for helping me out with this video. You can see more of Eugénie in my "General Relativity: Top 05 Mishaps [inc INTERSTELLAR]" video. https://www.youtube.com/watch?v=Z4oy6mnkyW4

Thanks to Ben Sparks for helping out with the GeoGebra file. You can try an online version here: https://www.geogebra.org/m/p2pdz6v2

And of course thanks to Howard Carter for yet one more remix of the Stand-up Maths theme song. The main theme is on bandcamp: https://standupmaths.bandcamp.com/ If there is enough demand we'll make a Christmas album.

Here is my code on github (along with the 3D coordinates of all 500 LEDs on my tree). If you have a program you would like to see run on my tree, email me [email protected]
https://github.com/standupmaths/xmastree2020

My prototype LEDs were type WS2801 and wired to as Raspberry Pi Zero.

The WS2801 LEDs I used on Amazon. Other retailers are available.
https://www.amazon.co.uk/dp/B01MDJ3VBC/ref=sr_1_1?_encoding=UTF8&tag=stanupmath-21

I set-up the Pi to run 'headless' (no monitor or keyboard) largely using this guide:
https://www.tomshardware.com/uk/reviews/raspberry-pi-headless-setup-how-to,6028.html

I followed this guide to wire and program the WS2801 LEDs. If you use an off-the-shelf power supply you do not need to worry about the mains wiring (which you should not do unless you are qualified).
https://tutorials-raspberrypi.com/how-to-control-a-raspberry-pi-ws2801-rgb-led-strip/

Then I switched the WS2811 LEDs because I could buy 500 of them (they are also cheaper). I also switched to a Raspberry Pi 3 because my Pi Zero didn't have wifi.

The WS2811 LEDs I used on Amazon. Other retailers are available.
https://www.amazon.co.uk/dp/B0775CC559//ref=sr_1_1?_encoding=UTF8&tag=stanupmath-21
https://www.amazon.com/ALITOVE-Individually-Addressable-Advertising-Waterproof/dp/B0775CC559?_encoding=UTF8&tag=stanupmath-20

I wired up the WS2811 LEDs and coded them using this guide.
https://learn.adafruit.com/neopixels-on-raspberry-pi/raspberry-pi-wiring

CORRECTIONS:
- None yet. Let me know if you spot anything!

Thanks again, as always, for Jane Street being my principal sponsor.
https://www.janestreet.com/

Thanks to my Patreon supporters who funded those LEDs. If this video does well, I'll buy even more next year.
https://www.patreon.com/standupmaths

Filming and editing by Alex Genn-Bash and Matt Parker
Music by Howard Carter
Design by Simon Wright and Adam Robinson

MATT PARKER: Stand-up Mathematician
Website: http://standupmaths.com/
Maths book: http://wwwh.umble-pi.com
Nerdy maths toys: http://mathsgear.co.uk/
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
I really hope that you also do cool things like this one [1] with your Christmas lights

1. https://m.youtube.com/watch?v=TvlpIojusBE

Here's Matt Parker's video from last year: https://www.youtube.com/watch?v=TvlpIojusBE

And he ran a bunch of viewer-supplied programs on it: https://www.youtube.com/watch?v=v7eHTNm1YtU

anfractuosity
I thought that video was interesting, but a shame he didn't seem to go into how the 3D coords were obtained from what I recall.
AceJohnny2
He did explain how he got the 3D coords (in principle), 5 minutes in the original video.
Dec 24, 2020 · 386 points, 87 comments · submitted by liotier
jcims
I 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/

Here's the setup, actually seems like a pretty nice UX - https://www.youtube.com/watch?v=xMJ3bLBtGaQ

Edit: They sell them at BestBuy, brb lol

rbliss
I 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.

isoprophlex
Is 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?

jcims
Just 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.
BillinghamJ
We 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
netsharc
Smart home, eh... looking forward to the news that Russian hackers infiltrated some secure infrastructure through their IoT Christmas tree...
mhh__
> Christmas decorations had been left behind in the smart home thing

That's very true, but equally does it matter? Currently, these products are usually so un-seamless so setup and faff around with that I was seriously considering just making my own with some ESP32s I had lying around.

BillinghamJ
Doesn't need to be super clever etc for sure, but I'd certainly be happy if there could be a Philips Hue set. Or tbh even just something basic for turning them on/off would be at least slightly helpful
jsinai
It’s more than a bit creepy how Twinkly actively show locations of where setups have been mapped around the world, and even creepier that they show the time of the last device mapped. Sure it might be innocuous but are there other things that can be collected? If anyone has this, is it possible to opt out.
EugeneOZ
There's a lot of analogs. At least in Europe - €60 for 1200 LEDs (with the same mobile app).
detaro
hints for brand names etc?
wcarss
I'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.
jldugger
Nope, just conic sections. Like a proper mathematician.
ww520
Yeah, 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.
twic
1. rotating cube

2. chrome spheres on a checkerboard

3. Bad Apple

Sorry, those are the rules.

qwertox
In that case he might as well directly play Doom on his tree.
qndreoi
Tetris would be fun.
danesparza
Give him a week. He'll probably have it up and running.
ourcat
A 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=PL5vDt5AALl...

seph-reed
For 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.
rpearl
that's just dimming, not desaturation...
konjin
A 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
You might even encode the position in color, and do it in O(1)! Depending on the sensitivity of your camera, though :)
tux
Impressive and only in 102-lines of python code; https://github.com/standupmaths/xmastree2020/blob/main/xmasl...
ruph123
I love Matt‘s work so much. His channel has grown well beyond „one of them Numberphiler’s personal channel”. Great to see!
epaulson
Is 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
There 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
> 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.

timonoko
I 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.
yardstick
I wish the IPv6 Christmas tree was back! http://ipv6tree.bitnet.be/
notmine1337
> 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...
axegon_
Hah, 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.
VectorLock
I've been thinking of doing this so long and its amazing the convergent evolution happening here.

xlights.org seems like a fantastic project.

elliottkember
I 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.
jonplackett
Jesus 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

pwg
One solution to the number of ads is to simply download the video with youtube-dl (http://www.yt-dl.org/).

Copy out the HN youtube URL, run youtube-dl, giving it the URL, wait a minute or two, and you have a 24m37s video with zero commercials.

tsukurimashou
Ads on youtube are horrible, luckily you can still use unlock to bypass them
411111111111111
You 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?

wcarss
When YouTube added little banner ads, I didn't really mind. They had to make the service profitable, after all!

When YouTube first allowed creators to monetize their videos using ads, to support themselves, and youtube would pay them and also take a cut? I certainly didn't mind. It promoted good content, and they've got to make money after all!

When YouTube decided I could no longer turn off my phone's screen when I played a video, I began to mind. I thought it was a bug at first, but then I found out it was intentional. I guess they have to make sure we're looking when they play ads. Gotta make money after all.

When YouTube made their terms worse for creators multiple times, I read on with sadness, but it didn't really affect me, and they've gotta see revenue growth, or something.

When YouTube started actively screwing creators out of monetization for bizarre and arcane reasons, but would then still show ads on the de-monetized videos, and collect the full take? I felt miffed. They don't need the money that bad -- if it's demonetized, it shouldn't have ads. But what could we do? Stop watching?

When YouTube started aggressively nagging me to sign up for their paid service to "unlock" those old "features" like no ads and playing videos when my screen is off, I was pissed off. They really gotta make money like this? I still see these nags daily.

When YouTube recently decided that on all videos, even ones the creators have chosen specifically not to monetize (e.g. because they're intended as educational content), YouTube will force 10-15 seconds of unskippable ads for every 10 minutes of video, and then take all of that profit?

Fuck 'em. They don't need the money. YouTube is rotten to the core.

One of the richest corporations on the planet has forced these intrusive, shitty ads upon literally billions of people, degrading their hugely profitable service with no real alternatives, and you feel the need to defend YouTube here? You're "worried people have the nerve to complain"? You tell us, "you can all just pay up!"

What a sickening disgrace! Collaborators are tragically easy to find.

To quote Pratchett, "It was as if even the most intelligent person had this little blank spot in their heads where someone had written: "Kings. What a good idea." Whoever had created humanity had left in a major design flaw. It was its tendency to bend at the knees."

jfim
That's how one gets year over year ad revenue growth from an audience size that grows at a smaller rate. Expect the trend to continue.

They haven't started to monetize the Google assistant yet, at least from the consumer side. But even that mindset is starting to change, if you want to control your own thermostat using their APIs outside of the apps, well, it's a non refundable $5 charge [0].

[0] https://developers.google.com/nest/device-access/project

angry_octet
OMG we're trapped inside MATLAB!
jowsie
> (side from the sponsorship pitches that are so frequent nowadays)

SponsorBlock does a great job of removing those, too.

CraneWorm
A remarkable achievement, and it's crowdsourced too!
jonplackett
I didn't say I had something against ads. I don't expect something for nothing. But the ads are getting really out of hand recently. You used to get an ad at the start of a video, and not even every video. Now it's 2 before every video - and multiple ad breaks along the way. This is just a terrible experience and makes me hate using youtube.
phkahler
>> What makes you think you deserve free unlimited service?

What makes YouTube think they deserve free unlimited content, and unlimited ad revenue?

411111111111111
They don't, which is why a lot of the money for YouTube premium goes to the content creators videos you liked and watched. The only way that they don't get paid is if the premium user clicks dislike.

https://support.google.com/youtube/answer/6306276?hl=en

vlovich123
This 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-...

rrrrrrrrrrrryan
> 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.

vlovich123
Double negatives are hard :).

https://www.newyorker.com/magazine/1994/07/25/how-i-met-my-w...

mapt
Youtube reached market saturation a few years ago, and having accomplished this, began a ten year program to destroy itself by extracting profits at a market-competitive growth rate.

Backup whatever videos you enjoy now. It's going to get worse.

THE_PUN_STOPS
Being a resident of Georgia, (the US state) the constant stream of political ads convinced me to subscribe to YouTube premium a few months ago.
mhh__
They're actually illegal in the UK (although the web seems to be a huge grey area) - I can't imagine how fucked the country would be if we had those kinds of spending and broadcasting rules.
mapt
Speaking on behalf of US residents:

We can imagine it.

At this point the most successful grassroots political movement of the last several years acted on behalf of a dictatorial head of state and took guns into state capitols to explicitly threaten state-level politicians in order to convince them to give everybody a deadly virus. And is threatening to do the same to the national legislature in a couple weeks in order to convince them to create a new category of President For Life.

wussboy
I watch from Safari on an iPhone with an ad blocker and I rarely see ads
ben_bai
Browsing the Web w/o propper AdBlock/SocialBlock is a thing I don't understand. Also deleting Cookies everytime the browser closes is a must for me.

But yes i see what you mean when i watch yt on my mobile.

elisaado
Off topic but, on mobile I use Youtube vanced which is perfect. It blocks ads, allows for picture in picture, background play and a dark theme.
amiga-workbench
It recently got sponsorblock integration too, so you can cut out native advertising and repetitive intros/outros.
CraneWorm
You can use Firefox on mobile.
jonplackett
Yeah I was in the youtube app which seems to be even worse than desktop, I guess because they know they've got you!

And I refuse to pay youtube for that god damn subscription they pop up to me every 5 minutes - especially after they started removing basic features from the app (like background audio) just so they could charge for it. NO youtube. Just NO! The more you coerce me, the less chance I will ever do it.

AnyTimeTraveler
Not my project, but someone cool took the YouTube and removed all the ads and even added experimental sponsor skip:

It used to require rooting, but not anymore! It just requires microG if you want to login to your google account.

YouTube adVanced https://vancedapp.com/

realreality
All of this stuff will end up in the garbage, once the novelty wears off. But hey, 'tis the season for conspicuous consumption and waste!
asquabventured
If 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.
lambda_obrien
Or, he could have a healthy relationship with boundaries and mutual respect, where his wife understands the need for his own time to do what he enjoys.
simmjaso
Lmbo
tsjq
LMAO !
andy_ppp
I think the people responding to this mildly humerus comment literally... let me check... yup, Hacker News. Carry on.
gus_massa
This is his main job [1], so I guess he had no problems at home. 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
I 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
Horse: 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
100% 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?
dang
"Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize. Assume good faith."

https://news.ycombinator.com/newsguidelines.html

UncleOxidant
If that's the case why didn't he mention her help?
gus_massa
I'm not sure that she helps him, but looking at the sibling comment, it is not a bad guess.

I ask my wife a lot of questions, for example if I get stuck in a calculation or a result makes no sense. Sometimes about the redaction of a sentence. Sometimes just general questions over diner.

She ask me too. I remember that she was missing a transpose sign in his dissertation, and I found the error. It was a tiny fix, and no worth mentioning.

beeper-beeps
Parker definitely mentions her input and discussions they have about these topics in other videos and interviews.
forty
You might be seeing sexism where there is none. His wife (partner) might really be a man (I have no idea and don't really care) and it would not make any difference on OP's comment (I assume it can happen that one person in a couple has a very seemingly useless hobby which is so time consuming that it impacts their house keeping involvement, regardless of their genders).
gugagore
"wife" doesn't mean "partner", in case anyone else reading this thinks otherwise.

If you don't want to assume a man is heterosexual, don't assume he has a wife.

forty
Yes, i guess "wife" assumes he has a partner, that this partner is a woman, and probably that they are married too. I don't think any of this really matters here, I think the joke can be understood even if none of those assumptions are true :)
forty
Also, if we are nitpicking, I'll add that the gender of the person you are married with is only loosely related to your sexual preference (ie there might be homosexual men that are married to a woman for some reasons - cultural or legal for example, depending on the country you live in) ;)
gugagore
You're not wrong that all words about human identity and behavior and politics have fuzzy (or really no) boundaries. But this is not a nitpick you can apply to my statement. I'm not saying to assume people's sexuality from their gender and the gender of their partner.

If your stance is that it's not necessarily sexist, which honestly I respect in part, it's nonsense to argue that the comment may not be sexist, because "wife" may mean "husband". It's not a competition to see who can make the fewest assumptions.

forty
I did not mean that wife means husband in general, but I meant that it may not have been used here to specifically point out the gender of the partner but more generically (as it's common for to assume opposite gender for the partner even without malice)
gugagore
Do you not see how the two go hand-in-hand, your "gay man married to a woman because it's illegal to be gay in his country" and "it's common to assume opposite gender"?

I don't know what malice means to you, but I can tell you on my behalf and on behalf of many queer people (I won't claim to speak for all, but I know I speak for many), you should not assume the opposite gender for the partner, and it is unnecessary to defend someone who makes the mistake. Ultimately, it _is_ a factual error, and it is invalidating.

forty
What I meant by malice is someone whose point would be "it's abnormal to be married to someone of the same gender" vs someone assuming the most common case without holding any judgement on whether it's normal or good, and without the intent of hurting anyone (I do understand that it can still hurt/vex some people, as anything else you can say with the best intent, but I still think intent does count)
gugagore
I agree intent counts. You start by saying "You might be seeing sexism where there is none.". To me, our comments are summarized with:

You: "it might not be sexism because people often assume heterosexuality, but the statement could apply to a partner of any gender"

Me: "well then that's heterosexist"

You: People can make the heterosexual assumption without bad intentions, so it's not heterosexist either"

And that is true only for a narrow definition of sexism and heterosexism. Do you want to give a different name to the assumption that people are straight? Do you want to give a different name to the assumption that someone's wife isn't on board with his technical pursuits? I already have a name for those patterns, heterosexism and sexism, and I can grasp the nuances and subtleties of different forms. What is YOUR intent? To reserve those words for cases where there is ill intent?

forty
Ah I had never heard "heterosexism", I learned a new word. I just checked a bunch of definitions, and I would now use "heterocentrism" for presumption of heterosexuallity - it's possible to presume that without thinking it's the norm, but just because in practice in many places it's more common. Just like when I hear someone named Daniel(le) I assume it's a man because I know more man Daniel than woman, but I do not think there is anything wrong or abnormal with a woman named that way. So yes I would kind of reserve sexism (or heterosexism now) for cases when the remark carries some negativity related to a given gender (or sexual orientation). And I still stick with my original impression that OP did not carry any negativity towards women (at least we can fairly give them "reasonable doubt"), but that they were just making a joke about living with someone else in general.

Sorry for the long thread and I hope I have not offended you. I'm always interested in having other points of views so I like this kind of discussion. Also English is not my native language, so there might have been things lost in translation.

kergonath
She is a Physics professor at UCL, and works on solar Physics: https://en.m.wikipedia.org/wiki/Lucie_Green

She is also quite nerdy.

amelius
How about some AI/ML, so lights go on if you make a gesture, or if a person walks past the tree.
Scoundreller
You want a Christmas tree version of xeyes?
amelius
Yes, but xload would also be cool (even if much simpler to implement).
jve
Why some catchy name like AI for this? Connect some sensors that measure distance from object and use them.
lights0123
Hah! Right as I wrote this: https://led3dmap.lights0123.com/
crtasm
Nice! I was momentarily confused by:

> Fully client-side: your video is never uploaded ... > Now, upload your video.

cbhl
If 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
Yes, 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.
gus_massa
Have you posted this in HN? It could be a nice submission. (It would be nice to see also the original video.)
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.