My curved basketball hoop always goes in

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
notice anything strange about this backboard it doesn't matter where I shoot on it the ball goes in look at that how does it know they say a magician shouldn't reveal their tricks but this one's too cool not to show also if you can't make it in with this hoop you deserve to lose I wrote software to figure out the most optimal backboard possible and then I built it this is that story I was talking some friends about stupid stuff that we might build and the idea of a backboard that always goes in no matter where you hit it came up and everyone thought that was really stupid of course I laughed and hey yeah that's stupid but the idea has stuck with me I just can't stop thinking about how awesome would it be to see that in real life I shoot the ball and it hits the corner and it goes into the hoop that would be really cool and so I put it in my bucket list I want to see that backboard before I die the only way I'm probably going to that backboard is if I build it so let's do that so in order to build it I have to actually know what shape I want to compute the optimal backboard shape requires a lot of programming you know nerd stuff now you're probably thinking oh snorefest I'm out of here but before you leave let me assure you it's actually very interesting so my goal is to compute an optimal backboard a standard backboard as a flat sheet isn't very optimal balls really only go in if you hit them within a certain region that's why they have that square on the backboard if I take a shot from the center and I hit over here the ball just misses and the same is true for most other regions and what I would like to do is to figure out what shape I can make the backboard something like this is that no matter where I hit it the ball gets directed into the hoop it's basically the same thing from the side as well the idea is pretty simple the hard part is figuring out the shape especially in three dekes it's a very complicated shape so what I did to solve this problem is I did what's called a Monte Carlo simulation and the idea is that you simulate a lot of shots in my case tens of millions of shots from all different locations in the court at all different location on the backboard and for every shot that I take I figure out how would I need to change the backboard location in this spot that I'm hitting so that the ball will go into the hoop so say I have a shot coming in like this and it's coming in really fast with the backboard as is it might bounce off something like this and it won't go in the hoop but what I could do is at this location the backboard I could change it to be this angle and it would redirect the ball down into the hoop if you do this for an enormous number of shots from all the different locations you can get a good idea of what shape the backboard needs to be so that the maximum number of shots go in if you look at what I'm drawing for all these things it really looks like it wants to be a parabolic shape and that makes sense because satellite dishes are parabolas and that's because they redirect all incoming electromagnetic waves or whatever to a single point so if I have a ray coming in like this it'll bounce to the to this point same here and for all of them there's a few key things to understand to get why it's designed the way that it is and why a straight parabolic shape doesn't really work the first is that the balls follow trajectories when I shoot a ball in it's coming on some curve because it's pulled down by gravity and then the same thing happens when it bounces off the backboard I have to account for this fact depending on where I hit it vertically they'll drop different amounts and in the amount they drop is also related to the speed that they're coming in they'll drop less if they're coming in faster and then the other thing that matters a lot with basketball shots is where they go depends an enormous amount on the angle they're coming in so the bounce will be some kind of reflection if I'm coming up it might bounce like this but if I'm coming down and my pounds like that given the the difference that you can get for different shots it seems like this shouldn't really work because if I shoot a shot like this I need to change the angle the backboard in a different way than if I shoot a shot like this and it's true you you really can't support a line drive and a slow arcing shot I had dr. Mize for a type of shot and I went for kind of the average basketball shot that's arcing line drives are sort of a special case far out on the edge of possible shots and even though there is this dependence on speed and incoming angle there's really nice thing that makes it not as bad of a problem and that's the fact that the ball is smaller than the hoop so for every possible bounce that a ball does there's actually a range of bounces that will still cause it to go into the hoop and this actually gives pretty good amount of wiggle room in terms of speed and angle at the comes in for a given point on the hoop so that it'll still go in so the real question is who's Monte Carlo and why does he have to do with backboards I don't actually know who Monte Carlo is I assume he had something to do with this technique and I'll show you how I derived a backboard using it so what I do is I choose a random location on the court and then I take a random shot at the backboard then I look at where I hit the backboard and I figure out what I would need to change about the angle of the backboards that the ball will go into the center of the hoop so say I change a surface at this location and to this angle it will bounce into the center of the hoop then repeat this tens of millions of times and remember the result for every single shot so there's a really important subtlety which is related to the fact that any given shot has multiple bounces off the backboard that will still go in so for this shot this bounce will go in this bounce will go in this bounce will go in and basically infinitely other balances within this range will go in if you look at all of these bounces they sort of form an ellipse so for every shot I can keep track of this range that it would go in and what the corresponding angle changes to that location the backboard would be that would cause it to hit those what I'm about to say is somewhat hand wavy but it does make sense if I take this angle range for all of my simulated shots and I plot them on some kind of graph maybe there's rotation on the y axis is rotation on the x axis and this is a shot I can do this for tons and tons of shots for that particular location on the backboard and what this means that if two ellipses overlap if I were to set the backboard to this specific rotation or this specific angle these two shots would go in so what you can do is find the location in this chart where the maximum number of ellipses overlap that will be the angle to set the backboard to in that location so the maximum number of shots goes in that's basically it there's a bit more to it about having smooth continuous backboards and making sure you're only getting sort of nominal realistic shots so say I do this for tens of millions of shots for all the locations on the backboard and I choose an angle for every point of the the backboard surface that I want the only remaining question is how do I turn that into a shape so in concept it's really not that complicated to do its imagine this my backward we're looking at the top of it and I calculated all of these angles that I need the backboard to be for the shots to go in all that I need to do is figure out what shape I can bend it into so that the surface at all these locations is those angles doing this in 2d is pretty easy doing it in 3d is actually more challenging but what I ended up doing is a least squared fit I was having a hard time getting an exact fit that was smooth and continuous and that just involved solving a very big matrix so if I do this in 3d and I get some shape it still won't be quite the right shape and that's because of one other important subtlety it's kind of hard to explain but I think I can do it so imagine that this is my backboard and the hoop and this is the backboard that I calculated so that all the balls would go in you have to remember that I was using the original backboard to compute these angles so if I have this shot and it bounces like this to go into the hoop where this ball goes is relative to where it bounced and if we were using the original backboard as the location to compute the bounces and the angles it would actually go like this this will cause many of the shots to miss or to at least go into the wrong spot it creates a actually chicken-and-egg situation because I need the shape of the backboard in order to calculate where the ball goes but I need to calculate where the ball goes in order to calculate this backboard shape so it's kind of nasty what I did I did this once and I calculated the backboard which still wasn't right then I used that backboard as my backboard and reran the simulation what ends up happening is you get a slightly different backboard which is closer to correct then you can do it again and you get a backboard that's less different but still different and then eventually eventually it converges so that's really all there is to it then you just have to export it in some format that you can generate toolpaths for a CNC from in my case I exported an STL I just converted it into a bunch of triangles and saved that and then I generated the Topaz in fusion 360 so here's the code for my program can be to the backboard I'm definitely not gonna go through it so don't leave I still wanted to let you at least lay eyes on it this was most of the work for getting this done and to be a shame if I didn't show it off a little bit and it's it's a good bit of code so it does pretty much everything that I described it selects all the locations it does the shooting this code here is the stuff that computes the rebound light angle probably the most interesting thing is actually running it so this is one single shot so the player is invisible the blue is the computed backboard that we would need and this is what the shot would do if it hits the upper right corner and then the the red squares the original backboard so let's see if I can hack something in here really fast so this is kind of funny this is every 16th shot from one position in a very narrow speed range and remember the test is all the positions at all the speeds and all the angles that at least the ones that hit the backboard this thing simulated a ton of shots if this was a group of nerds I could really go through the code blow-by-blow but I think even in that case it would still be really boring something about code just I only have ever seen a video that's actually looking at software code that was enjoyable all right and if you run my funny little program this is what it spits out and you can ignore the fact that it's on this big block of material that was just how I made it we're only concerned with this top surface so it just doesn't matter and so I'm in fusion 360 and I need to take this mesh that I made and convert it into toe path so I can machine it on my CNC machine so the first thing that I did is I cut the mesh in half because it's symmetric and it's a lot easier to work with only half of it it means I have to make half as many tool paths and I can just mirror them the way I went about making the tool paths for this was really specific to the way that I decided to make it I don't have a block of wood or metal that I could machine this whole thing out of and so I decided to make it out to by force they're cheap and I have plenty of them and what it is I found an arrangement that would completely cover the surface that I need a machine with the minimum number of two-by-fours these are actually a little bit thicker than a 2x4 they're they're actually 2 inches thick so there's just a piece of plywood that's gonna be what I will do is all machine each of these individually as their own setup down to the surface and then I'll assemble them into the the final thing so if we hide the mesh this is the general structure here and then this will be screwed on to a piece of wood or something so we're going to talk outside of this here's one of the planks that needs to be machined this is treated as its own setup and so this will be square in the machine and machined basically just Institue and the way that the tool pads are set up is there are it's just like any other part there's some clearing and some profiling there's a little bit of extra machining because these aren't square and so they need to mate with each other tightly and so that's just an extra operation that I'm gonna do and the way that I achieved the mirroring for a given set of tool paths for example this plank next to it there's the tool pads for this side and then they're just inside of a mirror pattern which mirrors them in the same coordinate system so you can literally machine a plank take it out put another plank in and then machine the mirror you have to touch anything basically and it works so it's very convenient I think that's all there really is to say about that so let's make it so I'm at the tormach and getting ready to cut some wood you're probably expecting me to cut some steel or something hard for the next thing on the tormach but nah it's off pine it may be pine but I am removing a lot of material and so in the hopes of keeping at least a good bit of the sawdust contained I built this box really quickly and then this board here is a reference so what I'll do is all machine it square with the machine and then every piece I put in I can just push up against it and I don't have to zero out its rotation it'll just be square so I'm just using some two by fours glued to some scrap lumber to get me a two inch blank and I've got eight of these that I need to machine out the setups really simple you just push it up against the reference clamp down some toe clamps and go to town I'm pretty sure this is the only time I've ever used an edge finder on wood I wasn't even sure if it was gonna work so I was feeling pretty pumped about this box it really seemed like it was keeping most of the chips in and then the machine got 10,000 rpms and it has a whole different story all the machinists are gonna laugh at me but it was awesome seeing it take these aggressive one-inch that passes I know it's soft pine but it didn't stop me from feeling like I was the Titan of CNC himself there really isn't a whole lot else to say it is just a machining pine after all I was running the machine as fast as I could ten thousand rpms and three hundred per minute is definitely cruising I was wrong about the box it definitely did capture an enormous amount of wood chips and you just repeated eight times and you get a really funny looking pieces of wood that you have to figure out how to assemble into a backboard I managed to not accidentally turn the coolant on the whole time which is great I also just went ahead and C&C these these are odd ball mounts that all the pieces sit on probably codes on these my hands they have these weird angles pretty nice you have four of exactly the same thing when you do it in a CNC I've never actually cut a 2x4 and a CNC before since at first there's some extra material that I have to remove and that's not interesting I just have to slice it off in the chop saw I'm gonna get that done real fast yeah it's up they were all a little bit too thick so I took the thickness down the jointer and I removed all my markings for which the pieces were and what orientation Earring and I spent probably a good hour trying to back out which pieces which from the tool path is doing basically a CSI which bullet came from which gun analysis let's do a test fit on the stand to see how they line up wow that fit is really good this gap is known I couldn't get it to fit without this gap so what I plan to do is machine a little wedge of wood and put it in there or ignore it I'll probably end up ignoring it that's typical this looks incredibly cool the big question is if it actually bounces the ball the way that's supposed to in the regions where I cut all the way through to the scrap board you can see the circle that's transitioning from the 2x4 to the piece of scrap because the scrap is narrower there's a gap it was a mad dash to get this all laid up and machined so I didn't really think about that I'll probably just fill them they also shouldn't really have any functional impact it's just how it looks I was thinking about how I might fill in these big gaps and cracks I realized I have a can of great stuff which is designed to fill gaps and cracks so that sounds perfect I'm gonna inject it in here it'll off foam out and I'll just stand it down I'm just hanging it on my French cleat it's very convenient and looks pretty cool so let's try it out I can't wait to this thing work its magic what why so for some reason it looks like this back board instead of always making the ball go in basically always bricks my shot it seems like it's always hitting the front of the rim I gotta see what's up with that on the plus side it does look like it's directing the ball to the rim the way that I want it to it's just not exactly the way that I wanted to because I need to go in into the hole I just realized that I have a pretty big error in my computation and the error is that I'm not accounting for the radius of the ball basically the the calculation I'm doing is I'm looking at where the ball hits the wall and then the trajector that it will follow according to whatever angle the backboard locations at and then where it lands in the distance then computing the ball going is from the backboard surface to wherever it lands but the ball stops here the center stops here basically the the net effect of this is that I brick every shot because it directs it into the rim the front of the rim because the ball is 2 or 3 inches further the way the needs to be for the moment I can patch this just by estimating the size of also it's about 5 inches if I move the hoop forward two and a half inches which is the radius it should correct the issue but I would rather have it be the right shape to go in with the hoop nominally where it should be but let's give this a try okay the hoop has been moved out by about the radius of the ball and this will hopefully fix the nothing but brick problem that I was having that's more like it you can tell I'm really good at sports by how I throw the ball but it's actually it's actually really hard to not aim at the center of the hoop I've been trained my entire life to throw it at the center this thing actually works the only thing that I wish it did is properly direct shots from the corners and the reason that it can't is that the algorithm that I was using didn't account for the fact that they would hit the rim I actually had an alternative approach that would if you were in these sort of lower quadrants they would opt to redirect the ball up and down on a parabolic arc so that it would go up and over the rim I didn't want to do that for the whole rim because I'd hit up here and it would shoot it up and then go in the thing which makes for ridiculously shaped backboard and that's not how I want it to work I wanted to just go line drive in for all cases that it can so I wanted to take the result that I have here and then merge it with the result in the corners where it will bounce it up but I was having a difficult time merging those together in a way that made sense I think I might know a way to do it but I already made this I'm really tempted to give it another go and maybe make another one I might I'm still thinking about it a lot of wood machine to get to this point but overall it's a neat thing I'm gonna get it painted just so that it looks like an actual backboard and not a weird wooden slab waiting for paint to dry is traditionally a pretty boring activity and so I decided to spice things up by making a better mount for the hoop and just a simple old bracket I'm going to bend and then spot weld by just about painting myself into a corner with this part because there's not enough clearance under the dies to do these inner bends but think that I can just sneak the part in right about here the power of a good bender and the pen plotter this part has holes that are three bends apart and they line up I think this is a first for me usually I design parts like this and the holes don't line up and I wonder why so I think I'd call this a success I made a hoop that always goes in and by always goes in I mean goes in more often than it did otherwise no there's like a couple things that really do differently the first is that I would change the calculation rewrite so I don't have this big old Pitou Burris it really makes it not a regulation hoop although I guess the it's not really regulation anyway but this bugs me otherwise it's pretty cool it was a neat neat construction technique after going through this I think there's another way that I would do it if I did it again I'd probably actually glue up all the two by fours into one brick that's rotate and then just machine that and two setups and I would avoid a lot of these gaps and the construction wasn't too bad but I think that would be easier but otherwise it's really cool it makes a great addition to my French cleat I don't think anyone else has a parabola it always goes in backboard hanging on their French cleat so makes me unique and special in a way and I know this was a pretty different video I focused a lot more on computation and how to calculate some strange things hopefully you liked it if you did let me know if you didn't also let me know because I don't want to make things that people don't like I'm really trying to update what I show and what I focus on based on what people like a lot of stuff that I think is boring people think is really cool so just let me know I'm happy to show anything if you like what you see you should subscribe it's a really great way to show me that you like what you see and it's also a great way to let other people see that hey maybe there's something cool here and I think that's all I have for now thanks
Info
Channel: Stuff Made Here
Views: 8,672,233
Rating: undefined out of 5
Keywords: basketball hoop, basketball, tormach, tormach 1100mx, sheet metal bending, score, swoosh, homemade basketball, homemade basketball backboard, build, shop, fusion 360, python, computational goemetry, programming, optimization, rebound, cnc woodworking, basketball shooting, How to make basketball hoop, optimization techniques, how to make a basketball hoop, backboard, Diy basketball hoop
Id: vtN4tkvcBMA
Channel Id: undefined
Length: 21min 6sec (1266 seconds)
Published: Thu Apr 16 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.