是否有任何乳胶包可以绘制不同分子的球和棒模型(或用于不同目的但可用于绘制球和棒模型的包)。 球和棒模型如下:
我目前正在使用 avogadro -> 导出为 svg -> inkscape svg -> pdf+latex -> 插入文档。我更喜欢 tikz 包。
新问题
我发现 Avogadro 可以导出原子的坐标。我想知道如何制作连接圆柱体并在圆柱体上添加阴影。我还想改变视角,有没有比 tikz 3d 视图更自然的 3d 视图?这是我尝试绘制的分子的 TiKz 代码(不是上面的那个)
\begin{tikzpicture}[scale=1]
\node (C1) at (-3.19898, 0.68575, -0.09137) {};
\node (N1) at (-2.00788, -0.15303, -0.05472) {};
\node (H1) at (-3.17155, 1.39571, -0.92422) {};
\node (H2) at (-3.31563, 1.23754, 0.84706) {};
\node (H3) at (-4.08519, 0.05549, -0.21396) {};
\node (C2) at (-0.78815, 0.67831, 0.01256) {};
\node (H4) at (-1.95362, -0.69266, -0.92177) {};
\node (C3) at ( 0.47237, -0.18670, 0.21998) {};
\node (H5) at (-0.86520, 1.39211, 0.84227) {};
\node (H6) at (-0.69535, 1.26040, -0.91400) {};
\node (C4) at ( 1.73163, 0.67172, 0.09304) {};
\node (N2) at ( 0.51467, -1.32801, -0.73516) {};
\node (H7) at ( 0.46502, -0.59296, 1.23918) {};
\node (H8) at ( 1.39360, -1.82407, -0.57104) {};
\node (H9) at (-0.23067, -1.96899, -0.46111) {};
\node (O1) at ( 1.80456, 1.88884, 0.13111) {};
\node (O2) at ( 2.86188, -0.07112, 0.00360) {};
\node (H10) at ( 3.57354, 0.59879, -0.06651) {};
\shade [ball color=white] (H1) circle (0.15);
\shade [ball color=white] (H2) circle (0.15);
\shade [ball color=white] (H3) circle (0.15);
\shade [ball color=white] (H4) circle (0.15);
\shade [ball color=white] (H5) circle (0.15);
\shade [ball color=white] (H6) circle (0.15);
\shade [ball color=white] (H7) circle (0.15);
\shade [ball color=white] (H8) circle (0.15);
\shade [ball color=white] (H9) circle (0.15);
\shade [ball color=white] (H10) circle (0.15);
\shade [ball color=black!75] (C1) circle (0.25);
\shade [ball color=black!75] (C2) circle (0.25);
\shade [ball color=black!75] (C3) circle (0.25);
\shade [ball color=black!75] (C4) circle (0.25);
\shade [ball color=blue!75] (N1) circle (0.25);
\shade [ball color=blue!75] (N2) circle (0.25);
\shade [ball color=red!75] (O1) circle (0.25);
\shade [ball color=red!75] (O2) circle (0.25);
\draw (H1) -- (C1) -- (N1) -- (C2) -- (C3) -- (C4) -- (O1);
\draw (H2) -- (C1);
\draw (H3) -- (C1);
\draw (N1) -- (H4);
\draw (C2) -- (H5);
\draw (C2) -- (H6);
\draw (C3) -- (H7);
\draw (C3) -- (N2) -- (H8);
\draw (N2) -- (H9);
\draw (C4) -- (O2) -- (H10);
\end{tikzpicture}
上面的代码没有将圆柱体作为键,而是仅通过函数将线作为键\draw
。如何使圆柱体着色并更改 3D 视角?