Consider the following 3D surface graphs created using the tikz-3dplot
package:
\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usepackage{caption}
\usepackage{subcaption}
\usepackage[outline]{contour}
\contourlength{0.05em}
\begin{document}
\begin{figure}[ht]
\hfill
\begin{subfigure}{.333333\linewidth}
\centering
\tdplotsetmaincoords{70}{-22.5}
\begin{tikzpicture}[scale=2.8,tdplot_main_coords]
\foreach \index in {1,...,9}
{\draw[domain=0:1,smooth]
plot
(\x,\index/10,
{\x*\index/10*(\x+\index/10-\x*\index/10)});
\draw[domain=0:1,smooth]
plot
(\index/10,\x,
{\x*\index/10*(\x+\index/10-\x*\index/10)});}
\draw
(0,1,0) -- (1,1,1) -- (1,0,0);
\draw[dashed]
(0,0,1) node[left] {$1$} --
(1,0,1) -- (1,1,1) -- (0,1,1) -- cycle;
\draw[dashed]
(1,0,1) -- (1,0,0) node[below] {$1\mathstrut$};
\draw[dashed]
(0,1,1) -- (0,1,0) node[below] {$1\mathstrut$};
\draw[thick,latex-latex]
(0,1.2,0) node[below] {$v\mathstrut$} --
(0,0,0) node[below] {$O\mathstrut$} --
(1.2,0,0) node[below] {$u\mathstrut$};
\draw[thick,-latex]
(0,0,0) --
(0,0,1.2) node[above] {\contour{white}{$C_{-1}(u,v)$}};
\end{tikzpicture}
\caption{$C_{-1}(u,v)$.}
\end{subfigure}%
\hfill
\begin{subfigure}{.333333\linewidth}
\centering
\tdplotsetmaincoords{70}{-22.5}
\begin{tikzpicture}[scale=2.8,tdplot_main_coords]
\foreach \index in {1,...,9}
{\draw[domain=0:1,smooth]
plot
(\x,\index/10,
{\x*\index/10*(2-\x-\index/10+\x*\index/10)});
\draw[domain=0:1,smooth]
plot
(\index/10,\x,
{\x*\index/10*(2-\x-\index/10+\x*\index/10)});}
\draw
(0,1,0) -- (1,1,1) -- (1,0,0);
\draw[dashed]
(0,0,1) node[left] {$1$} --
(1,0,1) -- (1,1,1) -- (0,1,1) -- cycle;
\draw[dashed]
(1,0,1) -- (1,0,0) node[below] {$1\mathstrut$};
\draw[dashed]
(0,1,1) -- (0,1,0) node[below] {$1\mathstrut$};
\draw[thick,latex-latex]
(0,1.2,0) node[below] {$v\mathstrut$} --
(0,0,0) node[below] {$O\mathstrut$} --
(1.2,0,0) node[below] {$u\mathstrut$};
\draw[thick,-latex]
(0,0,0) --
(0,0,1.2) node[above] {\contour{white}{$C_1(u,v)$}};
\end{tikzpicture}
\caption{$C_1(u,v)$.}
\end{subfigure}%
\hfill\strut
\caption{Plots of the Farlie--Gumbel--Morgenstern copulae~$C_{-1}$ and~$C_1$.}
\end{figure}
\end{document}
Is there a method to create the above 3D graphs, with perspective? More precisely, can anyone create a perspective drawing with two vanishing points on the horizon, which automates all necessary computations?
This answer by @JanHlavacek attempted to draw a cube with perspective, but I doubt the application to my situation.
Best Answer
All the conceptual issues have been solved by Max in this fantastic answer, which I just copied in the updated answer. In my original answer, I used a more clumsy syntax, but this is no longer necessary since Max has fixed it.
UPDATED ANSWER: Max' coordinate parser works, according to what I find, just great.
The only exception is when the coordinates contain a newline, i.e. stretch over more than one line.FIXED BY MAX It is just Max' stellar transformations + your code +tpp cs:
added to all coordinates.The perspective is defined in
which you may adjust to your needs.