Description Usage Arguments Value Author(s) See Also Examples
Plot 3D box
1 | PLOTbox(Rax, Rbox, axcol = "black", boxcol = "blue")
|
Rax |
rotated axes |
Rbox |
rotated box |
axcol |
axes color |
boxcol |
box color |
Graphical Side effects
Jonathan M. Lees<jonathan.lees@unc.edu>
pstart, PLOTplane, stress, NORMvec
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 | ####### set colors
axcol = 'black'
boxcol = 'blue'
planecol = 'brown'
#### view angle
Rview = RFOC::ROTZ(-130)
### set arbitrary scale
xscale = 100
### create box and scale it
BOX <-matrix(c(0,0,0,0,
0, 1, 0,0,
0, 1, 1,0,
0, 0, 1,0,
1,0,0,0,
1, 1, 0,0,
1, 1, 1,0,
1, 0, 1,0), ncol=4, byrow=TRUE)
BOX = xscale*BOX
############## create axes and scale them
AX = matrix(c(0,0,0,0,
1, 0, 0,0,
0, 0, 0,0,
0, 1, 0,0,
0,0,0,0,
0, 0, 1,0), ncol=4, byrow=TRUE)
AX = 1.5*xscale*AX
############## rotate axes and box
Rax = AX
Rbox = BOX
############## start the figure
pstart(xscale=xscale)
###### plot the box
PLOTbox(Rax, Rbox, axcol= 'black', boxcol= 'blue')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.