--Requires my graphics library
function parabola(elemtype,x1,x2,scale)
for x = x1, x2 do
y = 380 - (math.abs(x - (x2 - (x2 - x1) / 2)) ^ 2) / scale -- Calculate the y value based on the x value
if y < 0 then -- if y is out of bounds, set to 0
y = 0
end
ftgl_line(elemtype,x,y,x,380) -- Draw a line from x,y to x,380
end
end
Requires my graphics library to run.
To run, type in console: parabola(element, start x, stop x, scale) - The scale is the curvature of the parabola. A higher scale makes a wider parabola.
Good idea...
There, I got rid of it.