From f25f6966e0b5362b5eb5468abd15a71604c172d5 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Wed, 19 Apr 2017 18:55:44 -0700 Subject: [PATCH] add example showing how to make an elliptical grating --- examples/ellip_grating.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 examples/ellip_grating.py diff --git a/examples/ellip_grating.py b/examples/ellip_grating.py new file mode 100644 index 0000000..e4e2672 --- /dev/null +++ b/examples/ellip_grating.py @@ -0,0 +1,22 @@ +# Quick script for testing arcs + +import numpy + +import masque +from masque import shapes + + +def main(): + pat = masque.Pattern() + for rmin in numpy.arange(10, 15, 0.5): + pat.shapes.append(shapes.Arc( + radii=(rmin, rmin), + width=0.1, + angles=(-numpy.pi/4, numpy.pi/4) + )) + + pat.visualize() + + +if __name__ == '__main__': + main()