title: 3d graph with contours lines
body: <p>How add the contours under the graph using the R as in plot 2?
  I've searched a lot on the internet and found no example of how to do it in R! Is there any function or package to add the outline along with the chart?</p>
  
  <pre><code>#Function density probability
  library(pbivnorm)
  bsb &lt;- function(t1,t2){
  a1 &lt;- sqrt(phi1/2)*(sqrt(((phi1+1)*t1)/(phi1*mu1))-sqrt(((phi1*mu1)/((phi1+1)*t1))))
    a2 &lt;- sqrt(phi2/2)*(sqrt(((phi2+1)*t2)/(phi2*mu2))-sqrt(((phi2*mu2)/((phi2+1)*t2))))
    Phi2 &lt;- pbivnorm(a1, a2, rho, recycle = TRUE)
    b1 &lt;- ((phi1+1)/(2*phi1*mu1))*sqrt(phi1/2)*(((phi1*mu1)/((phi1+1)*t1))^(1/2)+((phi1*mu1)/((phi1+1)*t1))^(3/2))
    b2 &lt;- ((phi2+1)/(2*phi2*mu2))*sqrt(phi2/2)*(((phi2*mu2)/((phi2+1)*t2))^(1/2)+((phi2*mu2)/((phi2+1)*t2))^(3/2))
    fdp &lt;- Phi2*b1*b2
    return(fdp)
  }
  t1 &lt;- seq(0.001,5,length=100)
  t2 &lt;- seq(0.001,5,length=100)
  #Parameters
  mu1=5
  phi1=2
  mu2=5
  phi2=2
  rho=0.9
  
  z&lt;-outer(t1,t2,bsb) # calculate density values
  
  persp(t1, t2, z, # 3-D plot
        main="Bivariate Birnbaum-Saunders",
        col="lightgray",
        theta=40, phi=10,
        r=10,
        d=0.9,
        expand=0.5,
        ltheta=90, lphi=80,
        shade=0.9,
        ticktype="detailed",
        nticks=5) 
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/mzmWh.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mzmWh.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/79iB3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/79iB3.jpg" alt="enter image description here"></a></p>