MakePath

function MakePathI(const pts: array of integer): TPathD;

function MakePathD(const pts: array of double): TPathD;


uses 
  Img32, Img32.Fmt.PNG, 
    Img32.Vector, Img32.Draw;
...
var
  img: TImage32;
  path: TPathD;
  pts: TPathD;
begin
  img := TImage32.Create(256,256);

  //create and draw a RED CSpine path
  pts := MakePathI([50,200, 40,160,
    90,160, 80,200, 120,240, 110,200,
    150,160, 140,200, 180,240, 170,200,
    210,160, 200,200]);
  path := CSpline(pts);
  DrawLine(img, path, 8, clRed32, esRound);

  //omitted code that shows where the 'pts' are
  //and where the derived control points are
  
  img.SaveToFile('splines.png');
  img.Free;
end;