library(plot3D)
fn = makeRastriginFunction(dimensions = 2L)
if (FALSE) {
# use the plot3D::persp3D method (default behaviour)
plot3D(fn)
plot3D(fn, contour = TRUE)
plot3D(fn, image = TRUE, phi = 30)
# use plotly::plot_ly for interactive plot
plot3D(fn, package = "plotly")
}
Run the code above in your browser using DataLab