•Quadrilateral example

In[74]:=

points = {{0, 0}, {1, 0}, {3/2, 1}, {-1/2, 1/4}} ; connect = {{1, 2, 3, 4}} ;  pts = Part[points, connect[[1]]] ; areas = Apply[area, Partition[pts, 3, 1, {2}], {1}] ;

In[78]:=

convex[x, y] // Simplify

Out[78]=

{-((7 + 6 x - 16 y) (-2 + 2 x - y))/(14 + 12 x + 59 y), (2 (7 + 6 x - 16 y) (x + 2 y))/(14 + 12 x + 59 y), (26 y (x + 2 y))/(14 + 12 x + 59 y), -(28 (-2 + 2 x - y) y)/(14 + 12 x + 59 y)}

•Compile function
•Show

In[62]:=

quad = Show[pContour,  Graphics[Flatten[{{RGBColor[1, 1, 1]}, {mask[pts]}}]], Graphics[Flatten[{{PointSize[.02]}, {outline[pts], name[pts], nodes[pts]}}]], PlotRange -> All, Frame -> False, AspectRatio -> 1, DisplayFunction -> $DisplayFunction]

[Graphics:../HTMLFiles/index_58.gif]

Out[62]=

-Graphics -


Converted by Mathematica  (March 7, 2003)