  Layered optical devices with a lateral gradient can be fabricated through
electrochemical synthesis of porous silicon (PS) using a position dependent
etching current density $\bm j(\bm r_\|)$. Predicting the local value of $\bm
j(\bm r_\|)$ and the corresponding porosity $p(\bm r_\|)$ and etching rate
$v(\bm r_\|)$ is desirable for their systematic design. We develop a simple
analytical model for the calculation of $\bm j(\bm r_\|)$ within a prism shaped
cell. Graded single layer PS samples were synthesized and their local
calibration curves $p$ vs $\bm j$ and $v$ vs $\bm j$ were obtained from our
model and their reflectance spectra. The agreement found between the
calibration curves from different samples shows that from one sample we could
obtain full calibration curves which may be used to predict, design, and
fabricate more complex non-homogeneous multilayered devices with lateral
gradients for manifold applications.
