Although the following lines of code work fine they are very awkward.
My questions are below
a = RGBColor[1, 0, 0]
b = RGBColor[0, 1, 0]
Is there a more compact way to construct ab?
Can the three entries of RGBColor[u,v,w]
be extracted as a list?
Can the RGBColor argument be entered as a list RGB[{list}]?
ab = RGBColor[a[[1]] + b[[1]], a[[2]] + b[[2]], a[[3]] + b[[3]]]
Graphics[{{a, Disk[{0, .5}, .5]}, {b, Disk[{.25, .5}, .5]}, {ab,
Disk[{.5, .5}, .5]}}]
Comments
Post a Comment