# The C method (Chandezon)

How MC Grating's three Chandezon codes work: the coordinate transformation that flattens a smooth grating profile, the multilayer form, the Classic and Extended variants, conical and crossed gratings, and the 2026 stochastic option — with the papers behind each step.

Canonical: https://mcgrating.com/features/c-method.html


A rigorous method for smooth profiles: a change of coordinates makes the corrugated interface a coordinate plane, and Maxwell's equations are solved in the new coordinates, with no staircase approximation of the profile.

## What it is

Instead of describing the grating as a corrugated boundary between flat media, the C method changes coordinates so that the profile *is* a coordinate surface. In the curvilinear system, Maxwell's equations keep constant coefficients across the interface and the field in each medium becomes an eigenvalue problem solved once per profile; the interface conditions are then applied on a plane. The method was introduced by [Chandezon, Maystre and Raoult](https://mcgrating.com/publications/chandezon-1980-new-theoretical-method.html) [[1](https://mcgrating.com/references.html#ref-1)] on the basis of Maxwell's equations in [covariant form](https://mcgrating.com/publications/chandezon-maxwell-equations-covariant-form.html) [[25](https://mcgrating.com/references.html#ref-25)], extended to [multicoated gratings](https://mcgrating.com/publications/chandezon-1982-multicoated-gratings.html) [[2](https://mcgrating.com/references.html#ref-2)] by Chandezon, Dupuis, Cornet and Maystre, made stable for thick stacks and faster in conical mounts by [Li](https://mcgrating.com/publications/li-1994-differential-method-chandezon-revisited.html) [[3](https://mcgrating.com/references.html#ref-3)], and extended to layers with different profiles by [Li, Granet, Plumey and Chandezon](https://mcgrating.com/publications/li-1996-extending-the-c-method.html) [[4](https://mcgrating.com/references.html#ref-4)].

The method does not handle vertical walls; those are the modal method's territory.

## Classic and Extended

Each Chandezon code offers two methods. In the words of the documentation: the **Classic** method implies identical corrugation at all interfaces, while the **Extended** method implies independent corrugation of all interfaces under the restriction that the period is the same and interfaces do not intersect. The Extended method adds an **Interface** field to the [Grating page](https://mcgrating.com/docs/chandezon/grating.html) so that each interface's profile can be edited on its own.

## The three Chandezon codes

- [Chandezon Collinear](https://mcgrating.com/products.html#chandezon-collinear): incidence in the plane normal to the grooves, with resonance search, finite-beam analysis, fields and optimization.
- [Chandezon Conical](https://mcgrating.com/products.html#chandezon-conical): any incidence angle and polarization, reading the collinear code's files, at about eight times the computing cost.
- [Chandezon Crossed](https://mcgrating.com/products.html#chandezon-crossed): gratings periodic in two directions, by [Granet's formulation](https://mcgrating.com/publications/granet-1998-chandezon-method-crossed-gratings.html) [[20](https://mcgrating.com/references.html#ref-20)] in which the field is split into TE and TM parts and one polarization-independent operator gives the whole solution.

## The Stochastic C-method (2026)

The 2026-05-25 release refactored the C-method code and added an option for the Stochastic C-method, following a 2024 paper by J. Chandezon and G. Granet in J. Opt. Soc. Am. A [[26](https://mcgrating.com/references.html#ref-26)] ([doi:10.1364/JOSAA.530262](https://doi.org/10.1364/JOSAA.530262)), with thanks to Dr. J. Chandezon. In the changelog's words: adding a small random Brownian noise to the grating profile can sometimes improve the convergence of the C-method for large grating depths; however, the results with it applied are not exactly repeatable. [More on the stochastic option →](https://mcgrating.com/features/stochastic-c-method.html)

The documentation of the Chandezon codes starts at [the introduction for the 1D codes](https://mcgrating.com/docs/chandezon/introduction.html) and [the introduction for Chandezon Crossed](https://mcgrating.com/docs/chandezon-crossed/introduction.html); sections 1 to 3 of the [step-by-step examples](https://mcgrating.com/docs/examples.html#ex-1) are C-method examples, including a metal sinusoidal grating in Littrow condition and hexagonal crossed gratings.
