TODO: implement gauss filter and finish smooth constraint(conforming)