Uniformal scaling of polyline

How does uniformal scaling of polyline looks like (without transformation)?

If I have a set of points of polyline

Do I do something like this?

//Get center of polyline

  for (int i = 0; i < n; i++) 
	  curveCenter += points[i];

  curveCenter /= n;

  for (int i = 0; i < n; i++) {

	 Vector3D vector =  curveCenter-points[i];
 	 points[i] += vector*(1-ratio)*0.5;

Any reason to not call the Transform method on the Polyline class (which also has a CenterPoint method just FYI)?

Learning purposes :slight_smile: