Preliminary implementation of the gradient
First complete version with wing thickness constraint