The ray-tracing method is applied to design a wavelength multiplexer-d
emultiplexer by the use of planar microlenses as focusing and collimat
ing elements. By simulating both uniform and Gaussian intensity distri
butions of the input sources, we find the position of the input-output
components of the wavelength multiplexer-demultiplexer, which maximiz
es the coupling efficiency in each channel. Losses are also evaluated.