MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to create a mask with a hole in it?

  • To: mathgroup at
  • Subject: [mg15017] Re: [mg14985] How to create a mask with a hole in it?
  • From: Jurgen Tischer <jtischer at>
  • Date: Sat, 5 Dec 1998 01:30:20 -0500
  • Organization: Universidad del Valle
  • References: <>
  • Sender: owner-wri-mathgroup at

this creates a rectangular mask with a circular hole with center {x,y},
radius r and rectangle with left lower corner {xmin,ymin} and right
upper corner {xmax,ymax}. I suppose you have a graphics object already
generated with AspectRatio set to Automatic (otherwise you'll have to
set it in Show.


        Table[r {Cos[t],Sin[t]}+{x,y},{t,0,2\[Pi],2\[Pi]/(50 r)}]}]

You may want to change the parameter 50 to produce a smoother circle or
less code.


where gr is the graphic with the pattern, AspectRatio and PlotRange are
optional (I used PlotRange in my examples for clipping the pattern
which passed the rectangle).


Michael Kubovy wrote:
> I am requesting help to do the following: Show a pattern (a lattice of
> multicolored dots in this case) as if seen through a circular aperture
> in a rectangular black screen.
> |\  /|  / Michael Kubovy, Professor of Psychology, Dept of Psychology |
> \/ | /  Univ of Virginia, Gilmer Hall, Charlottesville, VA 22903-2477 |
> |/\  office (B011): 804-982-4729, lab (B019): -4751, fax: -4766  |    |
> \ HTTP://

  • Prev by Date: Re: Boundary Value Problems
  • Next by Date: Re: problems installing ExtendGraphics
  • Previous by thread: How to create a mask with a hole in it?
  • Next by thread: Re: Blue screen of death after installing NT4 SP4