Advertisement
Guest User

Untitled

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