Skip to main content
added 10 characters in body
Source Link
Niki Estner
  • 36.4k
  • 3
  • 92
  • 156

You can use your Disk (or any grayscale image) as an alpha channel:

img = ExampleData[{"TestImage", "Lena""F16"}];

disk = Graphics[Disk[]];

diskImg = 
  ColorConvert[Rasterize[disk, ImageSize -> ImageDimensions[img]], 
   "Grayscale"];

facecircleImg = ColorCombine[{img, ColorNegate@diskImg}, "RGB"]

enter image description hereenter image description here

Then you can use Inset to place it like other graphics primitives:

Graphics[{
  Table[
   Inset[faceInset[circleImg, {Cos[i*10 \[Degree]], 
      Sin[i*10 \[Degree]]}*50, {256, 
     256}, 5 + i*1], {i, 10}]}]

enter image description hereenter image description here

You can use your Disk (or any grayscale image) as an alpha channel:

img = ExampleData[{"TestImage", "Lena"}];

disk = Graphics[Disk[]];

diskImg = 
  ColorConvert[Rasterize[disk, ImageSize -> ImageDimensions[img]], 
   "Grayscale"];

face = ColorCombine[{img, ColorNegate@diskImg}, "RGB"]

enter image description here

Then you can use Inset to place it like other graphics primitives:

Graphics[{
  Table[
   Inset[face, {Cos[i*10 \[Degree]], Sin[i*10 \[Degree]]}*50, {256, 
     256}, 5 + i*1], {i, 10}]}]

enter image description here

You can use your Disk (or any grayscale image) as an alpha channel:

img = ExampleData[{"TestImage", "F16"}];

disk = Graphics[Disk[]];

diskImg = 
  ColorConvert[Rasterize[disk, ImageSize -> ImageDimensions[img]], 
   "Grayscale"];

circleImg = ColorCombine[{img, ColorNegate@diskImg}, "RGB"]

enter image description here

Then you can use Inset to place it like other graphics primitives:

Graphics[{
  Table[
   Inset[circleImg, {Cos[i*10 \[Degree]], 
      Sin[i*10 \[Degree]]}*50, {256, 256}, 5 + i*1], {i, 10}]}]

enter image description here

added 6 characters in body
Source Link
Niki Estner
  • 36.4k
  • 3
  • 92
  • 156

You can use your Disk (or any grayscale image) as an alpha channel:

img = ExampleData[{"TestImage", "Lena"}];

disk = Graphics[Disk[]];

diskImg = 
  ColorConvert[Rasterize[disk, ImageSize -> ImageDimensions[img]], 
   "Grayscale"];

face = ColorCombine[{img, ColorNegate@diskImg}, "RGB"]

enter image description here

Then you can use Inset to place it like anyother graphics primitiveprimitives:

Graphics[{
  Table[
   Inset[face, {Cos[i*10 \[Degree]], Sin[i*10 \[Degree]]}*50, {256, 
     256}, 5 + i*1], {i, 10}]}]

enter image description here

You can use your Disk (or any grayscale image) as an alpha channel:

img = ExampleData[{"TestImage", "Lena"}];

disk = Graphics[Disk[]];

diskImg = 
  ColorConvert[Rasterize[disk, ImageSize -> ImageDimensions[img]], 
   "Grayscale"];

face = ColorCombine[{img, ColorNegate@diskImg}, "RGB"]

enter image description here

Then you can use Inset to place like any graphics primitive:

Graphics[{
  Table[
   Inset[face, {Cos[i*10 \[Degree]], Sin[i*10 \[Degree]]}*50, {256, 
     256}, 5 + i*1], {i, 10}]}]

enter image description here

You can use your Disk (or any grayscale image) as an alpha channel:

img = ExampleData[{"TestImage", "Lena"}];

disk = Graphics[Disk[]];

diskImg = 
  ColorConvert[Rasterize[disk, ImageSize -> ImageDimensions[img]], 
   "Grayscale"];

face = ColorCombine[{img, ColorNegate@diskImg}, "RGB"]

enter image description here

Then you can use Inset to place it like other graphics primitives:

Graphics[{
  Table[
   Inset[face, {Cos[i*10 \[Degree]], Sin[i*10 \[Degree]]}*50, {256, 
     256}, 5 + i*1], {i, 10}]}]

enter image description here

Source Link
Niki Estner
  • 36.4k
  • 3
  • 92
  • 156

You can use your Disk (or any grayscale image) as an alpha channel:

img = ExampleData[{"TestImage", "Lena"}];

disk = Graphics[Disk[]];

diskImg = 
  ColorConvert[Rasterize[disk, ImageSize -> ImageDimensions[img]], 
   "Grayscale"];

face = ColorCombine[{img, ColorNegate@diskImg}, "RGB"]

enter image description here

Then you can use Inset to place like any graphics primitive:

Graphics[{
  Table[
   Inset[face, {Cos[i*10 \[Degree]], Sin[i*10 \[Degree]]}*50, {256, 
     256}, 5 + i*1], {i, 10}]}]

enter image description here