Talk:Divide a rectangle into a number of unequal triangles: Difference between revisions

From Rosetta Code
Content added Content deleted
 
Line 1: Line 1:


==Extra Algo.==
==Task==
The idea for the task I developed from a StackOverflow question that was closed.
--[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 11:04, 18 December 2021 (UTC)


==Extra Algo.==
I'm guessing that you could drop a point P inside the rectangle where its distances to the corners are all different. Add random points around the outside edges, then go around the circumference in one direction and make trianges of c[i], c[i+1] and P.
I'm guessing that you could drop a point P inside the rectangle where its distances to the corners are all different. Add random points around the outside edges, then go around the circumference in one direction and make trianges of c[i], c[i+1] and P.



Revision as of 11:04, 18 December 2021

Task

The idea for the task I developed from a StackOverflow question that was closed. --Paddy3118 (talk) 11:04, 18 December 2021 (UTC)

Extra Algo.

I'm guessing that you could drop a point P inside the rectangle where its distances to the corners are all different. Add random points around the outside edges, then go around the circumference in one direction and make trianges of c[i], c[i+1] and P.

You would then get triangles with edges on all four sides of the rectangle.

--Paddy3118 (talk) 10:10, 18 December 2021 (UTC)