I'd like to draw crystal structures using TikZ-3Dplot'''. I saw that solutions exist with Asymptote, but for some reason, I can't install it (and I admit I had trouble understanding how the package works).
I started with TikZ 3D Plot, which seems to work.
I just have one question: I can't keep some lines horizontal, which I find unsightly (I've tried several angle values in the command \tdplotsetmaincoords, but without success).
\documentclass{standalone}
\usepackage{tikz,tikz-3dplot}
\usepackage{xcolor}
\begin{document}
\tdplotsetmaincoords{75}{10}
\begin{tikzpicture}[tdplot_main_coords, scale = 5]
% ---- Tracé des traits du réseau ----
\draw[thin] (0,0,0) -- (1,0,0) -- (1,1,0) -- (0,1,0) -- (0,0,0);
\draw[thin] (0,0,1) -- (1,0,1) -- (1,1,1) -- (0,1,1) -- (0,0,1);
\draw[thin] (0,0,0) -- (0,0,1);
\draw[thin] (1,0,0) -- (1,0,1);
\draw[thin] (1,1,0) -- (1,1,1);
\draw[thin] (0,1,0) -- (0,1,1);
\tdplottransformmainscreen{0}{0}{0}
\shadedraw[tdplot_screen_coords, ball color = blue] (\tdplotresx,\tdplotresy) circle (0.10);
\end{tikzpicture}
\end{document}

