<!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: The indicator for the presence of an arc from a point in set...</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 IarcPEset2pnt.std.tri"><tr><td>IarcPEset2pnt.std.tri</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>The indicator for the presence of an arc from a point
in set <code>S</code> to the point <code>p</code> or
Proportional Edge Proximity Catch Digraphs (PE-PCDs) -
standard equilateral triangle case</h2>

<h3>Description</h3>

<p>Returns <i>I(</i><code>p</code> in <i>N_{PE}(x,r)</i>
for some <i>x</i> in <code>S</code><i>)</i>
for <code>S</code>, in the standard equilateral triangle,
that is, returns 1 if <code>p</code> is in <i>\cup_{x in S}N_{PE}(x,r)</i>,
and returns 0 otherwise.
</p>
<p>PE proximity region is constructed
with respect to the standard equilateral triangle
<i>T_e=T(A,B,C)=T((0,0),(1,0),(1/2,&radic;{3}/2))</i>
with the expansion parameter <i>r &ge; 1</i>
and vertex regions are based
on center <i>M=(m_1,m_2)</i> in Cartesian coordinates
or <i>M=(&alpha;,&beta;,&gamma;)</i>
in barycentric coordinates in the interior of <i>T_e</i>;
default is <i>M=(1,1,1)</i>,
i.e., the center of mass of <i>T_e</i>
(which is equivalent to the circumcenter for <i>T_e</i>).
</p>
<p>Vertices of <i>T_e</i> are also labeled as 1, 2, and 3,
respectively.
If <code>p</code> is not in <code>S</code> and either <code>p</code>
or all points in <code>S</code> are outside <i>T_e</i>, it returns 0,
but if <code>p</code> is in <code>S</code>,
then it always returns 1 regardless of its location
(i.e., loops are allowed).
</p>


<h3>Usage</h3>

<pre>
IarcPEset2pnt.std.tri(S, p, r, M = c(1, 1, 1))
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>S</code></td>
<td>
<p>A set of 2D points.
Presence of an arc from a point in <code>S</code> to point <code>p</code> is checked
by the function.</p>
</td></tr>
<tr valign="top"><td><code>p</code></td>
<td>
<p>A 2D point.
Presence of an arc from a point in <code>S</code> to point <code>p</code> is checked
by the function.</p>
</td></tr>
<tr valign="top"><td><code>r</code></td>
<td>
<p>A positive real number
which serves as the expansion parameter in PE proximity region in the
standard equilateral triangle <i>T_e=T((0,0),(1,0),(1/2,&radic;{3}/2))</i>;
must be <i>&ge; 1</i>.</p>
</td></tr>
<tr valign="top"><td><code>M</code></td>
<td>
<p>A 2D point in Cartesian coordinates
or a 3D point in barycentric coordinates
which serves as a center
in the interior of the standard equilateral triangle <i>T_e</i>;
default is <i>M=(1,1,1)</i>
i.e., the center of mass of <i>T_e</i>.</p>
</td></tr>
</table>


<h3>Value</h3>

<p><i>I(</i><code>p</code> is in <i>U_{x in S} N_{PE}(x,r))</i>
for <code>S</code> in the standard equilateral triangle,
that is, returns 1 if <code>p</code> is in <code>S</code>
or inside <i>N_{PE}(x,r)</i> for at least
one <i>x</i> in <code>S</code>, and returns 0 otherwise.
PE proximity region is constructed with respect to the standard
equilateral triangle <i>T_e=T(A,B,C)=T((0,0),(1,0),(1/2,&radic;{3}/2))</i>
with <code>M</code>-vertex regions
</p>


<h3>Author(s)</h3>

<p>Elvan Ceyhan
</p>


<h3>See Also</h3>

<p><code>IarcPEset2pnt.tri</code>, <code>IarcPEstd.tri</code>,
<code>IarcPEtri</code>, and <code>IarcCSset2pnt.std.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;-10

set.seed(1)
Xp&lt;-runif.std.tri(n)$gen.points

M&lt;-as.numeric(runif.std.tri(1)$g)  #try also M&lt;-c(.6,.2)

r&lt;-1.5

S&lt;-rbind(Xp[1,],Xp[2,])  #try also S&lt;-c(.5,.5)
IarcPEset2pnt.std.tri(S,Xp[3,],r,M)
IarcPEset2pnt.std.tri(S,Xp[3,],r=1,M)

S&lt;-rbind(Xp[1,],Xp[2,],Xp[3,],Xp[5,])
IarcPEset2pnt.std.tri(S,Xp[3,],r,M)

IarcPEset2pnt.std.tri(S,Xp[6,],r,M)
IarcPEset2pnt.std.tri(S,Xp[6,],r=1.25,M)

P&lt;-c(.4,.2)
S&lt;-Xp[c(1,3,4),]
IarcPEset2pnt.std.tri(Xp,P,r,M)


</pre>


</body></html>
