# Why can't a Plot be rendered by Graphics if it's a member of a list?

I grabbed the code to render a gear from a Mathematica Demo, but I'm having difficulty reproducing the way it's to be used:

gear[{x_, y_}, n_] := ParametricPlot[{
{x + (1 + 2 n) Cos[1.5708/n + theta] - Cos[1.5708/n + theta + 2 n theta],
y + (1 + 2 n) Sin[1.5708/n + theta] - Sin[1.5708/n + theta + 2 n theta]},
{x + (-1 + 2 n) Sin[1.5708 - 4.7124/n - theta]
- Sin[4.7124 - 4.7124/n - theta + 2 n theta],
y + (-1 + 2 n) Cos[1.5708 - 4.7124/n - theta]
- Cos[4.7124 - 4.7124/n - theta + 2 n theta]}},
{theta, 0, 2 Pi},
PlotPoints -> 101, RegionFunction -> (SquareWave[n #3/6.2832] > 1*^-6 &),
Axes -> False]


Then

Graphics[gear[{0, 0}, 20]]


works as expected, but

Graphics[{Thick, gear[{0, 0}, 20]}]


generates the Graphics is not a Graphics primitive or directive error. Is there a way to make this work?

• I would now like to be able to rotate my gears, e.g. Rotate[gear[...],theta]. Unfortunately now First simply removes the Rotate. Any suggestions for what will work in this case? – Keith Feb 9 '15 at 18:34

gear produces Graphics so there is not need to add another.

If you want to modify the content you have to take it out:

Graphics[{Thick, First@gear[{0, 0}, 20]}]


Your first example works because it seems Graphics by default flatten Graphics[Graphics[:

Nest[Graphics, Disk[], 5]


to only one.

But your second example is something different, Graphics[{ ..., Graphics and this is not correct syntax.

• I would now like to be able to rotate my gears, e.g. Rotate[gear[...],theta]. Unfortunately now First only removes the Rotate. Any suggestions for what will work in this case? – Keith Feb 9 '15 at 21:24
• @Keith like Rotate[First@gear[], theta]? – Kuba Feb 9 '15 at 21:28

Resetting AbsoluteThickness directly also works:

t=4;
gear[{0, 0}, 20] /. AbsoluteThickness[z_] -> AbsoluteThickness[t] Choose whatever t you wish, although too large a choice causes the two colors to overlap excessively.