Last chance! 50% off unlimited learning
Sale ends in
This command draws a three dimensional tropical polytope
draw.tpolytope.3d(D, col_lines, col_verts, plot = TRUE, tadd = max)draw.tpolytope.2d(D, col_lines, col_verts, plot = TRUE, tadd = max)
2-D or 3-D rendering of a tropical polytope.
matrix of vertices of a tropical polytope; rows are the vertices
string; color to render the polytope.
string; color to render the vertices.
logical; initiate new plot visualization or not.
function; max indicates max-plus addition, min indicates min-plus addition. Defaults to max
Ruriko Yoshida ryoshida@nps.edu
D <-matrix(c(0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),4,4,TRUE)
col_lines<-'blue'
col_verts<-'red'
draw.tpolytope.3d(D,col_lines,col_verts,plot=TRUE)
draw.tpolytope.3d(D,col_lines,col_verts,plot=TRUE,tadd=min)
D <- matrix(c(0,-2,2,0,-2,5,0,2,1,0,1,-1),4,3,TRUE)
col_lines <- 'blue'
col_verts <- 'red'
draw.tpolytope.2d(D,col_lines,col_verts,plot=TRUE)
draw.tpolytope.2d(D,col_lines,col_verts,plot=TRUE,tadd=min)
Run the code above in your browser using DataLab