-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rhistory
47 lines (47 loc) · 1.18 KB
/
.Rhistory
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
eqtri_df <- tibble(
x = c(0, sqrt(3) / 2, -sqrt(3) / 2),
y = c(1, -0.5, -0.5),
xend = c(sqrt(3) / 2, -sqrt(3) / 2, 0),
yend = c(-0.5, -0.5, 1)
)
# Instruction to students: You may clear the code in this file and replace it
# with your own.
library(tidyverse)
library(ggforce)
theme_set(theme_void())
# Coordinates of equilateral triangle
eqtri_df <- tibble(
x = c(0, sqrt(3) / 2, -sqrt(3) / 2),
y = c(1, -0.5, -0.5),
xend = c(sqrt(3) / 2, -sqrt(3) / 2, 0),
yend = c(-0.5, -0.5, 1)
)
# Coordinates of random chord
rdmchr_df <- tibble(
x = 0.93636368,
y = 0.35103142,
xend = -0.9999991,
yend = -0.001326758
)
eqtri_df <- tibble(
x = c(0, sqrt(3) / 2, -sqrt(3) / 2),
y = c(1, -0.5, -0.5),
xend = c(sqrt(3) / 2, -sqrt(3) / 2, 0),
yend = c(-0.5, -0.5, 1)
)
x=
x?
x
# Instruction to students: You may clear the code in this file and replace it
# with your own.
library(tidyverse)
library(ggforce)
theme_set(theme_void())
# Draw a random chord in a unit circle centred at origin -----------------------
# Coordinates of equilateral triangle
eqtri_df <- tibble(
x = c(0, sqrt(3) / 2, -sqrt(3) / 2),
y = c(1, -0.5, -0.5),
xend = c(sqrt(3) / 2, -sqrt(3) / 2, 0),
yend = c(-0.5, -0.5, 1)
)