ScratchData LogoScratchData
Back to chooper-beta's profile

Test if point in triangle remix

CHchooper-beta•Created December 27, 2016
Test if point in triangle remix
5
4
106 views
View on Scratch

Instructions

Hover over the triangles Press up / down to do timings for 30,000 tests

Description

Having seen @TheLogFather's take on the algorithm, I decided I'd revise my current algorithm to reflect some of his ideas I included a timing test and found that in general @thelogfather's generally came out slightly faster, but there was a lot of overlap in readings so I couldn't get a definite result Even if a result had been reached however, it would still have to be treated with a grain of salt - both these algorithms are optimised for certain cases, and it is very difficult to produce a testing suite that allows the 'average' case. Here, I used random values from -20 to 20 for all the inputs in the hope of achieving 'average'.

Project Details

Project ID138025917
CreatedDecember 27, 2016
Last ModifiedDecember 27, 2016
SharedDecember 27, 2016
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root