Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    $\begingroup$ You can use Complex @@@ r in place of PointToComplex /@ polygon, etc., I believe. $\endgroup$ Commented Aug 14, 2012 at 13:40
  • 2
    $\begingroup$ @Mr. Wizard, if they're explicitly numbers (i.e. passes NumberQ[] but not NumericQ[]). Complex @@ {1, Pi} won't work, for instance. $\endgroup$ Commented Aug 14, 2012 at 15:34
  • 1
    $\begingroup$ I think this is the first time that code has made me laugh (at least for positive reasons), so +1! $\endgroup$ Commented Aug 14, 2012 at 15:57
  • $\begingroup$ @Mr.Wizard Thanks for the hint! Applying Complex didn't cross my mind when i wrote the code. @J.M. interesting detail, never looked at how Mathematica handles complex number representation! $\endgroup$ Commented Aug 15, 2012 at 8:32
  • $\begingroup$ @acl Ha, glad to hear that :) was definitely worth posting then ;) $\endgroup$ Commented Aug 16, 2012 at 22:48