HTML and CSS Reference
In-Depth Information
}
ball.draw(context);
}());
};
</script>
</body>
</html>
Test this a few times to see the ball moving at different angles. Try making the velocity higher or lower.
This is one of those many areas in the topic where the math and calculations are not exactly in
accordance with real-world physics. If you look at Figure 6-5, you see where the ball should actually hit the
wall, and also where this simulation places it.
Search WWH ::




Custom Search