# How do I show only the intrinsic color of 3D polygons?

System: Mathematica 9, Windows 7.

I want to assign a polygon a color in such a way that it is rendered in that color irrespective of any ambient light sources. In other words I want Yellow to be Yellow no matter whether it gets rotated to the top, left, right, front ...

I once figured out how to do this in version 3, when I produced functions to work on a Rubik cube (when it is kinda essential that lightsources won't distort the colors). IIRC I was to turn Lighting -> None, and Shading -> True. But that does not work with version 9. For example Lighting -> None gives all black. Lighting->"Neutral" was a bit better, but still produces like different GreyLevels. F1 gives me scores of nice looking examples of achieving neat effects, but, infuriatingly, no way of deciding on the colors myself. Surely one exists, but I just couldn't coerce on-line help to tell me how, because I don't know the correct buzzword.

• maybe Glow? – kglr Jan 26 '15 at 14:00
• Thank you, @kguler. Setting Lighting->None, and replacing, for example, Red with the Glow[Red] in the Polygon specification does exactly this! Do you mind posting that as an answer? – Jyrki Lahtonen Jan 26 '15 at 14:04
• just posted an answer using that combination. – kglr Jan 26 '15 at 14:09
• @JyrkiLahtonen I wasn't sure what "irrespective of any ambient light sources" meant -- in particular, whether you were referring specifically to the technical Lighting specification "Ambient". It seemed from your subsequent trials that you were searching for a solution using Lighting. – Michael E2 Jan 26 '15 at 14:11
• @MichaelE2: Not sure about terminology. Sorry about the confusion. – Jyrki Lahtonen Jan 26 '15 at 18:42

Using @MichaelE2's example, a combination of Glow and Lighting->None produces a similar picture:

Show[PolyhedronData["Icosahedron"] /.
Polygon[p_] :> MapIndexed[{Glow[Hue[Mod[3*First[#2], 20]/20]], Polygon[#1]} &, p],
Lighting -> None]


Alternatively:

A surface can be specified as having an absolute color col by giving the combination of directives Glow[col], Black, and Specularity[0]. (see: Glow >> Details)

Show[PolyhedronData["Icosahedron"] /.
Polygon[p_] :>  MapIndexed[{Glow[Hue[Mod[3*First[#2], 20]/20]], Black, Polygon[#1]} &, p]]


Perhaps Lighting -> {{"Ambient", White}?

Show[
PolyhedronData["Icosahedron"] /.
Polygon[p_] :>
MapIndexed[{Hue[Mod[3*First[#2], 20]/20], Polygon[#1]} &, p],
Lighting -> {{"Ambient", White}}
]