tikz add tag
Anonymous 1123
I see the answer from [here](https://tex.stackexchange.com/questions/48774/drawing-axis-grid-in-3d-with-custom-unit-vectors) Now I want to draw this picture with  `3dtools` 
![ScreenHunter 1025.png](/image?hash=2be281c3c93e71de749848676b2c488dda773474fc80602328aa58b1aae88c01)
How can I get it?
Top Answer
marmot
You do not necessarily need `3dtools` for that, but in order to have a sloped xy plane it may be a convenient tool. Yet, the main players are still keys like `canvas is xy plane at z=0`.

```
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{3dtools}
\begin{document}
\begin{tikzpicture}[pics/my circle/.style={code={%
   \def\pv##1{\pgfkeysvalueof{/tikz/my circle/##1}}	
   \tikzset{my circle/.cd,#1}	
   \draw circle[radius=\pv{r}] foreach \XX/\YY in {A/-135,B/45,C/135,D/-45}
   {(\YY:\pv{r})coordinate (-\XX) (\YY:\pv{r}+\pv{b})node{$\XX\pv{label suffix}$}}
   (-A) -- pic[midway,sloped]{right angle} (-B) (-C) -- (-D);
 }},my circle/.cd,r/.initial=1,a/.initial=0.25,b/.initial=0.2,label suffix/.initial={},
 /tikz/.cd,pics/right angle/.style={code={
   \def\pv##1{\pgfkeysvalueof{/tikz/right angle/##1}}	
   \tikzset{right angle/.cd,#1}	
  \draw (\pv{a},0) -- (\pv{a},\pv{a}) -- (0,\pv{a})
  (\pv{b},\pv{b}) coordinate (-l);
 }},right angle/.cd,a/.initial=0.2,l/.initial={},b/.initial=0.4,
 /tikz/.cd,pics/arrow/.style={code={
 	\draw[semithick,-stealth] (-0.3,0) -- (0,0);}}]
 \begin{scope}[3d/install view={phi=20,theta=70}]
  \begin{scope}[canvas is xz plane at y=0]
   \draw[right angle/l={$O$}] (-2,0) rectangle (2,4) 
   	pic[midway,transform shape](xz){my circle} (xz-l) node[transform shape]{$O$};
  \end{scope}
  \path (0,0,0) coordinate (O) (1,0,0) coordinate (B) 
   (0,{cos(30)},{sin(30)}) coordinate (C);
  \tikzset{3d/define orthonormal dreibein={A={(O)}}}
  \begin{scope}[x={(ex)},y={(ey)},z={(ez)},canvas is xy plane at z=0]
   \draw[right angle/l={$O$}] (-2,-4) rectangle (2,0) 
   	pic[midway,transform shape,yscale=-1,nodes={yscale=-1}](xy){my circle={label suffix='}} 
	(xy-l) node[transform shape]{$O'$};
  \end{scope}
 \end{scope}
 \draw[semithick] foreach \X in {A,B,C,D} 
 {(xz-\X) -- (xy-\X) pic[pos=0.5,sloped,allow upside down]{arrow}};
\end{tikzpicture}
\end{document}
```
![Screen Shot 2020-12-19 at 8.06.46 AM.png](/image?hash=d1fcc0247d3dd9a6fe61b0737a922f577e09d266133704092bf30eed41f864d5)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.