library(plotly)
## Loading required package: ggplot2
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
plot_ly(z = ~volcano) |> add_surface()
y <- x <- seq(-5,5,l=100)
z <- dnorm(x)%*%t(dnorm(y))
data.frame(x = x, y = y, z = z) |>
  plot_ly(x = ~x, y=~y, z = ~z) |> add_surface()