Artificial intelligent assistant

Generate roof from a 2D polygon Let's say we have a 2D Polygon ( it can be concaved or convex), and on top of this polygon we are required to build a house roof. What is the algorithm that one can use for this? The conditions: 1. The roof cannot be $0^o$ or $90^o$. 2. The created roof piece must be as smooth as possible ( smooth is defined as first order differentiable), meaning the slope of the roof must not change unnecessarily. I'm sorry if the conditions sound vague. If you get lost, just think about this: you have a house, how do you generate the roof profile? Note: The roof plan must be uniformly sloping, so no circle, or bump can be used.

Try computing the straight skeleton of the polygon. See also < and < for instance.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 6733a1860c41ba43e5b9c0e6424b52d4