Given a simple graphics object like a disc in black:
Graphics[Disk[]]
Is it possible to split the disc in the middle, i.e. color each half differently e.g. left half in black and right half in red?
Graphics[{
Black, DiskSegment[{0, 0}, 1, {Pi/2, 3 Pi/2}],
Red, DiskSegment[{0, 0}, 1, {3 Pi/2, 5 Pi/2}]
}]
EDIT: DiskSegment
was introduced in MMA 10.2. Alternative code that works in previous versions is simply...
Graphics[{
Black, Disk[{0, 0}, 1, {Pi/2, 3 Pi/2}],
Red, Disk[{0, 0}, 1, {3 Pi/2, 5 Pi/2}]
}]
Disk
.
$\endgroup$
Disk
in the documentation. Alternatively, construct it fromPolygon
s (seeCirclePoints
). $\endgroup$DiskSegment
. $\endgroup$