ScratchData LogoScratchData
Back to raucket's profile

Triangle Rasterization

RAraucket•Created October 14, 2015
Triangle Rasterization
26
18
429 views
View on Scratch

Instructions

Move vertices A, B and C to change shape of the triangle.

Description

Using a well-known method of filling a triangle. This is 4-8 times faster than my first humble attempt. Previous version: https://scratch.mit.edu/projects/82283328/ Resource: http://www.sunshine2k.de/coding/java/TriangleRasterization/TriangleRasterization.html Thanks to @DadOfMrLog for guidance on the narrow path! ;-P Thanks to @Wes64 for inspiration for optimization. Update 16-OCT-2015: Optimized the code to reduce the number of multiplications and divisions. Update 15-OCT-2015: Combined the two drawing blocks needed for a split of flat top/bottom triangles into one block using only using delta-y for length/size-control.

Project Details

Project ID82441630
CreatedOctober 14, 2015
Last ModifiedAugust 24, 2016
SharedOctober 14, 2015
Visibilityvisible
CommentsAllowed