Determine angles as seen by observer

Share:

Description

Determine the angles (between three known points) as seen by an observer with a known position.

Usage

1
2
determine_angles(A, B, C, observer_position = c(0, 0), output_plot = TRUE,
  lines_in_plot = TRUE, angles_in_plot = TRUE, decimals_in_plot = 2)

Arguments

A

A point defined by a vector containing an x- and an y-coordinate

B

A point defined by a vector containing an x- and an y-coordinate

C

A point defined by a vector containing an x- and an y-coordinate

observer_position

A vector containing an x- and an y-coordinate

output_plot

Boolean variable indicating whether a plot should be created

lines_in_plot

Boolean variable indicating whether lines should be drawn in the plot

angles_in_plot

Boolean variable indicating whether the angles should be printet in the plot

decimals_in_plot

Integer indicating the number of decimals used

Value

The angles as seen by the observer expressed in radians.

Examples

1
2
3
4
determine_angles(A = c(0, 0), B = c(10, 0), C = c(5, 5), observer_position=c(4,1))

determine_angles(A = c(0, 0), B = c(10, 0), C = c(5, 5), observer_position=c(4,40),
angles_in_plot = FALSE)