Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- F=BsplineFunction[model]; "Model surface as B spline Function"
- SurfaceSampling[p_] := Flatten[Table[F[u, v], {u, 0, 1, p}, {v, 0, 1, p}], 1]; "Surface Sampling Function"
- ModelSurface= SurfaceSampling[0.005]; "Actual sampling"
- g=Drop[T1[[2]][[1]].Append[vec,1],-1] "T1 Geometric Transform of point "vec""
- T1=FindGeometricTransform[Nearest[CtrlPts, ModelSurface],CtrlPts,"Transformation"->"Rigid",Method->"FindFit"]; "CtrlPts is the point could"
- ModelSurface = Map[g,ModelSurface] "Apply found transformation to the ModelSurface"
- T = T1[[2]][[1]].T; "After some iteration, T will become the optimal trasformation"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement