Hayno

10 Reputation

One Badge

11 years, 284 days

MaplePrimes Activity


These are questions asked by Hayno

I've been on this question a week now and still no conclusive answer! What I need is a function that produces the inequalities that determine a triangle given the 3 points and then using a 4th point, prints true if the 4th point satisfies 2 or 3 or the inequalities and prints false if it only satisfies 1 or none of the inequalities. I need to have this solved by tonight so any quick help would be greatly appreciated!

Ok so my problem is that I need to write a function which produces the three inequalities defining a triangle given the 3 points that form its vertices, then with the 4th point supplied to the function I need the function to print false if the 4th point satisfies less than 2 of these inequalities and true if it satisfies more than 2 of these inequalities. Can anybody help me with this? On a previous post I obtained part of the function that produces the triangle, but the 2 inequalities part was not solved.

Thanks for your time

 

How would I write a function that produces true if a vector/ line satisfies 3 linear inequalities and false if it does not satisfy all 3 linear inequalities? Ie
If the vector <m,n> satisfies ax+by+c>0, dx+ey+f>0 and gx+hy+i>0 then the function returns true, and if it does not satisfy one or more then it returns false? Thanks very much for your time.

I don't know how to write a function that determines whether a non-zero vector intersects a triangle with given vertices. If anybody could help me write a function that satisfies this so that the function returns true if the vector spanning the line intersects the triangle and returns false if it doesn't I would be greatly appreciative.

Can anybody tell me what error is in the following function?

F:= ([[a,b], [c,d], [e,f]]) -> (1/2) abs((c-a)(f-b)-(e-a)(d-b));

Thank you!

Page 1 of 1