Timeline for Opacity function applied to Graphics Objects
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 10, 2014 at 19:10 | comment | added | Michael E2 |
@LucaM You're welcome. You shouldn't need the part [[{1,2,3,4}]] . I used [[{1,2,4,3}]] to reorder the output of Tuples . The [[{1,2,3,4}]] puts parts 1,2,3,4 in the order 1,2,3,4 -- so it does nothing.
|
|
Nov 10, 2014 at 17:21 | vote | accept | Luca M | ||
Nov 10, 2014 at 17:16 | comment | added | Luca M | Thanks @Michael E2. I think that Polygon + VertexColors is the simplest way to go. This code produce the effect I wanted: Graphics[{{Polygon[{{-0.25, -1}, {0, -1}, {0, 1}, {-0.25, 1}}[[{1, 2, 3, 4}]], VertexColors -> {RGBColor[0, 0, 0, 0], RGBColor[0, 0, 0, 1], RGBColor[0, 0, 0, 1], RGBColor[0, 0, 0, 0]}]}, {Polygon[{{0, -1}, {0.25, -1}, {0.25, 1}, {0, 1}}[[{1, 2, 3, 4}]], VertexColors -> {RGBColor[0, 0, 0, 1], RGBColor[0, 0, 0, 0], RGBColor[0, 0, 0, 0], RGBColor[0, 0, 0, 1]}]}, {Circle[]}}] It seems I must use 2 polygons i/o 1 but it's ok. | |
Nov 10, 2014 at 16:20 | comment | added | Simon Woods | Looks right to me. | |
Nov 10, 2014 at 16:17 | comment | added | Michael E2 | @SimonWoods Done, I hope. I seem to be not thinking too clearly this morning.... | |
Nov 10, 2014 at 16:14 | history | edited | Michael E2 | CC BY-SA 3.0 |
Fixed code
|
Nov 10, 2014 at 15:57 | comment | added | Simon Woods |
I think Texture is the way to go, but for an opacity gradient the gaussian should be in the alpha channel.
|
|
Nov 10, 2014 at 15:55 | history | edited | Michael E2 | CC BY-SA 3.0 |
Fixed code
|
Nov 10, 2014 at 15:40 | history | answered | Michael E2 | CC BY-SA 3.0 |