# PLOTplane: Plot Plane on box In geophys: Geophysics, Continuum Mechanics, Mogi Models, Gravity

## Description

Plot Plane on box

## Usage

 `1` ```PLOTplane(Rp, planecol = "brown") ```

## Arguments

 `Rp` Rotated points `planecol` color for plotting plane

## Author(s)

Jonathan M. Lees<[email protected]>

 ``` 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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68``` ```####### set colors axcol = 'black' boxcol = 'blue' planecol = 'brown' #### view angle Rview = RFOC::ROTZ(-130) ### set arbitrary scale xscale = 100 #### set three points and combine them with rbind P1 = xscale*c(.2, 1,1,0) P2 = xscale*c(1, .1,1,0) P3 = xscale*c(1, 1,.4,0) PPs = rbind(P1, P2, P3) ### convert points for view Rp = PPs ### 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') ############## plot the plane PLOTplane(Rp) P1 = xscale*c(0, 0,.4,0) P2 = xscale*c(0.8, 0,0,0) P3 = xscale*c(0, .7, 0 ,0) PPs = rbind(P1, P2, P3) ### convert points for view Rp = PPs PLOTplane(Rp, planecol = "gold" ) ```