Timeline for Generate a Random Polygon
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 22, 2013 at 10:36 | vote | accept | Herng Yi | ||
Sep 22, 2013 at 7:43 | comment | added | Mr.Wizard |
@HerngYi Yes, that's exactly what it does. You can select @@ in the Front End and press F1 key to bring up the page for Apply. You could also use this reference to find the same page.
|
|
Sep 22, 2013 at 5:21 | comment | added | Herng Yi |
Sorry but I couldn't find the documentation on the @@ operator - does it do something like replacing the header of an expression? Would be great if you could link me to some documentation on this.
|
|
Sep 22, 2013 at 4:23 | comment | added | E.O. |
@HerngYi you can extract the coordinates using List @@ randompoly
|
|
Sep 22, 2013 at 3:47 | comment | added | Herng Yi |
the output polygons of randompoly also seem to have a "fat center" as compared to the output of @ybeltukov's answer. But I see this as a minor issue.
|
|
Sep 22, 2013 at 3:08 | comment | added | Herng Yi |
I have tested your code and it works, but the output of randompoly is not a list poly = {pt1, ..., ptn} of 2D coordinates, but a graphics primitive Polygon[poly] . This hinders manipulation of the output polygon, unless there is a way to "unwrap" the raw data from Polygon ?
|
|
Sep 21, 2013 at 9:43 | history | edited | Simon Woods | CC BY-SA 3.0 |
added 686 characters in body
|
Sep 21, 2013 at 9:34 | history | answered | Simon Woods | CC BY-SA 3.0 |