TransWikia.com

Centering multiple canvas layers in tikz 3D

TeX - LaTeX Asked by Dave2627 on March 29, 2021

So I am trying to recreate the attached image exactly. But for the upper red ring, I can’t seem to have it centered well. I have tried multiple modifications, but it just does not want to center itself like the black dashed ring. Please help.
enter image description here

MWE:

documentclass[tikz,border=3mm]{standalone}
usepackage{tikz}
usetikzlibrary{arrows.meta,calc,positioning,decorations.pathreplacing,calligraphy,bending}
usepackage{tikzsymbols}
usepackage{tikz-3dplot}

begin{document}
tdplotsetmaincoords{70}{112}
begin{tikzpicture}[tdplot_main_coords,line cap=round,>=stealth,scale=0.75]
begin{scope}[rotate=9]
draw[dashed,thick,canvas is xy plane at z=0] circle[radius=2.75cm];
end{scope}
begin{scope}[roll=9]
draw[dashed,thick,red,canvas is xy plane at z=2] circle[radius=1.75cm];
end{scope}
draw[-Latex] (0,0,0) coordinate (O) -- (7,0,0) node[pos=1.2] {$x$}; 
draw[-Latex,rotate around={8:(O)}] (O) -- (0,4,0) node[pos=1.1] {$y$};
draw[-Latex] (O) -- (0,0,4) node[pos=1.1] {$z$};
end{tikzpicture}
end{document}

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP