ScratchData LogoScratchData
Back to MasterOfArithmetic's profile

Line Segment Touch Detection

MAMasterOfArithmetic•Created December 24, 2014
Line Segment Touch Detection
4
2
55 views
View on Scratch

Instructions

Click to add a point. This will make line segments from where you click. If you put your mouse on a line the point will turn red, and the variable tells you how many lines the mouse is touching.

Description

This uses the formula I used to find intersection in the Sutherland-Hodgeman clipping. Now, I use the same formula two more times to detect a line segment instead of a line.

Project Details

Project ID41096786
CreatedDecember 24, 2014
Last ModifiedFebruary 7, 2015
SharedDecember 24, 2014
Visibilityvisible
CommentsAllowed