| in.circle | R Documentation |
Checks if the point p lies
in the circle with center cent and radius rad,
denoted as C(cent,rad).
So, it returns 1 or TRUE if p is
inside the circle, and 0 otherwise.
boundary is a logical argument (default=FALSE)
to include boundary or not, so if it is TRUE,
the function checks if the point, p,
lies in the closure of the circle (i.e., interior and
boundary combined) else it checks
if p lies in the interior of the circle.
in.circle(p, cent, rad, boundary = TRUE)
p |
A 2D point to be checked whether it is inside the circle or not. |
cent |
A 2D point in Cartesian coordinates which serves as the center of the circle. |
rad |
A positive real number which serves as the radius of the circle. |
boundary |
A logical parameter (default= |
Indicator for the point p being
inside the circle or not, i.e., returns 1 or TRUE
if p is inside the circle, and 0 otherwise.
Elvan Ceyhan
in.triangle, in.tetrahedron, and
on.convex.hull from the interp package
for documentation for in.convex.hull
## Not run:
cent<-c(1,1); rad<-1; p<-c(1.4,1.2)
#try also cent<-runif(2); rad<-runif(1); p<-runif(2);
in.circle(p,cent,rad)
p<-c(.4,-.2)
in.circle(p,cent,rad)
p<-c(1,0)
in.circle(p,cent,rad)
in.circle(p,cent,rad,boundary=FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.