Using the data storage type defined on this page for raster images, and the draw_line function defined in this other one, draw a cubic bezier curve
(definition on Wikipedia).

include c:\cxpl\codes;          \intrinsic 'code' declarations
 
proc Bezier(P0, P1, P2, P3);    \Draw cubic Bezier curve
real P0, P1, P2, P3;
def  Segments = 8;
int  I;
real S1, T, T2, T3, U, U2, U3, B, C, X, Y;
[Move(fix(P0(0)), fix(P0(1)));
S1:= 1./float(Segments);
T:= 0.;
for I:= 1 to Segments-1 do
        [T:= T+S1;
        T2:= T*T;
        T3:= T2*T;
        U:= 1.-T;
        U2:= U*U;
        U3:= U2*U;
        B:= 3.*T*U2;
        C:= 3.*T2*U;
        X:= U3*P0(0) + B*P1(0) + C*P2(0) + T3*P3(0);
        Y:= U3*P0(1) + B*P1(1) + C*P2(1) + T3*P3(1);
        Line(fix(X), fix(Y), $00FFFF);          \cyan line segments
        ];
 Line(fix(P3(0)), fix(P3(1)), $00FFFF);
Point(fix(P0(0)), fix(P0(1)), $FF0000);         \red control points
Point(fix(P1(0)), fix(P1(1)), $FF0000);
Point(fix(P2(0)), fix(P2(1)), $FF0000);
Point(fix(P3(0)), fix(P3(1)), $FF0000);
];
 
[SetVid($112);          \set 640x480x24 video graphics
Bezier([0., 0.], [30., 100.], [120., 20.], [160., 120.]);
if ChIn(1) then [];     \wait for keystroke
SetVid(3);              \restore normal text display
]