Skip to main content
edited title
Link
Bernard
  • 277.1k
  • 14
  • 164
  • 385

Different ouputoutput image when using coordinate in tikz

Source Link

Different ouput image when using coordinate in tikz

I am getting different output images when using named v/s raw coordinates in tikz-3dplot. Is there way to print out what the value of coodinates are to help debug or check any log files. Minimal example below:

\documentclass{standalone} \usepackage{tikz} \usepackage{tikz-3dplot} \usepackage{calc} \begin{document} \tdplotsetmaincoords{70}{100}%right hand \begin{tikzpicture}[scale=2] \def\xmax{2} \def\ymax{2} \def\dz{0.2} \coordinate (M) at (0.5*\xmax,0.5*\ymax,0); \draw[fill=green!40!white, opacity = 0.5,tdplot_main_coords] ({0},{0},{0}) to [out=30,in=200] ({0},{\ymax},{0}) to ({\xmax},{\ymax},{0}) to[out=200,in=30] ({\xmax},{0},{0}) to ({0},{0},{-\dz}) to (M) to (0,0,0); \end{tikzpicture} \tdplotsetmaincoords{70}{100}%right hand \begin{tikzpicture}[scale=2] \def\xmax{2} \def\ymax{2} \def\dz{0.2} \draw[fill=green!40!white, opacity = 0.5,tdplot_main_coords] ({0},{0},{0}) to [out=30,in=200] ({0},{\ymax},{0}) to ({\xmax},{\ymax},{0}) to[out=200,in=30] ({\xmax},{0},{0}) to ({0},{0},{-\dz}) to (0.5*\xmax,0.5*\ymax,0) to (0,0,0); \end{tikzpicture} \end{document} 

Ouput image