Reflection and transmission calculations using a planewave