1
$\begingroup$

Graphics`Mesh`SimplePolygonQ is an undocumented function. I'm using Mathematica 7, and when I try:

Graphics`Mesh`SimplePolygonQ[{{1, 0}, {0, Sqrt[3]}, {-1, 0}}] 

I just get:

Graphics`Mesh`SimplePolygonQ[{{1, 0}, {0, $\sqrt{3}$, {-1, 0}}]

I posted a question and a respondent successfully used this function in the code of her answer. Does anyone else have trouble using this function? Any ideas why it won't work for me?

$\endgroup$
  • $\begingroup$ It takes a Polygon[] object as an argument. $\endgroup$ – J. M. is away May 19 '13 at 18:03
  • $\begingroup$ @J.M.: p = Polygon[{{1, 0}, {0, Sqrt[3]}, {-1, 0}}] GraphicsMeshSimplePolygonQ[p] Out[]:= GraphicsMeshSimplePolygonQ[Polygon[{{1, 0}, {0, Sqrt[3]}, {-1, 0}}]] $\endgroup$ – jnthn May 19 '13 at 18:08
  • $\begingroup$ What version of Mathematica are you using? $\endgroup$ – J. M. is away May 19 '13 at 18:10
  • 1
    $\begingroup$ Sorry I didn't realize this function is not available in version 7. (I thought it would be a fundamental one existing there long ago..) In that case maybe you have to implement the function yourself. For your reference, there are some relevant posts like this and this. $\endgroup$ – Silvia May 19 '13 at 18:41
  • 1
    $\begingroup$ It would be worth checking if version 7 has Graphics`Mesh`IntersectQ $\endgroup$ – Simon Woods May 20 '13 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.