rm(list=ls()) require(mvtnorm) targetLocation<-t(c(0,0)) par(bg = "white") plot(-10:10,-10:10,type="n",xlab="Longitudinal Distance From Target",ylab="Latitudinal Distance From Target") rect(par("usr")[1],par("usr")[3],par("usr")[2],par("usr")[4],col="wheat") covarMatrix<-matrix(c(2,1,1,2),ncol=2) x<-rmvnorm(n=1,mean=c(1,1),sigma=covarMatrix,method="chol") grid(nx=NULL,ny=NULL,col="grey",lty="dotted",equilogs=TRUE) points(x,cex=2,col="red",lwd=2) points(x,cex=4,col="orange",lwd=2) points(x,cex=6,col="yellow",lwd=2) points(x,cex=8,col="green",lwd=2) points(x,cex=10,col="lightblue",lwd=2) points(targetLocation,cex=3,pch=13,col="black",lwd=2) x1<-seq(3,11,0.1) x2<-seq(-10,3,0.1) y1<-0.8*x1-7 y2<-1.5*x2-9.1 points(x1,y1,col="blue",cex=1,pch=20) points(x2,y2,col="blue",cex=1,pch=20) polygon(c(x1,x1[length(x1)]), c(y1, y1[1]), col="blue") polygon(c(x2,x2[length(x2)]), c(y2, y2[1]), col="blue") polygon(c(3,11,11,3),c(-4.6,-4.6,-24.1,-24.1),col="blue") legend("top",pch=c(13,1,1),col=c("black","red","lightblue"),c("Target Location","Location of Missle Impact","Missle Blast Area")) points(8,-8,col="white",cex=2,pch=19)