click and drag the dots around to move the lines or change the clipping window
I learned this during one of my CS courses and thought it would be neat to implement on scratch Feel free to take any bit of code used here, I would appreciate being credited for it. Why? this might be useful for people who want to improve performance on pen platformers and other pen games that require lots of collisions and drawing. Typically, this algorithm is used in 3d games to clip lines within the clip space, or in other words, the area that the camera shows. However scratch is slow when it comes to computing lots of collisions, so more than space clipping, this algorithm may be useful for testing if lines are within bounds and which segment of said line is within bounds. #pen #algorithm #interactive #test