Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x0 <- 1.9
- y0 <- -0.3
- r <- 0.5
- f <- function(x,y)
- x^3-4*x*y^2-2*x^2*y-3*x*y+2*y^3+3*x
- x <- seq(x0-r,x0+r,r/100)
- y <- seq(y0-r,y0+r,r/100)
- z <- outer(x,y,f)
- t <- seq(0,2*pi,0.01)
- contour(x,y,z,asp=1,nlevels=20)
- lines(2*cos(t),sin(t),col="red")
- locator(1)
- f(2,-0.25)
- x0 <- -0.5
- y0 <- 1
- r <- 0.5
- f <- function(x,y)
- x^3-4*x*y^2-2*x^2*y-3*x*y+2*y^3+3*x
- x <- seq(x0-r,x0+r,r/100)
- y <- seq(y0-r,y0+r,r/100)
- z <- outer(x,y,f)
- t <- seq(0,2*pi,0.01)
- contour(x,y,z,asp=1,nlevels=20)
- lines(2*cos(t),sin(t),col="red")
- locator(1)
- f(-0.4,1)
- x0 <- 1.9
- y0 <- -0.3
- r <- 0.5
- f <- function(x,y)
- x^3-4*x*y^2-2*x^2*y-3*x*y+2*y^3+3*x
- x <- seq(x0-r,x0+r,r/100)
- y <- seq(y0-r,y0+r,r/100)
- z <- outer(x,y,f)
- t <- seq(0,2*pi,0.01)
- contour(x,y,z,asp=1,nlevels=20)
- lines(2*cos(t),sin(t),col="red")
- locator(1)
- f(2,-0.25)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement