BEND straight curve keeping end points the same

I want to create tent like structure, and achieve the same result as the white model behind. So I have straight lines and I’m using graph mapper to bend it but the line is not keeping end points and not achieving wanted result. Does anyone know how to improve the code. The code and model is attached.
Bended (33.2 KB)
Bended lines.3dm (2.9 MB)