当我有板材形状时,如何绘制球壳?

当我有板材形状时,如何绘制球壳?

在此处输入图片描述

    ‎\documentclass[tikz,margin=5pt,tightpage]{standalone}‎
‎\usepackage{varwidth}‎
‎\usepackage{tikz}‎
‎\usepackage{verbatim}‎
‎\usetikzlibrary{positioning}‎
 ‎\usepackage[utf8]{inputenc}‎ 
‎\usepackage{fullpage}‎
‎\usepackage{fourier}‎
\usetikzlibrary{calc,3d}

‎\begin{document}‎
‎\begin{tikzpicture}[x  = {(-0.5cm,-0.5cm)}‎,
                    ‎y  = {(0.9659cm,-0.25882cm)}‎,
                    ‎z  = {(0cm,1cm)}‎,
                    ‎color = {black},scale=1]‎

‎\draw[draw=black,opacity=.8,very thick,line join=round]‎
 ‎(0,0,0.3)‎ -- 
 ‎(0,0,-0.3)‎ --
 ‎(0,10,-0.3)‎ --
 ‎(0,10,0.3)‎ -‎-cycle ;‎
‎\draw[draw=black,opacity=.8,very thick,line join=round]‎
 ‎(10,2,0.3)‎ -- 
 ‎(10,2,-0.3)‎ --
 ‎(0,0,-0.3)‎ --
 ‎(0,0,0.3)‎ -‎-cycle ;‎
‎\begin{scope}[canvas is xy plane at z=-0.3]‎  
‎\coordinate (A) at (0,0);‎
‎\coordinate (B) at (10,2);‎
‎\coordinate (C) at (8,8);‎
‎\coordinate (D) at (0,10);‎
‎\coordinate (E) at (0,0);‎
‎\coordinate (F) at (0,10);‎
‎\coordinate (G) at (10,10);‎
‎\coordinate (H) at (10,0);‎
‎\fill[green!20,fill opacity=0.9] (A)‎ -- ‎(B)--(C)--(D)--cycle;‎
‎\draw[black,very thick] (A)‎ -- ‎(B)--(C)--(D)--cycle;‎
‎‎\end{scope}‎                 
‎%****************************‎
  ‎\begin{scope}[canvas is xy plane at z=0.3]‎
   ‎\coordinate (A) at (0,0);‎
‎\coordinate (B) at (10,2);‎
‎\coordinate (C) at (8,8);‎
‎\coordinate (D) at (0,10);‎
‎\coordinate (E) at (0,0);‎
‎\coordinate (F) at (0,10);‎
‎\coordinate (G) at (0,5.6);‎
‎\coordinate (H) at (3.95,11);‎
‎\fill[green!20,fill opacity=0.97] (A)‎ -- ‎(B)--(C)--(D)--cycle;‎
‎\draw[black,very thick] (A)‎ -- ‎(B)--(C)--(D)--cycle;‎
‎\end{scope}‎
‎%***************************************************************‎
‎\draw[draw=black,opacity=.8,very thick,line join=round]‎
 ‎(10,2,0.3)‎ -- 
 ‎(10,2,-0.3)‎ --
 ‎(8,8,-0.3)‎ --
 ‎(8,8,0.3)‎ -‎-cycle ;‎
‎\draw[draw=black,opacity=.8,very thick,line join=round]‎
 ‎(0,10,0.3)‎ -- 
 ‎(0,10,-0.3)‎ --
 ‎(8,8,-0.3)‎ --
 ‎(8,8,0.3)‎ -‎-cycle ;‎


‎\end{tikzpicture}‎
‎\end{document}

相关内容