I would like to draw segment line between two point in 2d thin plate spline grid.
Problem
When I use segment function it doesn't match the actual point in grid.
plotRefToTarget(PCA$shapes$shapes.comp1$min,msh,outline = PCA$shapes$shapes.comp1$min)
for(j in 1:9){
segments(x0 = PCA$shapes$shapes.comp1$min[j],y0=PCA$shapes$shapes.comp1$min[j+9],x1=PCA$shapes$shapes.comp1$min[j%%9+1],y1=PCA$shapes$shapes.comp1$min[j%%9+10])
}
I know that the code in for loop is not working correctly, but I don't know what function or parameter should I use.
**sorry for my english