HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
My curved basketball hoop always goes in

Stuff Made Here · Youtube · 973 HN points · 0 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention Stuff Made Here's video "My curved basketball hoop always goes in".
Youtube Summary
Support these projects on patreon:
Check out the subreddit:

I've wondered if it is possible to make a basketball hoop where the ball always goes in. Imagine throwing a ball and if it hits the backboard it somehow gets directed into the hoop. Thanks to physics it isn't quite possible to make ALL possible shots go in though you can make a hoop where the ball goes in a lot more often. In this video I show how I wrote a program to calculate the optical backboard then machined and fabricated it. It worked out better than I was expected so I'm really happy with it!

These videos usually take 100+ hours of work and a lot of money in tools and materials. I've made a patreon if you're interested in supporting the creation of these projects:

The basketball hoop that donated it's guts:
I use a 13" iPad for all my technical drawing:

Books that I've read to learn many of the skills used in this project:
Real time collision detection:
Introduction to algorithims:
Planning algorithims:
Computational geometry:

Other tools and things that I think are great:
Wera allen keys 1000x better than el cheapos:
Wera allen keys (english):
The best marker ever. Marks everything. Always in my pocket:
Import spot welder. Cheap bulletproof:
Rivnuts + tool:
Digital angle gauge:
Bench sheet metal brake:
Vise brake (highly recommend):
20 ton press brake:
Cordless angle grinder - this thing will change your life:
Dropped off ladder 20x and still going strong:
Hypertherm powermax 45xp with machine torch:
Hypertherm fine cut consumables (great for sheet metal)
HN Theater Rankings
  • Ranked #18 all time · view

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
Apr 18, 2020 · 2 points, 1 comments · submitted by echelon

940+ points

Apr 17, 2020 · 971 points, 162 comments · submitted by swighton
Really impressed with the use of Monte Carlo method. A while back I ran into some resistance trying to advocate simpler statistical methods to solve a problem domain similar to this, while the team in question repeatedly wanted to reach for a machine learning solution. I'd love to know if I was wrong here. In my mind, when an algorithmic or heuristic path to a solution is available, we should attempt it first before reaching for ML.
The first arduous task of a ML solution is to get on parity with computing basic statistics on the data coming in, and there are many fail points before and after that point. Saying 'we need a ML solution' is a lot like saying 'we need to write this in assembly'
He wants a ML project on his résumé.

Try writing a simple calculator app with ML and you won't even have marked up enough training data by the time I have written it algorithmically. When it's finished, the ML one won't be as reliable.

I've been involved in a few projects where ML was a candidate approach. Mostly the answer was just to write down what we already know about the problem domain instead.

A common trap in tech is to reach for the fanciest tool instead of the simplest. The best engineering often comes from mastery of the simple tools, and the most beautiful engineering is the one that makes you say 'that's so obvious, why didn't anyone ever come up with that before?'
Another common trap is to believe a widely known simple method must be better just because you are unfamiliar with state of the art research.

Many times people have specifically researched why a certain method is better than status quo in practice, on real world data with real world operating constraints.

A good example is the paper “Let’s Put the Garbage-Can Regressions and Garbage-Can Probits Where They Belong” - explain an extremely common and hugely severe problem with “garbage can” regression models.

One of my favorite software solutions that I came up with was “human learning” powered. A few years ago I was working as the engineering manager at a small company. I had 8 other people who I was in charge of and we had moved to a new office in the middle of this. Our team took up two rooms in the office and I had to figure out who would be sitting where. I had some preconceived notions of who would be productive together, who would annoy each other, etc., but there were enough possible combinations to make this a large enough search space.

So I wrote a very simple python script that would randomly generate layouts of who would sit in each room and next to whom. Every time it gave me a result I scanned it for conditions that would make it not work and add a rule to skip such configurations. After about six such edits I got a layout I thought was acceptable. The team as far as I know was happy and nobody questioned it for the entire time we were there. This saved me time because I didn’t have to pre-program all the conditions, only add ones I had already seen not work. Saved both CPU and brain cycles, so to speak.

There's a great talk from StrangeLoop[0] where a presenter uses Alloy modelling in exactly the same manner:

- generate a couple examples

- see something wrong

- add a rule

- repeat


Is this how sports schedules, NFL, NBA, etc are made?
This is a pretty cool video about a couple that made the MLB schedule for years
They are heavily based on divisions and recent seasons.

(For example, in the NFL, the teams in each division play each other twice, and then get the rest of their games by rotating through teams from the rest of the league)

This is great! In a way it's like the output was a question rather than an answer.

This is quite similar to education research on Teachable Agents [1], which is an embodiment of the idea that to know something you must be able to teach it to someone else. In Teachable Agents you teach the computer rules (e.g. how ecosystems work), and then it gets a quiz where it compares the output to the right answer. When its wrong, you as the teacher must figure out whether the rules you taught it were correct and/or if it needs more rules.

Teachable Agents works for things where there's a right or wrong answer, because the computer is doing the test proctoring. But in your method the human is doing that, and I think it works quite well for things of a more qualitative nature like the arts, with the human playing the role of the critic or curator.


That is super cool, thank you!
Did other people also wonder what a French cleat might be? It is a molding with a 30–45 degree slope used to hang cabinets or other objects.


I probably wouldn't have known if I hadn't wandered into woodworking YouTube - it's a common device for workshop walls, etc., for easily switchable configurations of shelves and whatnots[1].

[1] e.g.

We used them a lot when hanging up art work.
Yeah it sounds a lot like a picture rail[0], the main difference is that the picture rail runs around the whole wall while this is more specific.


I put up a giant wall of these in my home and they're incredibly useful. You can build any type of contraption and throw a cleat on the back of it and boom, just put it on the big wall. Reconfigure it every month, build new things to mount up there, it truly is simple and versatile. French cleats truly are terrific.
I like the idea. It's a bit invasive, but if you don't mind would you share a photo of what this wall looks like?
Someone else below has shared a video on the same kind of thing you might be interested in:
I love this! I was expecting something more like Mark Rober's movign dartboard [0], which is super cool, but this is even more interesting, because of the way you used software to come up with a general solution in advance.


your [0] link is missing

edit: pasted the first yt result here:

Mark Rober is an interesting character. It feels like he pitches himself as a crazy inventor guy but it seems like he’s more akin to the head of a design laboratory that employs many other talented people.

It’s not like he doesn’t acknowledge the other crazy-inventor people he commissions though, and I certainly don’t mean to paint him as a fraud.

When he says things like, 1m45s into a video on a steerable bowling ball “in the spirit of full disclosure this is all down to [named co-collaborator]’s work” it feels like that use of full disclosure in the sense of I would rather not reveal this but I am legally obliged to.

No offense to Rober or that particular collaborator. For all I know, he just didn’t want the publicity. Rober is very good and it’s almost like I feel aggrieved that if only his style was ever so slightly different he’d win my complete instead of partial admiration.

I don't admire him precisely because his videos are not about him. His videos are always about someone else and that's why he isn't worth admiring.
That was a pretty cool video! I loved how he used 3D Monte-Carlo and side-stepped all the complicated math. I wonder if he was using a Physics engine like Bullet or ODE to calculate the simulated trajectories. Also, a good intermediate step might've been to build the backboard in something like Unity and shoot some hoops to catch the radius error before actually machining it out.
He scrolled over the code pretty quickly, but it looks like python + numpy, didn't see any references to other major tools (could've easily missed them though).
> complicated math

Is it though? Isn't the final shape just a paraboloid, like a parabolic antenna with the hoop in the focal point?

The video justifies that it isn't: that paraboloids work to focus straight lines but not parabolic basketball trajectories.
It's optimizing for an average of shots from more or less arbitrary locations, so it's not necessarily a perfect parabaloid.
The average of paraboloids is more or less a paraboloid too
> Physics engine like Bullet or ODE to calculate the simulated trajectories

Probably not, the trajectories are simple parabolic and you can assume perfect elastic collision. Easy enough to implement, compared to interfacing with a physics engine. In fact, it sounded like he approximated the ball by a point and ignored the radius.

While interfacing a physics engine is hard, I feel like it would be hard to forget to add the radius in a physics simulation, making mistakes like this rather difficult.

So yeah, you can reinvent the wheel but using specialized tools gets the job done too, usually with less painful mistakes, but that's the price to pay for the lack of learning you get with the tool.

Would a physics engine actually make it any easier to solve this inverse problem? Simulating where the ball ends up relative to the hoop after bouncing off the board is the kind of forward problem that I tend to think of physics engines as designed for, but the problem here is to (repeatedly) determine what angle of board would yield the desired post-bounce trajectory. Does something like Bullet have a flexible enough inverse kinematics solver to handle this kind of problem?
I'm guessing a brute force approach wouldn't take that long for this problem
You could definitely improve / take advantage of rim interactions, for instance, and more easily not have the problem he has with the lower corners.
There are obvious ways that the physics engine might be able to capture more effects than a simple analytic solution of parabolic trajectories. But if it only lets you run the simulation forward to get a trajectory from initial conditions, then you now have a numeric optimization problem as the body of the inner loop of another optimization problem.

If the physics engine can't efficiently solve the inverse problem here, it is probably only well-suited for simulating a final solution for validation, not iterating over the rather large space of possible shot trajectories times possible backboard angles at the point of impact.

> you now have a numeric optimization problem as the body of the inner loop of another optimization problem

Isn't solving the physics problem a straightforward ODE integration?

It's a straightforward integration to get from initial conditions of the ball throw and backboard angle to the post-bounce trajectory. Physics engines like Bullet will get you that solution very quickly. But determining which backboard angle puts the ball in the center of the hoop is not as straightforward if your physics engine is only designed to do numeric integration of the equations of motion to move a simulation forward in time. You have to run the simulation a few hundred times with different backboard angles to determine which setup puts the ball where you want it.

And that process needs to be done for all possible incoming ball trajectories that would hit that point of the backboard in order to figure out what backboard angle will maximize the number of shots that go in.

Very out of left field, but how does one start doing these kind of things?

My background is in CS and math, and I could have come up with and built everything up to exporting the mesh into triangles, but would have needed months of google searching and trial and error to do the actual "machining" part of things.

And then even if I went through the painful process of learning it on the job for this task, the learned skills would probably not transfer very well into the next adventure. Additionally, I imagine the machine used in the video is fairly expensive and not worth purchasing for one experiment.

I'm asking this because I find these kind of builds fascinating, but I'm always humbled about my skills when I think about the transition from digital to material.

YouTube videos are one of the best ways to learn mechanical/material skills. Just start. You'll suck at first. Keep at it and eventually you'll suck a little less. One day you'll be mediocre. And if you keep at it you'll be skilled.
Can confirm. For general knowledge I recommend two fantastic channels: (1) Click Spring (2) Matthias Wandel. They're always doing interesting things and usually some technique comes up in the videos that I didn't know of. There are probably countless others.

Youtube really shines in this because there is much to see happening. Much of the information is visual and mechanical on how to do things well (or at all).

You generally need lots of tools to build stuff though (you can sometimes trade time for tool cost), but these days finding an equivalent to a maker space or hacker space shouldn't be too difficult.

* ClickSpring's clock series is one of my favorite video series ever.

Wandel is a little unconventional that he builds many of his own tools, but I find he's quite practical and insightful in doing things.

This appears to be a massively underrated YouTube channel. I love it when I find one of these.

I've also never seen someone cut wood on their Tormach CNC. Seems to work well!

A non-US perspective: it's quite weird hearing someone younger than about 50-60yo use inches as a measurement. Especially for something scientific.
Do you mean the reference to four-by-two timber. It’s not really measurement when it’s a standard size like that. More like a well known discrete unit like a pint of beer or a 54” pizza.
No. When he measures the ball to move the hoop
Oh right. With a precision caliper no less. Another video posted here the other day used the word thou (as in thousandth of an inch) which is a word I haven’t heard in a long time!
Its frustrating. I'm a Canadian born and raised engineer/scientist working at a US-based medical device startup and I'm constantly converting between thou and microns and mm. Often stuff will be "in spec" for both, ex. 0.002" = 50um (assuming some tolerances for the part. Hopefully, we don't destroy any satellites by mixing the units up.
Aside from the Apollo 13 in Real Time website, this is the coolest thing I've seen on the internet in the last 3 months.

Sent this to my brother, which of course precipitated a huge sibling argument about which player would've benefited more from this assuming we're talking about players that tend to shoot jump shots. I'll let you guys know who wins.

Edit: We mostly disagree on the type of shot that certain players make and which would be more advantageous here. And credit to the creator, he alludes to this early in the video where he talks about "line drive" vs "arc" shots.

OMG just found out about this -
I want before/after shot %. Also someone should totally sell these. We already have short hero hoops, with this hoop we could all be Kobe every day, circus shots in the general direction, 55% fg%, legendary!
I wonder if Greg Egan reads HN or whether he learnt about this in some other way, but this was his analysis of the same problem from five hours ago:

He credits the video as his inspiration in his 2/2 tweet.
Ok, I can't read. My excuse is it was late and I was going to bed :)
I mean, is it really Monte Carlo? He's iteratively trying to optimize a function which makes this more like SGD, no?
It definitely felt that way to me.

When he was finding the optimal angle for a single sampled shot, that's the partial derivative of his probability of making the basket for that shot wrt the surface normal at the backboard hit position (or something like that).

If you average all of those you get a gradient descent update.

To say I’m impressed by the video and more specifically the algorithm would be the understatement of the century. This is amazing. Please let me buy one :)
Next level: a camera and a couple of motors to see the speed/location of the ball and adjust the backboard accordingly.
Really liked his static approach vs. Mark Rober's robotic dartboard.
Like this perhaps?
Any physics experts know what the actual optimal shape is? I imagine it would be a pretty gnarly problem to work out.
I do not think you can make definite claims about optimality without putting it in the context of some probability distribution over all possible incoming trajectories etc.
Well, IIRC, theatrical lights use parabolic reflectors to focus a non-point source into a point on a lens, so that might be a good place to start.
Light and sound gets to ignore gravity.
Haha well light can, if far enough away from a black hole!
I was wondering how you could get an analytical solution, but I think you’d have to define the problem much more rigorously to do so. As he mentions in the video, different basketball paths can contact the same point on the backboard from any number of angles, so it seems fairly clear that there is no perfect solution.
If you fix the position of the 'thrower' and just throw them at ridiculous speeds so gravity doesn't matter you'd end up with a hyperbolic backboard.

So annoyingly for an 'optimal' solution you'd need to specify where people can throw from and how fast. Frankly you might as well just use a hyperbola with one foci on the hoop and the other on the middle of the court, or maybe a point slightly higher than the court itself as the balls will be coming in at a lower angle (or maybe even a downwards angle?).

Don't forget about spin as well, which can significantly change the trajectory due to the Magnus effect
Better to account for gravity first, no?
I would guess that if there is enough spin for the Magnus effect to be significant, it would also be significant with respect to the rebound, as the surfaces in contact are not frictionless. On the other hand, I am not sure there is much spin in most basketball shots, and, given a backboard designed without taking it into consideration, there would be no incentive to add spin.
Backspin is an essential part of a reliable jump shot, and topspin is employed on finger roll layups close to the rim.
Wouldn't you rather want an ellipsoid with the thrower at one focus and the hoop at the other?
I may have gotten things the wrong way around. You definitely want whatever conic has the foci in the right spots.
Indeed, the hyperbola focuses parallel (to the axis) throws into the focal point, while the ellipsis focuses rays from one focal point to the other.
Red Auerbach knew something in real life. If you bend the whole rim downward, even a little bit, it becomes a “sewer,” pro just-miss shots start going in. He would check the baskets, before each game, to make sure this wasn’t being used against the Celtics.
Absolutely brilliant. The plot twist requiring the additional metal bracket at the end was fantastic.

To err is human. To own it on YouTube, divine.

Does it bug anyone else not to have the analytic solution?
I commented something similar on the video, but I realized you would have to define the problem much more rigorously to get an analytical solution. The ball can hit a point from many angles, so doesn’t that mean there can’t be a perfect solution? If you define the problem with precise constraints that roughly match the paths that will tend to occur from real people shooting baskets, and ignore variables like ball spin that probably don’t matter much in practice, I would imagine there would be an analytical solution.
I don’t blame anyone for opting for the numerical solution, but yes: a solution by analysis would be impressive.

Perhaps it could be done with the parabolic antenna solution with a frame of reference change, to account for the acceleration due to gravity?

My intuition suggests that you can't do better than simply angling towards the hoop for an average shot. The author simulated shots from tons of different angles and speeds, but I'd bet the shape is actually the same if you just assumed it was always coming from the center, at an average speed, at an average arc, aimed at different points of the board. So just shape it to make the average shot aimed at each points go in and you're probably at the same level of efficacy.

Similar to how the MLE of a gaussian curve is just... the mean. Could be wrong! Though fwiw I don't think the video actually shows him shooting from a variety of angles, and I don't think the board would actually work that well if he wasn't centered. Could be wrong again!

Fun story. I was in college taking differential equations. And I was faithfully attempting to apply what I'd learned in class, and having a somewhat hard time at it (this was before I realized how useful matlab was). When I was doing some research on the side, and I learned that the vast majority of differential equations are unsolvable, you can only approximate an answer. After that, I was thouroughly annoyed at wasting time in a class doing all this math by hand, and having to assume the answer was of a form that was solvable (and, yes, many useful engineering diff eq are of a solvable form).

So, now to answer your question. I thought this backboard seemed like a problem that dish makers should be able to trivially solve, but getting to know the math, and modifying it enough to solve this particular problem can take more time than setting up a simple probabilistic simulation. And after my experience with diffeq, I'm happy with a quick and dirty approximate solution, and then moving on with your life. Then maybe you run into someone who knows the math and is motivated enough to apply it, and maybe you update your project then.

This should be solvable without differential equations, since it is basically a parabolic antenna with an off-axis feed.
No it’s not. Parabolic antennas work well for a single particular parallel input beam. That’s why they’re on gimbals, and directed at the anticipated direction, or scanned back and forth. Here, he is attempting to image many different parabolic paths onto a small circle in the plane of the rim.
Sorry, I didn't mean to imply it required diff eq to solve these parabolic equations. I merely meant to give an anecdote about one of the first times I felt truly betrayed by mathematics. A subject I'd previously held in the highest regard.
Thanks for a great anecdote. While I feel I'm pretty good at recognising that "done is better than perfect", I'm not as good at realising when "near enough is good enough". For some reason approximations usually don't sit well with me... something I can work on for sure.
So I am guessing that the reason why this doesn't look like a sattelite dish is because 1) the focal point is not in the centre and 2) the ball doesn't rebound in straight lines.

Oh shoot, he does actually explain this exactly. He also mentions 3) speed of the ball. And then, 4) for lines that hit at the same point but with different trajectories and speeds, he takes the "average basketball shot".

The only other thing I am wondering about is what would happen if the ball were flat.

This is very cool. If you can mass produce such boards (plastic molds maybe?), It could be a fun novelty gadget/gift
The style of presentation, the manner of speaking, seems to be inspired by This Old Tony [0]. This is no bad thing. I wonder if Tony picked it up from somewhere else.


He needs to do some more monte-carlo simulations on the jokes to get to the level of ToT. But it was a very nice presentation of the topic and a neat result.
Clearly the hoop that minimizes shots is what exists at funfairs all over the world.

Would making the backboard convex make it near-impossible to hit? What about making the curve imperceptible so it's hard to notice it's helping/hurting?

Mark Rober (who is linked elsewhere in this thread for a dart board that does the same this as this backboard, but with active compensation) also did a video on how carnival games are rigged.

Dart Board:

Rigged Carnival Games:

(Bonus, in the theme of sports equipment that wins for you) Auto bowling ball:

That's if you hit the backboard. But you don't need to hit the backboard and plenty of people can normally make the shot without it. Funfairs / carnivals probably are doing something with the hoop itself.
They're also not standard basketball height, so if you're used to aiming at a standard hoop—
The carnival hoops I've examined all have ellipsis shaped rims. Impossible to distinguish from a circle when observed from the front, but clearly squished if you walk around and get underneath it.
ellipsis shaped rims... will leave you hanging.
This is pretty cool! I wonder if he could also figure out, which attempted balls would naturally go in vs through the help from the backboard!
This is very cool. As I watched the video, I began to think about a stupidly over-the-top version of the backstop that uses many real-time-deformable panels similar to the adaptive-optic mirrors used in advanced astronomical telescopes but informed to guide the ball by a machine vision view of the inbound ball in flight.
Isn't it a backboard, not a hoop?
Technically but if you google a basketball hoop or talk about one, people generally think of the backboard and hoop.
I'm with you. I went in thinking the rim itself would always ensure the ball goes in.
I’m not really impressed. This only applies to shots directly taken from the free throw line . Make a basketball hoop that moves based on ball flight Now that would be impressive. I have seen someone on YouTube do that with a dart board.
Did anyone else imagine just a very large hoop?
I imagined a large funnel.
Really neat project! Loved watching the video. Do you have the code in a Github repo?
I really enjoyed the length and depth of this video. Though I wonder if a good hybrid strategy for YT popularity is to have a viral-edited video on a main channel, and more depth linked on a second channel.
I think the results would have been much better if he'd taken into account the rotational inertia of the ball... It turns out that affects the bounce angle quite significantly...
Can anyone tell me what tablet and app he is using for the drawing?
Someone else asked in the comments: `I'm using an second gen iPad pro running the "concepts" app.`
nice work! you could probably speed the computation quite a lot by using a small deformation basis (e.g. using modal analysis) and optimize in this smaller space instead.
Do the inverse of this and open a stand at a fair :-)
He wouldn't have to, he could just use the original one where the ball hits the rim every time :-)
Now I want to make a backboard that always misses unless you know the right amount of spin to put on the ball.
So do you use only one spot to shoot from for the data collection or do you shoot from all over the floor?
Can someone briefly eli5 how the Monte Carlo simulations feed into learning the optimal surface?
Simulate random throw angle/power and random angle at point of impact; remember which angles lead to basket.
You pick a random position and a random shot (angle, speed), see where it hits the backboard, and then change the angle of the backboard there to direct the ball through the rim after the bounce. Do this enough times, and you have a surface. (I don't know how the number work out, so there are probably points that have multiple values and surfaces with discontinuities. I guess you average the values at a given point and then smooth the surface, and call that "as good as possible".)
I guess you average the values at a given point and then smooth the surface, and call that "as good as possible".)

In the video he mentioned doing a least squares fit to get the final surface, so that sounds about right.

Does this only work if you’re exactly aligned in front of the hoop? (eg Free-Throw Line)
Actually from the video, he miscalculated so it's optimized only when the basket is farther away then usual from the backboard. I would theorize that this may have made the solution work better, albeit unintentionally.
No it's optimized to work from anywhere in the court, although he didn't say what distribution he used.
This is so awesome! I love the way you went about solving this problem.
I thought this was really cool, keep up the good work!
That was really cool, thank you!
Good work. thanks for sharing
"Who is Monte Carlo?" Monte Carlo is for Europe what Las Vegas is for the US. The first name that comes to mind when you think gambling.

Monte Carlo method is repeated random sampling to obtain numerical results.

Monte Carlo algorithms are heuristic algorithms that solve problems with random process that can give wrong answers.

Las Vegas algorithms are algorithms that solve problems with randomness but get always correct result or knows that it failed. Runtime is finite.

Atlantic City algorithm is a probabilistic polynomial time algorithm that gives correct answer > 50% of the time (or 75% of the time by some definition).

Another way to put this is:

Monte Carlo Algorithm: Always fast, probably correct.

Las Vegas Algorithm: Probably fast, always correct.

Atlantic City Algorithm: Probably fast, probably correct.

Is Monte Carlo (I need to look up where that actually is) as gaudy (I might have said trashy) as the Las Vegas strip?
No, it's a good bit more upmarket. Monaco is known as a tax haven for the wealthy, and the casino has a dress code.
No. Monte Carlo is located in Monaco. It's very classy place.

It's the type of place where James Bond likes to play in the movies and books.

> Runtime is finite.

The expected runtime of a Las Vegas algorithm is finite, but the worst case is often infinite.

Well, his question was "Who is Monte Carlo?", a witty reference to the fact that Monte Carlo is named after a real prince [0].


I laughed out loud when he said this. I take for granted how much gambling knowledge I have (especially since I generally think gambling is stupid), but I thought everyone knew about Monte Carlo.

I'm going to have to look up Las Vegas algorithms though, this is the first I've heard of them. Course, it's been a while since I've broadly looked at the current state of probabilistic algorithms. Makes me think it might be time to step back and look at some more general theory, especially since some recent DSP work led me to look into particle filters in an attempt to estimate a pair of rotating phasors.

Nope, expected something interesting, but this is based on a boring brute-force simulation.

He did hint at using a parabolic shape, like in satellite dishes. Why not use some actual calculus and differential equations to figure out the optimal parabolic-like shape here?

"brute-force" is what you call monte carlo if you don't know what monte carlo is
There won't be a closed form answer because the optimal solution depends on the distribution of the angles and velocities of the shots coming toward the backboard, which will be a complicated real-life distribution.
How is it different from a Newton-Raphson approach, which requires you to make an initial guess as it iterates through several derivatives to get to the root?
It's great that you know more, but can you share what you know without putting others or their work down? Doing the latter really poisons the well here.

A much better pattern than "Nope, expected something interesting" is to first affirm something that the author got right or did well, and then build on that with suggestions for refinement, further development, learning. There's plenty of opportunity to show how much you know that way, plus you won't also come across as an internet jerk.

Keep in mind that project creators and authors are often reading these threads, and one nasty comment makes more of an impression than the rest of a thread put together. A single bee sting is more memorable than a field of butterflies. It's too bad that it doesn't work the other way around, but the pattern is super clear. Even the thread the other day with the C Committee guys, which was one of the best technical threads HN has ever hosted, made this impression on them: "Wow, I had no idea people were so mad about locales" (not a direct quote). I hadn't noticed, and when I found the comments they didn't even seem that mad.

The first 10 seconds pretty much covers the subject.

It's not the hoop, it's the shape of the backboard, which is a reflector formed to focus the ball on the target.

Now, the really cool thing would to build a flat backboard with controlled bounce properties. Interesting 3D printing problem. That would look like an ordinary backboard but still focus bounces.

Another idea would be a hoop controlled by servos that always moves the hoop where the ball is going.
This is pretty cool.
People would see. Something that just works, invisibly, though.
The solution is explained pretty quickly. But the implementation in the rest of the video is still worth watching!
Is this not something that just an optics equation in Physics would give you? Specially if not taking the radius of the ball into effect.
Depends on the importance of a couple effects that light is immune to (at least for an optics equation)

1) gravity post impact with backboard

2) impact angle for a given (start, backboard) tuple depend on velocity and launch angle for a basketball, but are always the same for light. Also the impact angle for the basketball and light are very different

I think it's safe to ignore both of these factors at this scale. 1) The effects of gravity is bounded and negligible on the surface of the Earth. 2) (I suspect) the wideness of the launch angle and hoop size are probably directly proportional, so you could shape the back board based on a direct impact to get a point to center the hoop on. The hoop can only get so big and still be considered reasonable.
The effect of gravity on the surface of the Earth is hardly negligible!

And your intuition on the launch angle is just flat wrong. In fact, I believe it's one of the primary predictive factors in a shots success with a normal backboard!

I think you gotta take the radius of the ball into account - that's the only bit he messed up on. (And if we can just have any-old assumptions, then it seems like the optimal solution is to make the entire backboard a hoop!)
a ball has mass, radius, and a variable velocity
I think within a range velocity and mass can be ignored ie. if the velocity is too small the ball won't reach the board to begin with and beyond a threshold most likely the bounce curve will depend almost exclusively on incident angle.
Maybe, but as he explains a normal parabola (like a satellite dish) wouldn't work, since the shots themselves are arced because of pesky gravity. I thought using a Monte Carlo analysis and finding a fixed point was actually a very clever way to solve it.
Yeah but the acceleration from gravity is constant so maybe there is just a (possibly non linear) change of coordinates that can be applied to the regular paraboloid.

Also a paraboloid would work only for rays that are parallel to one another.

Another difference from optics is that the vlocity is not fixed, and that affects the extent to which gravity modifies the trajectory.
Who uses the back board? This doesn't help at all with "nothin' but net"
No respect for Tim Duncan.
This was really well explained and interesting.

Funnily enough I'm pretty sure this is a really similar method to urinal design, so if this whole basketball thing doesn't work out for ya, you could always work for American Standard...

Upvoted this because I'm tired of peeing on urinals in bars and restaurants that have flat walls, and every time I do I think "gosh don't these guys have any engineers on their payroll?".
It's the same thinking as with software UI/UX. Doing things right is so last century, you have to stand out somehow.
The design idea is also similar to the the original stealth fighter design, the "hopeless diamond"[0], in that it's optimized to bounce all possible radar waves away from returning to their receiver.


Similar methods exists for all kinds of engineering problems, like architecture (form follows function), roofs, bridges, city planning, or just the economy.

The optimal form is always an optimization problem. Just define the constraints. Maybe the most famous example is Gaudi calculating the form of the roofs of the Sagrada Familia, and then Frei Otto for the Munich Olympics. City planning is easier as their is no gravity, just more constraints. Think of SimCity run in a simulation with feedback loops.

The best planning approach is always prolog-like. Define the facts and rules, and the forms will fall out eventually by itself. Then optimize the solutions iteratively according to cost functions. It's called OR, operations research. I did a lot of that with free-forms, also even simply office layouts, when I worked as architect. We even sold CAD programs to special manifacturers to design a good roof or other free-form shapes. Like for Disney.

> Maybe the most famous example is Gaudi calculating the form of the roofs of the Sagrada Familia

If you're thinking of Gaudi's weights on a string model, that has nothing to do with structural optimization. Weights on strings is a very ancient method of design for old masonry structures because they are designed with static equilibrium alone, as masonry joints are not capable of supporting traction loads. Thus instead of modeling compression paths, you simply go with traction paths, which you do by hanging some weights by some strings.

Speaking of Disney and architecture and parabolic shapes, apparently when the Disney concert hall was first built, the curved shapes of the building acted as parabolic reflectors which focused on nearby apartment buildings. They had to sand the panels to reduce the reflectivity because they were heating the apartments to as much as 140°F.
Good example. You need roughen it also for better sound quality on the inside. For Disney I had develop lot of linear algebra optimizations for smoothing which went over my head mostly, so I used symbolic solvers.

We don't have much sound optimization CAD programs, so we worked with light as replacement for sound, and looked at the reflections with raytracers. For the big, expensive concert halls and opera houses.

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