ScratchData LogoScratchData
Back to gtoal's profile

Triangle clipping challenge w/ transparency

GTgtoal•Created August 23, 2016
Triangle clipping challenge w/ transparency
8
5
114 views
View on Scratch

Instructions

Move the mouse around Press space to begin testing After the final test, stress tests are performed, alternating between drawing 200 clipped triangles and 200 non-clipped triangles

Description

Turned out slower. Code is shorter and simpler though. Quite a bit of scope left for optimising (by moving clipping out of inner loop code). non-clipped test does clipping regardless. Change 'author' init to run chooper's code for comparison. Apparently this does support a transparent pen correctly. Whew! My definition of boundary conditions may not match chooper's. Problem spec wasn't explicit enough about inclusive/exclusive clip boundaries. I've assumed all are inclusive, which is probably what was wanted but not ideal for compositing adjacent areas. (A better convention is 'lower bound inclusive, upper bound exclusive')

Project Details

Project ID118962685
CreatedAugust 23, 2016
Last ModifiedSeptember 1, 2016
SharedAugust 23, 2016
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root