and 6 contributors

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

``````    mochan@fis.unam.mx

Instituto de Ciencias Físicas, UNAM
62251 Cuernavaca, Morelos
México``````

# NAME

Photonic::CharacteristicFunctions

version 0.012

# SYNOPSIS

``````   use Photonic::CharacteristicFuncions qw(triangle isosceles ellipse)
my \$e=ellipse(\$N, \$ff, \$e);
my \$t=triangle(\$N, \$r0, \$deltar, \$theta0);
my \$i=isosceles(\$N, \$r0, \$delta2, \$delta3, \$theta0);``````

# DESCRIPTION

Provide a few characteristic functions that may be used in Photonic calculations.

# EXPORTABLE FUNCTIONS

• ellipse(\$N, \$ff, \$e)

returns an ellipse in a square lattice of side (2*\$N+1)x(2*\$N+1) with filling fraction \$ff and quotient between Y and X axes \$e.

• triangle(\$N, \$r0, \$deltar, \$theta0)

returns a smooth pear shaped triangle in a square lattice of side (2*\$N+1)x(2*\$N+1) with border r(theta)=\$r0+\$deltar*cos(3*(theta-\$theta0)) in polar coordinates

• isosceles(\$N, \$r0, \$delta2, \$delta3, \$theta0)

returns a smooth pear shaped triangle in a square lattice of side (2*\$N+1)x(2*\$N+1) with border =r(theta)=\$r0+\$delta2*cos(2*(theta-\$theta0))+\$delta3*cos(3*(theta-\$theta0)) in polar coordinates