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."