# How to design an arbitrary wedged prism

The short answer is a prism can be modelled by two tilted interfaces and a medium between them, even though it doesn't look like a prism on the drawing.

But then a question arises - what angle we have to put for the right interface?

So there are some explanations below. We took a symmetrical prism for example, but they are applicable for any interface angles.

How the interface elements work (and other elements in rezonator do) is they recalculate the beam size and ROC (fig.1)

And even if the beam has a finite size, it's considered touching the surface at a point (fig.2). It's a limitation of the ray matrix approach. It can be seen that for such transformation it's doesn't matter from which side of the normal the beam falls (fig.3).

This gives, when putting the second interface it doesn't matter if it's parallel to the first one (fig.4) or is flipped against the beam (fig.5).
If we keep the incident angle α the same, the output beam will be the same.
The case 4 describes a tilted plane-parallel plate, the case 5 is for symmetrical prism.
The 5 works the same as the 4 does if we consider a *single wavelength*.

So in the example schema above we've set the `s5`

angle to +5° (the angle in the first/left medium of the interface).
A sign of the angle doesn't have any physical meaning here,
it's just a way to specify either the left or right angle without introducing an additional element or additional parameter.

In the same time, in the case of symmetrical prism, instead of `s1`

, `d3`

, and `s2`

elements
we could safely put single Tilted plate element and recalculate the inner angle to its inclination angle as `asin(1.5 * sin(5))`

.

If we'd imagine a 'honest' prism element described, say, by its tip angle θ and some base thickness L, then it should be working as in the figure below. For each wavelength it calculates another length L' and another angle α' and here the inclination direction of the second surface definitely matters. This approach also makes to consider additional factors - like what is the blue beam has already passed some dispersive elements before and doesn't enter the prism at the same point where the red beam does. All this only feasible when a software can calculate several wavelengths at the time, which is not what rezonator can do currently.