Closed rocky closed 8 months ago
@rocky, I do not understand the example. Some good examples to add would be
Graphics[Disk[], Background->RGBColor[.1,.3,1.]]
Graphics3D[Sphere[], Background->RGBColor[.1,.3,1.]]
and for errors,
Graphics[{Disk[],NoPrimitive[]}, Background->RGBColor[.1,.3,1.]]
Graphics3D[{Sphere[], NoPrimitive[]}, Background->RGBColor[.1,.3,1.]]
Notice that Polygon
is not yet defined for 3D graphics, and that, with the last changes, the background is set as a true background, not by adding a primitive.
Let's back up a little.
The gallery is not a tutorial. It is not intended to explain features, just show that they exist using interesting or visually stunning examples. Also we would like to keep the number of examples down small.
The documentation is there documenting and understanding examples and primitive components in the examples. Something like Graphics[Disk[], Background->RGBColor[.1,.3,1.]]
is not very interesting and does not make a catchy display.
The example can be complicated if it makes a good visual. (Of course less complicated examples that make good visuals are even better. Here, unfortunately we do not have the primitives that would simplify drawing this or other even better examples.)
Therefore adding a background color to one of the existing examples is the way to go. I had also tried this on the "star" example before (that shows we respect crossing number correct in polygon paths) but somehow to me it makes the bottom arrow of the star look funny.
Possibly what you are suggesting should go in as an example in one for one of the examples in the documentation. Preferably as an example in a section where the examples are scarce. I am not seeing that we have "Background" documented anywhere. That is possibly where those examples might go. Another place is to fill out RGBColor with more interesting examples and one that shows the use of real-valued R, G, and B values.
But this is done in mathics-core not here.
OK, in that case, LGTM. Maybe, a slight improvement would be
Graphics3D[Arrow[{{1, 1, -1}, {2, 2, 0}, {3, 3, -1}, {4, 4, 0}}]]
by
Graphics3D[Arrow[{{1, 1, -1}, {2, 2, 0}, {3, 3, -1}, {4, 4, 0}}],Background->RGBColor[.4,.8,1.]]