<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Generation of points associated (in a Type II fashion) with...</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="https://rpkg.net/assets/examples.css" />
</head><body>

<table width="100%" summary="page for rassocII.std.tri"><tr><td>rassocII.std.tri</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Generation of points associated (in a Type II fashion)
with the edges of <i>T_e</i></h2>

<h3>Description</h3>

<p>An object of class <code>"Patterns"</code>.
Generates <code>n</code> points uniformly
in the standard equilateral triangle
<i>T_e=T((0,0),(1,0),(1/2,&radic;{3}/2))</i>
under the type II association alternative for <code>eps</code>
in <i>(0,&radic;{3}/6=0.2886751]</i>.
</p>
<p>In the type II association, the annular allowed regions
around the edges are determined by
the parameter <code>eps</code>
where <i>&radic;{3}/6</i>-<code>eps</code> is the distance
from the interior triangle
(i.e., forbidden region for association) to <i>T_e</i>
(see examples for a sample plot.)
</p>


<h3>Usage</h3>

<pre>
rassocII.std.tri(n, eps)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>n</code></td>
<td>
<p>A positive integer
representing the number of points to be generated.</p>
</td></tr>
<tr valign="top"><td><code>eps</code></td>
<td>
<p>A positive real number
representing the parameter of type II association
(where <i>&radic;{3}/6</i>-<code>eps</code>
is the distance from the interior triangle distance
from the interior triangle to <i>T_e</i>).</p>
</td></tr>
</table>


<h3>Value</h3>

<p>A <code>list</code> with the elements
</p>
<table summary="R valueblock">
<tr valign="top"><td><code>type</code></td>
<td>
<p>The type of the point pattern</p>
</td></tr>
<tr valign="top"><td><code>mtitle</code></td>
<td>
<p>The <code>"main"</code> title
for the plot of the point pattern</p>
</td></tr>
<tr valign="top"><td><code>parameters</code></td>
<td>
<p>The attraction parameter, <code>eps</code>,
of the association pattern,
where <i>&radic;{3}/6</i>-<code>eps</code>
is the distance from the interior triangle to <i>T_e</i></p>
</td></tr>
<tr valign="top"><td><code>ref.points</code></td>
<td>
<p>The input set of points <code>Y</code>;
reference points, i.e.,
points with which generated points are associated
(i.e., vertices of <i>T_e</i>).</p>
</td></tr>
<tr valign="top"><td><code>gen.points</code></td>
<td>
<p>The output set of generated points associated
with <code>Y</code> points (i.e., edges of <i>T_e</i>).</p>
</td></tr>
<tr valign="top"><td><code>tri.Y</code></td>
<td>
<p>Logical output for triangulation
based on <code>Y</code> points should be implemented or not.
if <code>TRUE</code> triangulation based on <code>Y</code> points is
to be implemented (default is set to <code>FALSE</code>).</p>
</td></tr>
<tr valign="top"><td><code>desc.pat</code></td>
<td>
<p>Description of the point pattern</p>
</td></tr>
<tr valign="top"><td><code>num.points</code></td>
<td>
<p>The <code>vector</code> of two numbers,
which are the number of generated points and
the number of reference (i.e., <code>Y</code>) points,
which is 3 here.</p>
</td></tr>
<tr valign="top"><td><code>xlimit,ylimit</code></td>
<td>
<p>The ranges of the <i>x</i>-
and <i>y</i>-coordinates of the reference points,
which are the vertices of <i>T_e</i> here.</p>
</td></tr>
</table>


<h3>Author(s)</h3>

<p>Elvan Ceyhan
</p>


<h3>See Also</h3>

<p><code>rseg.circular</code>, <code>rassoc.circular</code>,
<code>rsegII.std.tri</code>, and <code>rseg.multi.tri</code>
</p>


<h3>Examples</h3>

<pre>

A&lt;-c(0,0); B&lt;-c(1,0); C&lt;-c(1/2,sqrt(3)/2);
Te&lt;-rbind(A,B,C);
n&lt;-100  #try also n&lt;-20 or n&lt;-100 or 1000
eps&lt;-.2  #try also .25, .1

set.seed(1)
Xdt&lt;-rassocII.std.tri(n,eps)
Xdt
summary(Xdt)
plot(Xdt,asp=1)

Xlim&lt;-range(Te[,1])
Ylim&lt;-range(Te[,2])
xd&lt;-Xlim[2]-Xlim[1]
yd&lt;-Ylim[2]-Ylim[1]

Xp&lt;-Xdt$gen.points
plot(Te,pch=".",xlab="",ylab="",
main="Type II association in the \n standard equilateral triangle",
     xlim=Xlim+xd*c(-.01,.01),ylim=Ylim+yd*c(-.01,.01))
polygon(Te)
points(Xp)

#The support for the Type II association alternative
A1&lt;-c(1/2-eps*sqrt(3),sqrt(3)/6-eps);
B1&lt;-c(1/2+eps*sqrt(3),sqrt(3)/6-eps);
C1&lt;-c(1/2,sqrt(3)/6+2*eps);
supp&lt;-rbind(A1,B1,C1)

plot(Te,asp=1,pch=".",xlab="",ylab="",
main="Support of the Type II Association",
xlim=Xlim+xd*c(-.01,.01),ylim=Ylim+yd*c(-.01,.01))
polygon(Te,col=5)
polygon(supp,col=0)
points(Xp)


</pre>


</body></html>
