Photonic - A perl package for calculations on photonics and metamaterials.
Copyright (C) 1916 by W. Luis Mochán
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
firstname.lastname@example.org Instituto de Ciencias Físicas, UNAM Apartado Postal 48-3 62251 Cuernavaca, Morelos México
use Photonic::Geometry::FromImage2D; my $g=Photonic::Geometry::FromImage2D->new(path=>$filename); my $path=$g->path; my $B=$g->B; my $G=$g->G;
Creates a geometry object to be used in a Homogeneization calculation using as input a monochromatic 2D image.
new(path=>$p, L=>$L, inverted=>$i)
Creates a new H::G::F object
$p is the filename of a 2D monochromatic image with white regions corresponding to the B region and black corresponding to A, unless inverted. Its size must be odd along both directions.
$L is the size of the unit cell along the cartesian axes. By default, it is the number of pixels.
$i controls whether the characteriztic function ought to be inverted: 1 means invert, 0 don't invert. Default: 0
The filename containing the image
For the other accesors, see Photonic::Geometry