So this is what the math would look like.
X,y is the position on the curve.
If we advance t by a small amount and get that xy then subtract the position from that we get a direction vector.
We can then normalize it to make it have a length of 1.
So then if we swap xy and make one negative it’s the same as rotating 90 degrees.
So we end up with a point 50 pixels to the left and right of a point on the curve.
x = cubic(x0,x1,x2,x3,t)
y = cubic(y0,y1,y2,y3,t)
dx = cubic(x0,x1,x2,x3,t+0.001)-x
dy = cubic(y0,y1,y2,y3,t+0.001)-y
mag = distance(0,0,dx,dy)
dx = dx/mag
dy = dy/mag
points:
x+dy*50, y-dx*50
x-dy*50, x+dy*50