Cannons that Never Miss

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] this teacher is really annoying a fine throw with a beautiful ark projectiles are fascinating things but the maths that drives them and the ways in which we can abuse it are arguably just as interesting ah it's recess let's go outside this is a cannon that never misses its target no matter where you put it you can do this because it is harnessing some very powerful mathematical formulas formulas are considered every factor that affects the ball so the height the distance and its gravity are all taken into account perfectly even when it's severely skewed by wind so how is this achieved well imagine an explosion went off at the cannon and expands at the speed of the projectiles it fires the incident reaches its target but you can see the line this creates to the center would be the exact angle the cannon will need to shoot at obviously this does not take gravity into account but let's pretend for a moment that the explosion is pulled down by gravity as it expands the explosion once again reaches the target but this time it forms a different angle it even manages to strike the target twice if we take the second line and use it as a firing angle for our cannon we can once again produce the perfect shot the first line will also produce a perfect shot but it will be very flat and the hoop may interfere this concept boils down to an equation the left side represents our projectile's position through time while the right side represents our explosion as it grows in size since position velocity and acceleration are vectors we need to rearrange the equation a bit to account for the three axes finally we can expand this entire thing out to yield this this is horrible to look at but it's actually not that bad we know every variable here besides t so we can simply let the computer calculate the other numbers for us and once we have it in this form we can simply solve a time and learn all the angles we can shoot at listen i love basketball but we're only just scratching the surface of what this is capable of let's step it up a bit come on young lily-livered cockroaches raise those sails we head for tortuga my nightfall and someone get me some more room this is captain blubber and he's in a bit of a pickle the empire as fast as ship is on his tail and it's loaded with enough cannons to level his crew entirely what if we shot their cannonballs before they can hit us ah it our problem has become considerably more complicated the targets we are aiming at now have their own velocity and gravity so aiming at their exact position like before is futile let's make use of the explosion metaphor again and see what's going on as our gravity induced explosion expands it strikes the red ball there if we fire the blue ball at this spot we notice that the red ball meets it at this location at the exact same time at this point you might be wondering why why does this keep working what's so special about this explosion well our explosion isn't really an explosion what it actually represents is all the possible shots arcana can take all fired at once so if targets do strike the explosion we know the shot is possible along with the exact location to aim at this technique has a wide use in video games where enemies can be made more threatening by hitting moving targets or ai can be made smarter by being able to avoid an oncoming collision and as captain blubber is about to discover includes defending yourself from an incoming cannon barrage fire by utilizing the projectile prediction technique we have successfully created a shield out of cannon fire truly a marvel in 16th century engineering remember the equation we used to aim at a static target well the equation to hit a moving target is exactly the same despite the differing nature of these two situations the equation reads identical the numbers we feed in may differ but not the properties for our basketball hoop the relative velocity is zero because our target is always stationary for our two cannons the relative acceleration is zero because the projectile we are intercepting it with has the same gravity when two projectiles have the same gravity it doesn't matter whether they are on earth or in space the angle we fire at will always be the same we never deal with absolutes here we are only interested in how our target moves from the shooter's point of view captain blubber has successfully defended his ship from the empire infuriated they now try a slightly different approach despite the wall of cannon fire heading towards the ship not a single ball makes it through and with the empire exhausting the last of its cannonballs captain blubber emerges unharmed and lives on to pillage and plunder another we day the kangaroo overlords surrender now your bastards several light years away from earth a giant spaceship of alien kangaroos is attacking familiar allies unlike our previous foes these kangaroos have very advanced technology their space bending projectiles utilize the effect known as jerk or in other words change in acceleration this effect allows their projectiles to travel along highly unpredictable paths which is bad news for our fish who only have a one cannon to defend themselves let's help them out a bit the model we use for our basketballs and cannibals will not work here due to the presence of jerk to account for this we add this term i'll save you the pain of expanding this one out all you need to know is that the final form of the problem will look something like this the presence of the two terms of the star presents us with a new issue we are dealing with a sixth degree polynomial which essentially means it has six unique solutions you've likely seen polynomials before in the form of quadratics which are second degree polynomials remember this formula we can use it to solve quadratics similar formulas exist for polynomials of the third and fourth degree each hideously longer than the previous one for polynomials of the fifth degree and beyond there are no general formulas which means there's no way to extract all the values we need so what does this mean for our aimbot let's dive a bit deeper we know the equation for our boomerang aimbot has up to six solutions which you can see here as the boomerang strikes our explosion six times this means there are six shots we can take that will hit the target here is a graph of how close our best shot gets to the boomerang over time you can see that the points we want to find strike the x-axis where the distance is zero so the main question now is how do we find these points well because this line is a sixth degree polynomial there is no way to find the exact values to this this is disappointing that is was until i realized this here's the derivative of our graph which creates its own line if we find the points where this one strikes the x-axis we can see that they coincide with the peaks and valleys of the original line interestingly our original points have been encapsulated by these peaks and valleys we can now perform binary search or in the context of mathematics the bisection method which allows us to reduce the space we know the solution sits in until we are happy with the precision awesome we can now solve polynomials in this manner just one more problem to do that we need to solve the derivative as well so how is this done just do the same thing again each time we take the derivative the resulting line loses a bit of its complexity until eventually we are left with a straight line which is trivial to solve so for any polynomial all we need to do is recursively reduce the problem to a line and once that happens work our way back up the chain with this final piece of the puzzle we can now perfectly predict space boomerang flights alright i think that's enough maths talk let's get back to our fish [Music] look at that so [Music] [Applause] you
Info
Channel: b2studios
Views: 396,500
Rating: undefined out of 5
Keywords: projectile, b2studios, b2, b2 projectile, projectile aimbot, aimbot, b2 aimbot, captain blubber, fish, b2studios fish, b2 fish, b2 basketball, this teacher is annoying, kanye west, pirate ship defense, pirate ship defence, aimbot algorithms, b2 algorithms, root-finding, root finding algorithms, root finding aimbot, space boomeranges, space boomerangs, b2 boomerangs, we are the kangaroo overlords, kangaroos, aussie aliens, b2 aussie aliens, game aimbot, how to create aimbot
Id: aKd32I0uwAQ
Channel Id: undefined
Length: 8min 23sec (503 seconds)
Published: Wed Sep 22 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.