regular pentagon

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

regular pentagon

yuanzhi
Hello, everyone,

Do you have any idea to get a set of random points within a regular
pentagon? Thanks in advance!

Yuanzhi

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: regular pentagon

Bert Gunter
Is this homework? We don't do homework here.

-- Bert

Oh, and my answer is yes I do.

Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
H. Gilbert Welch




On Fri, Mar 7, 2014 at 1:22 PM, Yuanzhi Li <[hidden email]> wrote:

> Hello, everyone,
>
> Do you have any idea to get a set of random points within a regular
> pentagon? Thanks in advance!
>
> Yuanzhi
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: regular pentagon

Rolf Turner
In reply to this post by yuanzhi
On 08/03/14 10:22, Yuanzhi Li wrote:
> Hello, everyone,
>
> Do you have any idea to get a set of random points within a regular
> pentagon? Thanks in advance!

You can easily do this using the spatstat package.

cheers,

Rolf Turner

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: regular pentagon

barry rowlingson
In reply to this post by yuanzhi
On Sun, Mar 9, 2014 at 5:11 AM, Rolf Turner <[hidden email]> wrote:

> On 08/03/14 10:22, Yuanzhi Li wrote:
> > Hello, everyone,
> >
> > Do you have any idea to get a set of random points within a regular
> > pentagon? Thanks in advance!
>
> You can easily do this using the spatstat package.
>

 Or with sines, cosines, and 72 degrees. Generate points in a triangle and
apply a random (0,4) integer multiple of 72 rotation....

 Never mind asking us if we have any idea, do you (original poster) have
any idea?

Barry

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.