Skip to content

Instantly share code, notes, and snippets.

@ulaulaman
Created October 24, 2019 16:17
Show Gist options
  • Save ulaulaman/cdb3b99a3f9e0a1683615a342792413b to your computer and use it in GitHub Desktop.
Save ulaulaman/cdb3b99a3f9e0a1683615a342792413b to your computer and use it in GitHub Desktop.
% Under Creative Commons Attribution licence 3.0
% (http://creativecommons.org/licences/by/3.0)
% Author: Florian Lesaint
% http://www.texample.net/tikz/examples/cuboid/
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{tkz-euclide}
\usepackage{xcolor}
\definecolor{space}{HTML}{0A2543}
\definecolor{earth}{HTML}{0089FA}
\begin{document}
\begin{tikzpicture}
\begin{scope}[scale=4]
\draw [fill=space] (-4,3.5) rectangle (4,-0.5);
\path[use as bounding box] (-4,3.5) rectangle (4,-0.5);
\draw [color=earth, ultra thick] (-4,1.5) -- (4,1.5);
%% Fuochi
\coordinate (P1) at (-3cm,2.5cm); % sx
\coordinate (P2) at (3cm,2.5cm); % dx
\coordinate (L) at (1.5,3);
\draw [fill=white] (L) circle (0.05cm);
\coordinate (C1) at (0,0);
\coordinate (A2) at (2,0);
\coordinate (A3) at (-2,0);
\coordinate (C4) at (0,1);
\tkzInterLL(C1,P2)(A2,P1) \tkzGetPoint{C2}
\tkzInterLL(C1,P1)(A3,P2) \tkzGetPoint{C3}
\tkzDefLine[parallel=through C3](C1,C4) \tkzGetPoint{c6}
\tkzInterLL(C3,c6)(C4,P1) \tkzGetPoint{C6}
\tkzDefLine[parallel=through C2](C1,C4) \tkzGetPoint{c5}
\tkzInterLL(C2,c5)(C4,P2) \tkzGetPoint{C5}
\tkzInterLL(C6,P2)(C5,P1) \tkzGetPoint{C7}
\draw [fill=space] (C4) -- (C5) -- (C7) -- (C6) -- (C4);
\tkzDrawSegments[color=white, ultra thick](C1,C4 C1,C2 C2,C5 C4,C5 C5,C7 C6,C7)
\tkzInterLL(L,C4)(C1,P2) \tkzGetPoint{O4}
\tkzInterLL(O4,P1)(C3,P2) \tkzGetPoint{O3}
\draw [color=white, ultra thick, fill=black, opacity=0.5] (C1) -- (C3) -- (C6) -- (C4);
\draw [fill=black, opacity=0.5] (C1) -- (O4) -- (O3) -- (C3) -- (C1);
\end{scope}
\end{tikzpicture}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment