# Convert a polygon mesh into a b-spline surface

$$\textbf{Problem:}$$

Getting a $$\textit{polygon-mesh}$$ as input, I have to construct a surface that looks exactly to the given input. My task is to generate a $$\textit{b-spline}$$ surface that exactly looks like the connected polygon mesh. It is obvious that my $$\textit{b-spline}$$ surface has to have a degree of one in both directions $$\textit{u}$$ and $$\textit{v}$$.

$$\textbf{Output:}$$

As an output for my solution. I have to generate a matrix of $$\textit{control point}$$ that represent that generated surface.

One property of this matrix is that each elements of each row and column are connected with each others. If our control points matrix is a $$n \times m$$ matrix, then let $$C_i$$ a column of this matrix with $$C_i = $$ then there must exist path in the polygon from $$e_{1i}$$ to $$e_{mi}$$.

One thing to consider if there is no edge between $$e_{ji}$$ to $$e_{(j+1)i}$$, we can construct one as long as this edge lies inside the polygon.

$$\textbf{my trivial idea}$$

Assuming that the polygon has $$n$$ nodes. I create $$n$$ other nodes inside the polygon near each original node. I create then a $$2 \times n$$ matrix. The first row contains all the points constructing the polygon. Second row contains the corresponding additional inserted node. In order to connect two additional inserted nodes, i have to make sure that the line between two nodes is kept inside the polygon.

This idea works only for simple structure and the complexer is the polygon the hard to find these additional points.

Any good solutions maybe ?.

• To be clear, when you say "looks exactly like the given input", you mean exactly exactly, correct? As in, you want to create a b-spline model with only flat faces and sharp edges, and no true curves whatsoever? – Aaron Rotenberg Dec 12 '19 at 21:59
• Yes! indeed, a bspline surface with a degree of one, – Mohbenay Dec 13 '19 at 8:10