# Modify stacked 3D disc example

I saw the TIkZ example of Mark Wibrow (http://www.texample.net/tikz/examples/disc/). The original answer is here: tikz stacked disks 3D. I need just one disc and I can modify the height of the disc where I can also put the polar coordinates. I was able to reduce the 3 stacked discs to one and put the polar coordinates using Mark's example but can not change the height of the disc. I need to lower it.

• Welcome to TeX.se Please edit your question to show your modified code so that people can see what you've done. I've added a link to the original answer on the site. Apr 14 '20 at 13:24

This is a version of Mark's brilliant code which stores the parameters in pgf keys. The parameters are height h, radius r, aspect aspect and a Boolean bottom for the shadow.

\documentclass[tikz,border=10pt]{standalone}
\newif\iftikzdiscisbottom
\tikzset{
pics/.cd,
disc/.style = {
code = {
\tikzset{disc/.cd,#1}
\def\pv##1{\pgfkeysvalueof{/tikz/disc/##1}}%
\iftikzdiscisbottom
\foreach \i in {0,2,...,30}
\fill [black, fill opacity = 1/60] (0,-0.1)
\fi
\path [left color = black!50, right color = black!50,
middle color = black!25]
(-0.975*\pv{r},0) arc[start angle=180,end angle=360,
\path [top color = black!25, bottom color = white]
(0,.05*\pv{r}*\pv{aspect}+\pv{h})
\path [left color = black!25, right color = black!25,
middle color = white] (-\pv{r},\pv{h}) -- (-\pv{r},0)
arc[start angle=180,end angle=360,
-- (\pv{r},\pv{h})
arc[start angle=360,end angle=180,
\foreach \r in {225,315}
\foreach \i [evaluate = {\s=30;}] in {0,2,...,30}
\fill [black, fill opacity = 1/50]
(0,\pv{h}) -- ++ (\r+\s-\i:\pv{r} and \pv{r}*\pv{aspect})
-- ++(0,-\pv{h})
arc[start angle=\r+\s-\i,end angle=\r-\s+\i,
-- ++(0,\pv{h}) -- cycle;
\foreach \r in {45,135}
\foreach \i [evaluate = {\s=30;}] in {0,2,...,30}
\fill [black, fill opacity = 1/50]
(0,\pv{h}) -- ++ (\r+\s-\i:\pv{r} and \pv{r}*\pv{aspect})
arc[start angle=\r+\s-\i,end angle=\r-\s+\i,