Question: how do i write a function that returns "true" if a line intersects a triangle and "false" if it doesnt?

okay so i have to write a maple function that decides wheter a line given by a vector that spans it intersects a triangle with given vertices. 

an example of what it should look it is 

ISC([[0,0],[10,10],[10,10]],[2,1]) returns true

ISC([[0,0],[10,10],[10,0]],[-2,1]) returns false

 

thanks in advance.  i'm just having severe problems with writing functions and what not as you can tell. anyway, Thanks!!

Please Wait...