# Need help to create a eqn to obtain a 3d surface plot where FT = 60 cm and e = 6 cm.

Something like this

``````make_eqn <- function(sq_e,FT,eta,delta) 1/(sq_e^2*sqrt(2*pi)) * FT/eta * 1/(2*sq_e^2) * (-FT*delta/eta)^2

make_eqn(6,60,1,1)
#>  33.24519
``````

Thankyou @technocrat

I don't have experience in 3d plotting, but this might get you started.

``````library(rgl)

find_z <- function(x,y) make_eqn(6,60,x,y)

make_eqn <- function(sq_e,FT,eta,delta) 1/(sq_e^2*sqrt(2*pi)) * FT/eta * 1/(2*sq_e^2) * (-FT*delta/eta)^2

x <- -10:10
y <- 10:30
z <- find_z(-10:10,10:30)

# remove element 11 from x, y and z

x <- x[-which(z == Inf)]
y <- y[-which(z == Inf)]
z <- z[-which(z == Inf)]

p <- plot3d(x,y,z, type = 's', size = 0.5, lit = FALSE)
rgl.snapshot("example.png", fmt = "png")
``````

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.