zhb学了一个晚上,又提供了3D卫星图的绘制。
效果图:
笔记写在注释里了
% HB-吃井不忘挖水人
\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{tikz-3dplot}
\usepackage{emoji}
\usetikzlibrary{patterns,backgrounds,math}
\begin{document}
% 调整视角,绕x轴顺时针70,绕z顺时针110,默认是从z正方向向下看,x轴指向右侧
\tdplotsetmaincoords{70}{110}
\begin{tikzpicture}[tdplot_main_coords]
% 设置坐标原点
\coordinate (O) at (0,0,0);
%A
% \draw [颜色,绕z旋转角度,绕x旋转角度] 起点坐标 画弧 (0到360度半径为6) node for循环{参数}[位置,内部间距,圆,阴影种类,球颜色,不透明度,标签={emoji放中间}]{文本是空};
% 用circle可以画圆,但无法使用pos定义节点位置
\draw [red,rotate around z=0,rotate around x=55] (6,0,0) arc(0:360:6)
node foreach \d in {-150,-30,60,90}[pos=\d/360,inner sep=5,circle,shading=ball,ball color=red,opacity=0.7,label={center:\emoji{grinning-face-with-sweat}}]{};
%B
\draw [yellow,rotate around z=60,rotate around x=55] (6,0,0) arc(0:360:6)
node foreach \d in {-120,-90,0,150}[pos=\d/360,inner sep=5,circle,shading=ball,ball color=yellow,opacity=0.7,label={center:\emoji{grinning-face-with-sweat}}]{};
%C
\draw [green,rotate around z=120,rotate around x=55] (6,0,0) arc(0:360:6)
node foreach \d in {-60,-30,30,60,180}[pos=\d/360,inner sep=5,circle,shading=ball,ball color=green,opacity=0.7,label={center:\emoji{grinning-face-with-sweat}}]{};
%D
\draw [cyan,rotate around z=180,rotate around x=55] (6,0,0) arc(0:360:6)
node foreach \d in {-150,-120,-90,-30,60,90}[pos=\d/360,inner sep=5,circle,shading=ball,ball color=cyan,opacity=0.7,label={center:\emoji{grinning-face-with-sweat}}]{};
%E
\draw [blue,rotate around z=240,rotate around x=55] (6,0,0) arc(0:360:6)
node foreach \d in {-120,0,30,120}[pos=\d/360,inner sep=5,circle,shading=ball,ball color=blue,opacity=0.7,label={center:\emoji{grinning-face-with-sweat}}]{};
%F
\draw [magenta,rotate around z=300,rotate around x=55] (6,0,0) arc(0:360:6)
node foreach \d in {-150,-90,-60,30,60,150}[pos=\d/360,inner sep=5,circle,shading=ball,ball color=magenta,opacity=0.7,label={center:\emoji{grinning-face-with-sweat}}]{};
% \shade[阴影种类,颜色,不透明度] 圆心 circle (半径)
\shade[shading=ball,ball color=blue,opacity=0.9] (O) circle (40pt);
% 画三个坐标轴
% \draw[带箭头的直线,颜色,线宽] (起点)--(终点)node[文本相对箭头位置]{文本}
\draw[->,red,line width=1.3] (O)--(2,0,0)node[left]{$x$};
\draw[->,green,line width=1.3] (O)--(0,2,0)node[right]{$y$};
\draw[->,blue,line width=1.3] (O)--(0,0,2)node[above]{$z$};
\draw [red,rotate around z=0,rotate around x=55] (6,0,0) arc(0:42:6);%补充被蓝球遮蔽的部分
\end{tikzpicture}
\end{document}
zhbnb!
zhb总觉得有人会盗它的图,在它的强烈要求下,加了水印:
下一篇:空间矢量旋转示意图,四元数(4)