Skip to content

Commit

Permalink
Update vertices in tetraplot [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisaloo committed Nov 24, 2019
1 parent 95a2b8f commit 2cfb96f
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions R/tetraplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,9 @@ tetraplot <- function(tcsdata, theta = 45, phi = 10, perspective = FALSE,


# tetrahedron vertices
verts <- matrix(c(
0, 0, 0.75,
(-0.5 * sqrt(1.5)), (-1 / (2 * sqrt(2))), -0.25,
0, (1 / sqrt(2)), -0.25,
(0.5 * sqrt(1.5)), (-1 / (2 * sqrt(2))), -0.25
),
byrow = TRUE, nrow = 4,
dimnames = list(c("u", "s", "m", "l"), c("x", "y", "z"))
)
verts <- simplex(4)
colnames(verts) <- c("x", "y", "z")
rownames(verts) <- c("u", "s", "m", "l")

# combinations of vertices to make facets
sides <- verts[combn(seq_len(4), 2), ]
Expand Down

0 comments on commit 2cfb96f

Please sign in to comment.