NanoComp / meep

free finite-difference time-domain (FDTD) software for electromagnetic simulations
GNU General Public License v2.0
1.16k stars 596 forks source link

Is it possible to create geometry like a pyramid? #2719

Closed leSemaleon closed 7 months ago

leSemaleon commented 7 months ago

I did not find such geometry on the site. The closest thing is a prism and a cone

stevengj commented 7 months ago

You will have to build it out of other geometric objects (or use a material-function). e.g. you could divide the pyramid into blocks in various ways (e.g. starting with a solid block and "chopping off" pieces with blocks of air at various angles).

Meep doesn't currently have a "generic polyhedron" object. (In principle we could implement support for e.g. any closed surface described by a triangular mesh, e.g. generated with gmsh.)

See also https://github.com/NanoComp/meep/discussions/2627