On 2/10/11, Bill Gosper <billgosper@gmail.com> wrote:
wfl>On 2/7/11, Bill Gosper <billgosper@gmail.com wrote: ... WFL>If there is a connection with the original thread, I'm afraid it has escaped me.
Then I'm confused--I thought this was exactly what David requested. For the unit sphere, solid angle := area. If you place the apex of a pyramid at the center, the vertex angles will equal the great arcs on the surface. The base of an isosceles trapezoidal pyramid will project onto David's trapezoidal area. Is it clear that the area of a hinged quadrilateral abac is maximal when flexed into the isosceles configuration?
Is this all wrong? Irrelevant?
Apologies --- I did eventually understand the connection! My interpretation of the DW problem assumed that the fourth side was not already known, but required also to be computed --- leaving WFL and RWG initially at cross-purposes.
DW>When I worked at ComputerVision, I implemented an algorithm for polygonal area. For each edge of the polygon, I computed the area of the quadrilateral between the edge and its shadow on the x-axis via orthogonal projection. The edges were directed counterclockwise around the polygon, allowing computation of directed normals, the areas were added or subtracted according to whether the normal pointed toward or away from the x-axis. Adding up all these areas gave the area of the polygon.
Area of a triangle with given vertices (normalised homogeneous coordinates) P,Q,R is very elegant in DCQ geometric algebra: area (P,Q,R) = (1/2) sqrt( ||<P◦Q◦R>_1|| ) where X◦Y denotes dual Clifford product, <X>_1 vector part, ||X|| magnitude. Splitting a cyclically-ordered convex polygon into triangles is straightforward; but trickier situations arise otherwise, particularly when it has self-intersections. I've uploaded an intro to geometric algebra DCQ_teabag.pdf to GoogleDocs at https://docs.google.com/leaf?id=0B6QR93hqu1AhZGY1NGYzNTktMzAzOC00ZDRlLWEzMzM... Any feedback would be welcome!
(rwg)>I sent this to the kids a few months ago. Probably shoulda cc'ed math-fun: -------------- Subj: That Im[z w*] trick is really handy. Here's the area of an arbitrary polygon: In[100]:=area[L_List]:=Total[MapThread[Im[#1\[Conjugate]*#2]&,{L,RotateLeft[L]}]]/2
E.g., the b x h triangle in general position: In[104]:= FullSimplify[ ComplexExpand[area[z+E^(I*t)*{0,b,h*I+x}]],{b,h,x,t}\[Element]Reals]
Out[104]= (b h)/2
In[99]:= Area[Pentagon]
Out[99]= 5/(4 Sqrt[5 - 2 Sqrt[5]])
In[106]:= area[Table[Exp[2*k*I*\[Pi]/5]/2/Sin[\[Pi]/5], {k, 5}]]
Out[106]= (5 Sqrt[5/8 + Sqrt[5]/8])/(8 (5/8 - Sqrt[5]/8))
In[107]:= FullSimplify[% - %99]
Out[107]= 0 --------------
--rwg
This looks remarkably economical, but too cryptic for me to work out exactly what's going. You seem to be working in complex cartesian 3-space coordinates --- are there any references available for your "Im[z w*] trick" ? WFL