Abstract: A method includes obtaining a capacitive function of ground plane displacement and gap distance, and optimizing, using the capacitive function, an optimization function to obtain multiple slice lengths. The slice lengths correspond to multiple gap distances between a first sensor electrode and a second sensor electrode. The method further includes defining a sensor electrode shape using slice lengths and gap distances, defining a sensor electrode pattern based on the sensor electrode shape, and storing the sensor electrode pattern.