How to make a rectangular coil shape I have seen this video

I want to make this coil curve shape but in rectangular shape

In the video its shown in the circle way. But i want to make in the rectangular way. I want my mesh to go in the rectangular way with the curve edge at corners. How can i spin im not getting it.



With the reference video i tried to make but fail to make that shape. Is there a way with a quick way i can make it. Any suggestion or help. Thanks
You could start with a spiral and stretch it to a rectangle.