ScratchData LogoScratchData
Back to PutneyCat's profile

Hole-in-the-Wall (Cyrus-Beck demo)

PUPutneyCat•Created October 23, 2021
Hole-in-the-Wall (Cyrus-Beck demo)
190
134
2430 views
View on Scratch

Instructions

Click green flag and watch the hole being made in the wall. You can then adjust the hole - but it always needs to be CONVEX (no bits going inwards). You'll see if it's going wrong.

Description

This is just a demo of Cyrus-Beck line-clipping, with a bit of 3D thrown in to the mix. @kriblo recently highlighted Cohen-Sutherland line-clipping, which clips lines to within a rectangle. Cyrus-Beck works differently and allows clipping to within any convex polygon. You can adapt these methods to draw the bit(s) of the line outside rather than inside the shape in question.

Project Details

Project ID588360324
CreatedOctober 23, 2021
Last ModifiedOctober 22, 2023
SharedOctober 23, 2021
Visibilityvisible
CommentsAllowed