Aircraft wings are commonly designed with non-planar geometry, such as winglets, in order to improve aerodynamic efficiency. This work presents a method for generating nonplanar wing designs through gradient-based optimization, which is then used to investigate the performance characteristics of non-planar wings. The non-planar parameterization is defined to give a large design space that allows the formation of highly non-planar features and permits large changes to the geometry. Aerodynamic characteristics are captured using an inviscid 3D panel method with approximations for viscous drag. The methodology is demonstrated by optimizing reference wings from literature and comparing aerodynamic performance. Investigations are also performed on the impact on performance when wings are raised or drooped, and the differences in aerodynamic behavior between the two designs.