How to define spline shape for 2D game

I’m currently making 2d game with libgdx and I need to make ‘Beam Attack’

(image is from other game, and this is what I’m trying to achieve)

I’m not certain what is right term to call this shape.(concave curve? spline with height? spline with area?) Which is one of main reason I’m having hard time searching for how to handle this.

Someone told me there is ‘Catmull–Rom spline’ which helps how to interpolate points and generate spline. But as this shape need to be used as ‘attack’ the shape can’t be just line and need to be polygon that have area for hitbox. I’ve tried to using points Perpendicular to each point of spline or use same spline as other edge, but it didn’t worked out.

So I have two questions.
1.Is there any better term to describe this shape rather than just spline?
2.How does this polygon’s points should be defined to have right hitbox?

You could achieve what you want with a sine curve where you adjust the frequency and amplitude.

Something like

moveto(0,0)
for x = 0 to 1000
a = 100 * sin( x * pi / 1000)
y = a * sin( x * 2 * pi/100)
lineto(x,y)
endfor

(Did not test it myself yet, but I think it should work)

Thank you for the reply. but that isn’t exactly what I need.
I’m fine with making ‘line’ of curves which catmull-rom can work out.
Where I’m having trouble is making those line of curves into actual polygon with area.

There’s a Polyline class in libgdx, i cant see whether it does what you want, but googling how to make polylines gave some results when I tried to make something similar.

Thanks! I’m still having minor problems but googling polyline helped me a lot.