Quantcast
Channel: TikZ: Match up diagonal shading with adjacent horizontal and vertical three-colour shadings - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 2

Answer by David Carlisle for TikZ: Match up diagonal shading with adjacent horizontal and vertical three-colour shadings

$
0
0

Not quite what you asked for, but I'd suggest

enter image description here

\documentclass[tikz,border=5mm]{standalone}\usepackage{tikz}\usetikzlibrary{calc,shadings}\begin{document}\begin{tikzpicture}[x=2em,y=2em]% Dimensions of the stuff\pgfmathsetmacro\floorL{7}\pgfmathsetmacro\boxL{\floorL/2}\pgfmathsetmacro\boxH{\boxL/3.5}\pgfmathsetmacro\wallH{2*\boxH}\pgfmathsetmacro\floorD{\floorL/14}\pgfmathsetmacro\wallD{\floorL/14}% Define the stuff% origin\coordinate (O) at (0,0);% floor\coordinate (floorTL) at (O);\coordinate (floorTR) at ($(floorTL)+(\floorL,0)$);\coordinate (floorBL) at ($(floorTL)+(0,-\floorD)$);\coordinate (floorBR) at ($(floorBL)+(\floorL,0)$);% wall\coordinate (wallBL) at (floorTR);\coordinate (wallBR) at ($(wallBL)+(\wallD,0)$);\coordinate (wallTL) at ($(wallBL)+(0,\wallH)$);\coordinate (wallTR) at ($(wallTL)+(\wallD,0)$);% Draw the stuff% floor\shade [bottom color=white,top color=brown!60!black,middle color=brown!80] (floorBL) -- (wallBR |- floorBL) coordinate (c) -- (floorTR) -| cycle; % wall \shade [left color=brown!60!black,right color=white,middle color=brown!80] (wallBL) -- (c) -- (wallTR) -| cycle;\end{tikzpicture}\end{document}

Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>