2 * 2sqrt(2) ~ 5.6569 , 2 * 2sqrt(3) ~ 6.9282 ; Keith is evidently failing to sort polygon vertices into cyclic order! WFL On 8/9/19, Tomas Rokicki <rokicki@gmail.com> wrote:
That set of points clearly describes a rectangle of side lengths 2 and 2sqrt(2) for a total area of 4sqrt(2) or about 5.656.
I'm calculating area by triangularization and Heron's formula.
Your sorting looks fine (lengths between adjacent points are 2, 2sqrt(2), 2, 2sqrt(2)). I'm guessing there's something wrong with your shoelaces.
-tom
On Thu, Aug 8, 2019 at 6:47 PM Keith F. Lynch <kfl@keithlynch.net> wrote:
Tomas Rokicki <rokicki@gmail.com> wrote:
A quick way to debug this. Keep track of the highest area seen so far and every time you see a new high area print out the points.
The highest area I'm seeing is 4 sqrt(2) or about 5.656, but you report a high area of 6.9.
Done. For a quadrilateral, with ten million (pseudo-)random planes, the largest area I get is 6.894347. The equation of the plane is 0.002074x - 0.706580y - 0.707630z + 0.005191 = 0.
The x,y,z coordinates of the four points, in order, are:
-1.000000,-1.000005, 0.995590 1.000000,-0.994135, 0.995590 1.000000, 0.997070,-0.992659 -1.000000, 0.997070,-0.998520
I'm a little puzzled by these numbers. If I understand my code of two years ago correctly, two of the three coordinates of each point should always be exactly -1 or +1, and the third should always be strictly between -1 and +1.
What area do you get? By what method? I use the version of the shoelace formula found at https://en.wikipedia.org/wiki/Shoelace_formula immediately after the word "Alternatively." I also rely on Tom Duff's claim that "In 3 dimensions you can ... compute the projected areas in the xy, yz and zx planes and take the square root of the sum of the squares."
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- -- http://cube20.org/ -- http://golly.sf.net/ -- _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun