Very interesting @HS_Kim. I rebuilt a surface manually in Rhino to study your code further. I don’t remember using PDeform before and was a bit surprised by what it does when you move only four control points:
Before:
After:
Curious to see what would happen if I used the control points from a rebuilt surface instead of the SDivide points I’ve been using, I mashed some bits together using two copies of PDeform to account for the separate XY and then Z displacements. My algorithm has been moving all those (grid/control) points (that is, all inside a proscribed circle) instead of only a few as you and @jasongberger did, then building a new surface with SrfGrid.
It worked well and I was pleasantly surprised that the second PDeform produced a surface with control points identical to SrfGrid.
Convinced I need a SrfRebuild but reluctant about plugins, I created one in Python:
import rhinoscriptsyntax as rs
Srb = S.Rebuild(uDegree, vDegree, uCount, vCount)
Then used it as follows:
Vasarely_srf_2019Jul15c.gh (31.9 KB)
And with SrfMorph 3D “stick-ons”:
Vasarely_srf_2019Jul15b.gh (34.4 KB)
It should be explicitly noted that the ‘uvCount’ used to cut holes or place stick-ons is completely independent from the ‘uvCount’ used to rebuild the surface.
This is an update to the Iso Curve viewer tool I posted this morning. It uses Range to draw ‘Iso Curves’ dividing each surface into 10 X 10:
rebuilt_srf_2019Jul15a.gh (28.1 KB)