{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Oil Spill Problem

Oil Spill Problem - #Draw the Gulf GULF<...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: #Draw the Gulf # GULF <- function(title,loco,radius) G { op <- par(bg = "white") x <- seq(-1,1, len=61) l y <- seq(-radius,radius, len=610) #R needs to know bounds of graphic. plot(c(x,x), c(sqrt(1-(x)^2),-sqrt(1-(x)^2)), type="n", c main=title,ylab="Y",xlab="X") #upper part of outer circle o lines(x, sqrt(1-(x)^2), type="l", pch=21, bg=par("bg"), col = "blue", cex=.6) #lower part of outer circle # z = x[1:30] lines(z, -sqrt(1-(z)^2), type="l", pch=21, bg=par("bg"), col = "blue", cex=.6) b #upper part of outer circle lines(y, sqrt(radius^2-(y)^2), type="l", t pch=21, bg=par("bg"), col = "black", cex=.6) #upper part of outer circle lines(y, -sqrt(radius^2-(y)^2), type="l",- pch=21, bg=par("bg"), col = "black", cex=.6) par(op) } #Draw the Gulf # CIRCLE <- function(title,loco,radius) C { op <- par(bg = "white") x <- seq(-1,1, len=61) l y <- seq(-radius,radius, len=610) #R needs to know bounds of graphic. plot(c(x,x), c(sqrt(1-(x)^2),-sqrt(1-(x)^2)), type="n", c main=title,ylab="Y",xlab="X")...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online