# Image-Based Tactile Deformation Simulation and Pose Estimation for Robot Skill Learning
## 2 Materials and Methods
### Model Proposal
#### 2.2.2 Two-Dimensional to Three-Dimensional Chain Distribution  
To create a chain model that accurately represents the entire hemispheric skin of the TacTip in three-dimensional space, it was necessary to determine the optimal distribution of the chains. Initially, a model was explored where all chains converged at the center of the hemisphere. However, several issues arose with this approach, including a reduced simulation resolution near the edges of the TacTip and discontinuity in the shape due to chains that remained untouched and undeformed. To address these issues, two optimized chain distribution patterns were proposed.  
**Pattern 1: Designated Crossing Point**  
In this refined model, chains do not converge at the center of the TacTip but intersect at a specific coordinate, as shown in Figure 9. When interacting with point or surface contacts, the central intersection point of the chains aligns with the contact point or the center of the contact surface, respectively. This configuration ensures that the area of densest chain distribution coincides with the contact surface, thereby enhancing the resolution of the simulation. Additionally, it ensures deformation of all chains, as their intersection is within the contact surface, thereby resolving inconsistencies caused by undeformed chains.  
A challenge arises with slender contact surfaces that resemble a line. Placing the intersection point directly on such a line can lead to complications, as depicted in the figure below. If the intersection is at the center of line contact, all chains would share the same contact point, mimicking a point contact in the simulation. To avoid this, the intersection point is slightly offset from the center of the contacted line.  
**Pattern 2: Transverse and Vertical Chains**  
Another proposed model arranges chains in both transverse and vertical directions around the contact surface, aiming to yield more intuitive displacement results in both the x and y directions, as shown in Figure 10. A bounding box, based on the contact surface, guides the placement of transverse and vertical chains, while additional chains intersect at the surface's center, ensuring comprehensive representation, especially at the corners.  
This arrangement, with chains distributed around the contact surface, ensures a high-resolution simulation by having a sufficient number of chains intersect the surface. As all chains cross the contact surface and deform, this effectively eliminates shape discontinuities. Furthermore, this design avoids the line contact issue encountered in the \"Designated  
Figure 9: Designated intersection point distribution pattern.  
Crossing Point\" model, as the chains do not converge at a single point, allowing for distinct deformation patterns between line and point contacts.  
**Discrete to Continuous Result**  
The developed model utilizes multiple chains to represent the shape of the TacTip, recording both initial and displaced coordinates of points marking the ends of the chain sections. Calculating the displacement for each chain point is straightforward; however, this approach accounts for discrete points, leaving the displacement of arbitrary points on the TacTip undefined.  
To convert discrete displacement data into continuous information applicable to any point on the TacTip (which is crucial for determining pin positions in various TacTip versions), [PERSON]'s NearestNDInterpolator is employed. A 100 \(\times\) 100 grid, representing displacement in the (x, y) coordinates and covering the TacTip's dimensions, is established. The grid's resolution can be enhanced by increasing the number of cells. The displacement value for each chain point is assigned to the grid cell corresponding to its initial coordinates. [PERSON]'s NearestNDInterpolator then interpolates to populate all empty grid cells with values from their nearest filled cells. Consequently, every cell in the grid is assigned a displacement value, allowing for the determination of any pin's post-deformation displacement within this framework.