Is there a formula to calculate the deviated angle of a ray passing through a prism? I'm assuming the angle of incidence to be the number of degrees from a perpendicular line on the side of a prism the ray starts passing through... I'm trying to figure out the angle the ray would be off of a perpendicular line that intersected the side of the prism that the ray exited.
Is there a formula to calculate this?
Background:  I'm trying to use anamorphic prisms to stretch an image by a specific ratio... I can do it by trial and error and pretty much get what I am looking for but I wanted to see what the math was behind what was happening... I'm using 2 prisms with a 20 degree angle and made of BK7.  
 A: 20° is quite a small angle. If you are also sending light into the prism at a small angle (say ≤ 20°) to the normal to the first surface), then a good approximation to the total angle, $D,$ of deviation is
$$D=(n-1)A$$
in which $A$ is the prism angle (the angle between the faces through which the ray enters and leaves). $A$ must be small for the approximation to hold. $n$ is the refractive index of the material of the prism.
For example, consider a prism with $A=20.00°$ and $n=1.500$. For a ray incident on the first surface at 20° 'below' the normal, accurate (I hope) calculations based on Snell's law give $D=10.26°,$ whereas $(n-1)A=10.00°$.
A: If the two sides of the prism are parallel, then the ray will exit the prism at the same angle it entered, just offset.
If you need the offset, or the faces are not parallel, then you need to calculate the exact path the ray takes through the material.  That requires knowing the index of refraction for the material.  
If you have that, then you can use Snell's Law to calculate the angle of refraction.
