Open ianwilliamson opened 5 years ago
Sounds good to me. We could also define our own, seems simple enough.
In a way, what's in structures.py
is a basic template for defining complicated permittivity distributions out some geometric parameters. We could also define a more general geometries.py
package that allows users to define basic shapes to construct structures out of.
scikit-image defines a bunch of these: http://scikit-image.org/docs/dev/api/skimage.draw.html
@shoyer This looks really useful, thanks!
When I get some time, I may overhaul the structures.py interface and use these for convenience.
@ianwilliamson @momchilmm We can use our shape @primitives for this potentially
It would be useful to implement some hooks into a computational geometry package to allow the user to specify an input permittivity distribution (or even the optimization design region) using collections of geometric primitives, e.g. rectangles, circles, etc. The user could also specify transformations of these objects, e.g. rotations, arrays, etc.
This would make it much easier to specify certain types of structures, e.g. waveguide bends, couplers, photonic crystals, ring resonators, etc, compared to the current approach of using conditionals operating directly on the array values.
For example, in my FDFD.jl package I use https://github.com/stevengj/GeometryPrimitives.jl There may be similar packages for python.