I'm trying to create a function that returns a partly filled Disk
, based on a percentage. So inputting 1
would give a fully filled disk, while inputting 0.5
would return a Disk
with half of if it filled (from 12 'o clock to 6 'o clock). Etc.
So far I've written this:
Graphics[{{EdgeForm[Thick], White, Disk[{0, 0}, 1]},
{Blue, Disk[{0, 0}, 1, {4 Pi/3, Pi/2}]}}]
The function part is not difficult but I can't get the coordinates to work properly. How do I transform a percentage like 0.1 to the correct segment of the Disk
? (The {4 Pi/3, Pi/2}
of the function).
2 Pi * percen
. Honestly I would just use degree in this case. $\endgroup$Disk[{0, 0}, 1, {Pi/2, Pi/2 +/- n 2 Pi}]
but I agree with @Öskå. $\endgroup$