circle_line_intersections: Generates a set of intersection points between the cirlce and...

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

circle_line_intersections computes the intersections points of a given circle with the grid lines along with the angle formed with the x-axis.

Usage

1
circle_line_intersections(circle_x, circle_y, r, n_line, grid_lines)

Arguments

circle_x, circle_y

The the euclidean coordinates of the center of the circle.

r

The radius of the given circle.

n_line

The number of grid lines.

grid_lines

A 6 columns data frame with columns names as coor_x_1, coor_y_1, coor_x_2, coor_y_2, orient_line.

coor_x_1, coor_y_1

Coordinates of the left end point of the grid line

coor_x_2, coor_y_2

Coordinates of the right end point of the grid line

orient_line

Line orientation

  1. indicates horizontal orientation

  2. indicates vetical orientation

k_line

Line numbering: bottom to top, then left to right

Value

It returns a three columns data frame containing x-coordinate, y-coordanate of the intersection of the circle with the grid, and the value of the angle betweem the x-axis and the line joining the center of the circle to the corresponding intersection point.

Examples

1
2
3
4
data(grid_line)
attach(grid_line)
circle_line_intersections(2022230,-3123109,10000,39,grid_line)
detach(grid_line)

holaanna/contactsimulator documentation built on Dec. 2, 2019, 2:39 a.m.