Re: [math-fun] Random nonempty intersection of cube and plane, revisited
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."
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/ --
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
Interesting; his list is in order though. Maybe he's sorting correctly but then implementing shoelace on the sorted order subcorrectly? -tom On Thu, Aug 8, 2019 at 10:56 PM Fred Lunnon <fred.lunnon@gmail.com> wrote:
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
_______________________________________________ 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/ --
Shoelace is actually just a sum over cross products, because the area of a triangle is half the area of a parallelogram. This point is poorly stated on Wikipedia and Mathworld, too bad. Compare: https://en.wikipedia.org/wiki/Shoelace_formula http://mathworld.wolfram.com/PolygonArea.html The term grouping of the Mathworld formula is better, but this article could use at least one more picture, say of a convex polygon, with a chosen central point, thus triangulated, and affixed on the exterior with reflected triangular "shadows". Then the geometric interpretation in terms of half parallelograms would be easier to see. Re: Heron's formula, I don't know why you would want to involve function sqrt=S. Also, the cross product involves less arithmetic, compare 4*M + 5*A + 1*S with 3*M + 1*A, per triangle. But perhaps in a total perspective, the most ruthless, fastest moving, super competitive, numerical algorithm could evolve to use Heron's formula instead? I did not try to optimize very much, but have doubts about Heron's formula. Anyways, sorting and levelling seems more the bottleneck. --Brad On Fri, Aug 9, 2019 at 1:28 AM Tomas Rokicki <rokicki@gmail.com> wrote:
Maybe he's sorting correctly but then implementing shoelace on the sorted order subcorrectly?
Can the software that gave accurate predictions for the cube be repurposed to predict properties (expected area, perimeter, and number of sides) for a random cross-section of a regular tetrahedron? We can derive a prediction for the expected area by dividing the volume by the mean width, but I don’t know how to compute the expected perimeter; the method I described yesterday (for the cube) shows that it’s equal to pi / (4 sqrt(3)) times the expected number of sides, but I don’t know how to compute the expected number of sides. Jim Propp
It's easy to do, and I think I did it correctly. Here are the results I'm seeing. They aren't as nicely round. These values are for a unit tetrahedron. (I'm calculating them for a tetrahedron with edge length 2 sqrt 2, and then scaling the results down.) At 268435456 pts 3.28851559385657 area 0.129189154723324 perim 1.49120946841637 On Fri, Aug 9, 2019 at 5:04 PM James Propp <jamespropp@gmail.com> wrote:
Can the software that gave accurate predictions for the cube be repurposed to predict properties (expected area, perimeter, and number of sides) for a random cross-section of a regular tetrahedron?
We can derive a prediction for the expected area by dividing the volume by the mean width, but I don’t know how to compute the expected perimeter; the method I described yesterday (for the cube) shows that it’s equal to pi / (4 sqrt(3)) times the expected number of sides, but I don’t know how to compute the expected number of sides.
Jim Propp _______________________________________________ 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/ --
And here are the results after an overnight run. At 34359738368 pts 3.28853583722957 area 0.129186219302995 perim 1.49118840781298 On Fri, Aug 9, 2019 at 10:49 PM Tomas Rokicki <rokicki@gmail.com> wrote:
It's easy to do, and I think I did it correctly. Here are the results I'm seeing. They aren't as nicely round. These values are for a unit tetrahedron. (I'm calculating them for a tetrahedron with edge length 2 sqrt 2, and then scaling the results down.)
At 268435456 pts 3.28851559385657 area 0.129189154723324 perim 1.49120946841637
On Fri, Aug 9, 2019 at 5:04 PM James Propp <jamespropp@gmail.com> wrote:
Can the software that gave accurate predictions for the cube be repurposed to predict properties (expected area, perimeter, and number of sides) for a random cross-section of a regular tetrahedron?
We can derive a prediction for the expected area by dividing the volume by the mean width, but I don’t know how to compute the expected perimeter; the method I described yesterday (for the cube) shows that it’s equal to pi / (4 sqrt(3)) times the expected number of sides, but I don’t know how to compute the expected number of sides.
Jim Propp _______________________________________________ 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/ --
-- -- http://cube20.org/ -- http://golly.sf.net/ --
Thanks, Tom! Does anyone recognize these numbers? Jim On Sat, Aug 10, 2019 at 11:02 AM Tomas Rokicki <rokicki@gmail.com> wrote:
And here are the results after an overnight run.
At 34359738368 pts 3.28853583722957 area 0.129186219302995 perim 1.49118840781298
On Fri, Aug 9, 2019 at 10:49 PM Tomas Rokicki <rokicki@gmail.com> wrote:
It's easy to do, and I think I did it correctly. Here are the results I'm seeing. They aren't as nicely round. These values are for a unit tetrahedron. (I'm calculating them for a tetrahedron with edge length 2 sqrt 2, and then scaling the results down.)
At 268435456 pts 3.28851559385657 area 0.129189154723324 perim 1.49120946841637
On Fri, Aug 9, 2019 at 5:04 PM James Propp <jamespropp@gmail.com> wrote:
Can the software that gave accurate predictions for the cube be repurposed to predict properties (expected area, perimeter, and number of sides) for a random cross-section of a regular tetrahedron?
We can derive a prediction for the expected area by dividing the volume by the mean width, but I don’t know how to compute the expected perimeter; the method I described yesterday (for the cube) shows that it’s equal to pi / (4 sqrt(3)) times the expected number of sides, but I don’t know how to compute the expected number of sides.
Jim Propp _______________________________________________ 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/ --
-- -- 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
Summary of area & perimeter bounds for cross-sectional polygons of cube, updating and superseding previous provisional posts --- Five distinct polygons have vertices in common with a double-unit cube: the following table shows each Cartesian vertex set, sectional plane, area A, perimeter B. Corner: x+y+z = 3 , { (1,1,1) } , A = 0 , B = 0 ; Edge: { (1,1,1), (-1,1,1) } , y+z = 2 , A = 0 , B = 4 ; Face: { (1,1,1), (-1,1,1), (-1,-1,1), (1,-1,1) } , z = 1 , A = 4 , B = 8 ; Triangle: { (-1,-1,1), (1,-1,-1), (-1,1,-1) } , x+y+z = -1 , A = 2 sqrt(3) ~ 3.46410162 , B = 6 sqrt(2) ~ 8.48528137 ; Rectangle: { (-1,-1,1), (1,-1,1), (1,1,-1), (-1,1,-1) } , y+z = 0 , A = 2 + 2 sqrt(2) ~ 5.65685425 , B = 4 + 4 sqrt(2) ~ 9.65685425 . Classified by number n of polygon vertices, corresponding extremal polygons are as follows: n = 3 : min = Corner , max = Triangle ; n = 4 : min = Edge , max = Rectangle ; n = 4 : min = Face , max = Rectangle ; n = 5 : min = Triangle , max = Rectangle ; n = 6 : min = Triangle , max = Rectangle . Notes: The same extreme polygon yields sharp bounds on both area and perimeter. The extremes are in general attainable only if coincident vertices are permitted. When n = 6 , the linear system of planes x+y+z = d yields hexagonal minimum perimeters for all |d| < 1 . When n = 4 , there are two topologically distinct families of generic quadrilaterals, splitting the 8 cube corners 6+2, 4+4 respectively. There appear to be no critical points apart from isomorphs of those identified above, either interior or constrained to its boundary, within the tetrahedral phase-space region of planes meeting the cube. This situation is reminiscent of linear programming, despite area and perimeter being no longer linear. So is there some obvious reason why these bounds should occur --- almost exclusively --- at polygons with their vertices in common with the cube? [ Such an insight would save much blundering around in a surprisingly ill-conditioned numerical multivariable constrained optimisation problem. For instance Rectangle maxima, lurking innocently at a corner of the phase region, constitute actual singularities: traps cunningly planted with maximal inconvenience and unpredictability! ] Fred Lunnon
Lionel Levine suggests trying the octahedron in hope of finding some interesting duality phenomenon (maybe random planes cutting an octahedron have something to do with random lines cutting a cube while random lines cutting an octahedron have something to do with random planes cutting a cube). Can someone try this too? Thanks, Jim Propp On Sat, Aug 10, 2019 at 11:50 AM James Propp <jamespropp@gmail.com> wrote:
Thanks, Tom!
Does anyone recognize these numbers?
Jim
On Sat, Aug 10, 2019 at 11:02 AM Tomas Rokicki <rokicki@gmail.com> wrote:
And here are the results after an overnight run.
At 34359738368 pts 3.28853583722957 area 0.129186219302995 perim 1.49118840781298
On Fri, Aug 9, 2019 at 10:49 PM Tomas Rokicki <rokicki@gmail.com> wrote:
It's easy to do, and I think I did it correctly. Here are the results I'm seeing. They aren't as nicely round. These values are for a unit tetrahedron. (I'm calculating them for a tetrahedron with edge length 2 sqrt 2, and then scaling the results down.)
At 268435456 pts 3.28851559385657 area 0.129189154723324 perim 1.49120946841637
On Fri, Aug 9, 2019 at 5:04 PM James Propp <jamespropp@gmail.com> wrote:
Can the software that gave accurate predictions for the cube be repurposed to predict properties (expected area, perimeter, and number of sides) for a random cross-section of a regular tetrahedron?
We can derive a prediction for the expected area by dividing the volume by the mean width, but I don’t know how to compute the expected perimeter; the method I described yesterday (for the cube) shows that it’s equal to pi / (4 sqrt(3)) times the expected number of sides, but I don’t know how to compute the expected number of sides.
Jim Propp _______________________________________________ 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/ --
-- -- 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
I haven’t had time to follow this, but I’d think one could take advantage of the fact that there is a periodic tiling of space by the octahedron and tetrahedron. -Veit
On Aug 12, 2019, at 3:31 AM, James Propp <jamespropp@gmail.com> wrote:
Lionel Levine suggests trying the octahedron in hope of finding some interesting duality phenomenon (maybe random planes cutting an octahedron have something to do with random lines cutting a cube while random lines cutting an octahedron have something to do with random planes cutting a cube).
Can someone try this too?
Thanks,
Jim Propp
Easy change. This is for a unit-edge icosahedron. At 268435456 pts 5.10427626222372 area 0.401024503683306 perim 2.31454808198346 On Mon, Aug 12, 2019 at 7:58 AM Veit Elser <ve10@cornell.edu> wrote:
I haven’t had time to follow this, but I’d think one could take advantage of the fact that there is a periodic tiling of space by the octahedron and tetrahedron.
-Veit
On Aug 12, 2019, at 3:31 AM, James Propp <jamespropp@gmail.com> wrote:
Lionel Levine suggests trying the octahedron in hope of finding some interesting duality phenomenon (maybe random planes cutting an octahedron have something to do with random lines cutting a cube while random lines cutting an octahedron have something to do with random planes cutting a cube).
Can someone try this too?
Thanks,
Jim Propp
_______________________________________________ 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/ --
Did you skip over the octahedron and jump to the icosahedron? Or was that a typo? Jim On Mon, Aug 12, 2019 at 11:27 AM Tomas Rokicki <rokicki@gmail.com> wrote:
Easy change. This is for a unit-edge icosahedron.
At 268435456 pts 5.10427626222372 area 0.401024503683306 perim 2.31454808198346
On Mon, Aug 12, 2019 at 7:58 AM Veit Elser <ve10@cornell.edu> wrote:
I haven’t had time to follow this, but I’d think one could take advantage of the fact that there is a periodic tiling of space by the octahedron and tetrahedron.
-Veit
On Aug 12, 2019, at 3:31 AM, James Propp <jamespropp@gmail.com> wrote:
Lionel Levine suggests trying the octahedron in hope of finding some interesting duality phenomenon (maybe random planes cutting an octahedron have something to do with random lines cutting a cube while random lines cutting an octahedron have something to do with random planes cutting a cube).
Can someone try this too?
Thanks,
Jim Propp
_______________________________________________ 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
Typo; sorry. It was octahedron. I don't plan to do the icosahedron or dodecahedron quite yet (but it would be a pity not to do them). The next step though would be to do as it was suggested; connect the results for the cube, tetrahedron, and octahedron based on that tiling of three-space. -tom On Mon, Aug 12, 2019 at 9:14 AM James Propp <jamespropp@gmail.com> wrote:
Did you skip over the octahedron and jump to the icosahedron? Or was that a typo?
Jim
On Mon, Aug 12, 2019 at 11:27 AM Tomas Rokicki <rokicki@gmail.com> wrote:
Easy change. This is for a unit-edge icosahedron.
At 268435456 pts 5.10427626222372 area 0.401024503683306 perim 2.31454808198346
On Mon, Aug 12, 2019 at 7:58 AM Veit Elser <ve10@cornell.edu> wrote:
I haven’t had time to follow this, but I’d think one could take advantage of the fact that there is a periodic tiling of space by the octahedron and tetrahedron.
-Veit
On Aug 12, 2019, at 3:31 AM, James Propp <jamespropp@gmail.com> wrote:
Lionel Levine suggests trying the octahedron in hope of finding some interesting duality phenomenon (maybe random planes cutting an octahedron have something to do with random lines cutting a cube while random lines cutting an octahedron have something to do with random planes cutting a cube).
Can someone try this too?
Thanks,
Jim Propp
_______________________________________________ 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
_______________________________________________ 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/ --
More Standard Mma Version 1.0 : https://0x0.st/zVe7.txt . After about 1 minute computation time, the numbers agree with Rokicki to 1 digit. The code also does higher symmetry polyhedra as well. When the translational degree of freedom is fixed to a random point on the one-boundary (or by symmetry, on an edge), the results are very close to the standard metric, which chooses a random point along the normal. It would be nice to have such a regular domain, where determining translation is as easy as choosing from a real unit interval. But again, what is the correct weight for the volume element? Cheers --Brad On Mon, Aug 12, 2019 at 11:58 AM Tomas Rokicki <rokicki@gmail.com> wrote:
Typo; sorry. On Mon, Aug 12, 2019 at 9:14 AM James Propp <jamespropp@gmail.com> wrote:
Did you skip over the octahedron and jump to the icosahedron? Or was that a typo?
participants (6)
-
Brad Klee -
Fred Lunnon -
James Propp -
Keith F. Lynch -
Tomas Rokicki -
Veit Elser