Bezier surfaces with prescribed diagonals

The affine space of all tensor product B\'ezier patches of degree nxn with prescribed main diagonal curves is determined. First, the pair of B\'ezier curves which can be diagonals of a B\'ezier patch is characterized. Besides prescribing the diagonal curves, other related problems are considered, those where boundary curves or tangent planes along boundary curves are also prescribed.


Introduction
One of the paradigmatic problems in the realm of computer design is to build a surface once its boundary is prescribed.In the case of Bézier surfaces, there is an extensive literature dealing with the problem of building a Bézier surface with a prescribed boundary.
These kinds of method are fundamentally based on seeking the minimization of some functional with a defined geometric meaning in the space of all Bézier surfaces with that border.Examples of these functionals include the area functional, which gives rise to a non-linear problem, or quadratic functionals, such as the Dirichlet functional or similar.All of these methods can be easily implemented so that the designer is immediately able to visualize the result of any change to the initial data.
Functional minimization can be performed if all the boundary curves are given, so the surface shape is quite controlled.Nevertheless, this is not in general true for PDE surfaces, where the number of boundary curves that can be prescribed depends on the degree of the PDE (see [7] and related references).For example, in order to obtain harmonic surfaces only two boundary curves can be prescribed so the other two get out of control.Hence small changes in the prescribed data could produce big changes in the shape of the two free boundary curves.Therefore, although the natural way of controlling the shape of a surface is through its boundary, a way of increasing control could be to fix some curves on the surface.For this purpose, the main diagonal curves of a tensor-product Bézier surface seems to be the best choice.So, the goal here is to give a method that allow prescribing not only the boundary curves but the diagonal curves of the surface.
In fact, diagonal curves play an important role in engineering applications of surface modeling, such as architectural design or the design and optimization of quad meshes in architectural geometry [3].However, very few studies have been published on constrained modeling of tensor-product surfaces with diagonal curves, (see [12] and [13]).
Two situations where controlling the diagonal curves of Bézier patches seems to be fundamental can be found in the literature.The first is related to conversion from rectangular patches into a triangular scheme.
Based on the concept of diagonal curve, [10] and [4] respectively proposed S-Patch and BS-Patch.The authors of paper [11] added some requirements for the main diagonals of a Hermite bicubic patch to be able to adapt to a triangular scheme.The requirements are related to the degree of the diagonal curves.Indeed, as stated in [4], conversions between quadrilateral and triangular meshes need the degree of the diagonal curves to match the degree of the boundary curves of the quadrilateral meshes.Moreover, the reverse adaptation, from triangular to rectangular patches, would require building rectangular patches where not only the boundaries but also the diagonal curves are prescribed.
The second situation where diagonal curves play a main role is in the design of surfaces with some geometric property.In papers [8] and [9] the authors deal with constant mean curvature surfaces.Such kind of surfaces allow parameterizations with isothermal coordinate lines.That is to say, the two families of coordinate lines are mutually orthogonal and tangent vectors at an intersection point are of the same length.In addition to these two families of coordinate lines, diagonal curves are used not only for better aesthetics, but also to improve structural stability.The structures that can be built using these methods could be modified as follows: once the mesh of coordinate lines and the diagonal lines are obtained, they can be used as prescribed data to obtain rectangular Bézier patches with additional properties.
A more general situation can be found in papers [5] and [6], where the authors discuss the problem of adding features to a free form surface by applying one or several user-defined surface curves, which are seen as editable parameters.These userprescribed curves can be diagonal curves, but are not necessarily so.
Since the surface control net is related to the diagonal curves control points, (see [2]), the point is that, in order to be prescribed, the boundary control points and the control points of the diagonal curves in particular must meet certain conditions that will be shown in this paper.In [12], the authors considered a similar problem, and provided a method for generating a surface from free boundaries and diagonal curves given by the user, that is, without taking into account that boundaries and diagonals are related, so they have to meet some conditions.They then proposed a correction of this given information using Lagrange method to minimize the corresponding differences.
Let us recall that when we prescribe C 0 -boundary conditions, that is, when the boundary of a n × n Bézier surface is prescribed, then 4n boundary control points are fixed from a total of (n + 1) 2 .Equivalently, we can say that the affine space of all Bézier surfaces with the same boundary is parameterized by the (n − 1) 2 interior control points.Analogously, when we prescribe C 1 -boundary conditions, that is to say, when the boundary and the tangent planes along it are prescribed, then the 4n boundary control points and the 4n − 8 control points adjacent to the boundary are fixed.Equivalently, the affine space of all Bézier surfaces with the same boundary and tangent planes along it is parameterized by the (n − 3) 2 interior control points.
In a similar fashion, this paper deals with the following problem: What is the affine space of all Bézier surfaces with the same diagonals, or with the same boundaries and diagonals?In other words, is it possible to determine which control points are fixed if only the diagonals or the diagonals and the boundaries are prescribed?Which subset of control points parameterizes the corresponding affine space?
We solve the following problems: a) Find the conditions, in terms of their control points, that two Bézier curves must fulfill in order to be the diagonal curves of an indeterminate Bézier surface.
Then, find the conditions, again in terms of these diagonal curves control points, for them to be the diagonal curves of a Bézier surface with a fixed border.
b) Once this goal has been achieved, find the dimension of the space of all Bézier surfaces that have certain boundary and diagonal curves.This dimension indicates nothing but the number of control points of the Bézier surface that are free once both the boundary and the diagonals have been prescribed.
Finally we have also considered the above problems for both the two prescribed diagonals and the prescribed C 1 -boundary conditions.
Let us remark that free control points of a Bézier surface with a prescribed boundary and diagonals could be determined by minimizing a functional, such as the Dirichlet functional or any similar one.

Admissible pairs of main diagonal curves
Let us consider a tensor product Bézier surface of degree n×n, x : . The pair of main diagonal curves of this surface are the Bézier curves of degree 2n: Initially, we are interested in the following problem: What are the conditions that a pair of degree 2n Bézier curves must meet in order to be the main diagonals of a tensor product Bézier surface?
A first condition can be obtained easily on the control polygons, as illustrated by Figure 1, since the midpoints have to coincide This simple fact has been pointed out in several references, see for instance [1], page 183, or [12].The novelty here is that such a condition will be completely expressed as a condition on the control points of both Bézier curves.
Lemma 1.The midpoint of two Bézier curves of degree 2n with control polygons is the same if and only if Proof.Since i R i , and the result is obtained.
In paper [2] the authors state that the control points of a diagonal curve verify a particular dependence on the points of the Bézier surface control net.
i=0 is the control polygon of the first diagonal curve of a Bézier surface with control net {P i,j } n i,j=0 , the control points, Q k , of the diagonal curve in terms of the control net are The fact is that Q k depends only on the control points P i,j such that i + j = k.Let us consider only those control points, Q k , with k ≤ n.The others follow by symmetry.Treat the P i,j with i + j = k as a degree k Bézier curve and degree-elevate this curve 2n − k times, that is, until it is of degree 2n.Then, the middle control point on this degree-elevated curve equals Q k , (see [2] and Figure 2).
As we said, we are interested in finding the conditions that two Bézier curves must meet in order to be the main diagonals of some Bézier surface.Obviously, these curves must have the same midpoint, but, as we will see later in Theorem 1, condition ( 2) is necessary but not sufficient for two curves to be the diagonal curves of a Bézier surface.In fact, this condition splits in two more conditions.
As we will show, this splitting is a consequence of the fact that any diagonal control point, Q k , depends only on the control points in a diagonal line of the control net, P i,j with i + j = k.Thus, condition (2) splits into two sufficient conditions according to the parity of the indexes of the control points.We will state this in Theorem 1, but beforehand we will need the following auxiliary Lemma.

Lemma 3. Let us suppose that {Q i } 2n
i=0 is the control polygon of the first diagonal curve, x(t, t), and that {R i } 2n i=0 of the second diagonal curve, x(t, 1 − t), of a Bézier surface with control net {P i,j } n i,j=0 , then are the control points of the diagonal curves of a Bézier surface with control net {(−1) i+j P i,j } n i,j=0 .
Proof.As we said before, if {Q i } 2n i=0 is the control polygon of the first diagonal curve of a Bézier surface with control net {P i,j } n i,j=0 then and if we multiply this equation by and the first statement is proved.The procedure is analogous for the second statement.
Let us recall again the relation between the control net and the control points of the diagonal curves: where Now we will give the necessary and sufficient conditions for two control polygons to be the control points of the two diagonal curves.
Theorem 1. Two Bézier curves of degree 2n with control polygons are the main diagonals of a tensor product Bézier surface of degree n × n if and only if, for even n or, for odd n Proof.Let us suppose that n is even.The proof is analogous if n is odd.First we will prove that if the curves are the main diagonals of a tensor product Bézier surface with control net {P i,j } n i,j=0 Eq. ( 5) is fulfilled.By Lemma 1 we have which can be rewritten as Let us consider the Bézier surface with control net {(−1) i+j P i,j } n i,j=0 .By Lemma 3 the control polygons of the main diagonals are {(−1) i Q i } 2n i=0 and {(−1) n−i R i } 2n i=0 , then if we apply Lemma 1 again we have Adding and substracting the equations ( 7) and ( 8), we get Eq.5.
In order to prove the converse we need to check that if Eq. ( 5) is fulfilled then the linear system with the surface control points as unknown variables, has a solution.The conditions in the statement are what we need for the linear system, Eq. ( 9), to be compatible.It is easy to check that We will show, in addition, that these are the only two vanishing linear combinations of the left hand side of Eq. ( 9).Once this is proved then conditions in Eq. ( 5), that are same linear combination but of the right hand side terms of system (9), will imply the compatibility of the system.
So, let us consider an arbitrary vanishing linear combination of the left hand side in system ( 9) Any control point P r,s appears only once in D n r+s (P) and in E n n+r−s (P) and with the same coefficient n r n s , see Eq. (3).Then, the coefficient of P r,s in Eq. ( 11) is Then, since the linear combination in Eq. ( 11) must vanish for all P r,s in the control net, λ r+s + µ n+r−s = 0, the linear combination coefficients are opposites, as in Eq. (10).This happens for all sums r + s, so we have λ r+s = λ r−i+s+i = −µ n+r−s+2i , in other words, all λ r+s coefficients with the same parity of subindex are the opposite of all µ r+s coefficients with the same parity.Thus, for all even (odd) subindices λ r+s = λ even (odd) = −µ r+s .Thus Therefore, this linear combination of equations in system ( 9) is a linear combination of the equations in (10).In other words, as mentioned before, Eq. ( 10) contains the two only vanishing linear combinations of the left hand side of Eq. (9).
Since the right hand side verifies the same relation, Eq. ( 5), we can be sure that system (9) has a solution, so a Bézier control net that fits the given diagonals control polygons does exist.
Although we are mainly interested in dealing with both main diagonals simultaneously, it would be possible to deal with the case where only one diagonal is prescribed.Notice that although we will not consider it here, this case is simpler since the fundamental midpoint restriction, in Eq. ( 1), does not apply.
Remark 1.The proof of the splitting of Eq. ( 2) has been obtained thanks to auxiliary Lemma 2, but there is an alternative way to prove it using rational Bézier surfaces.As said in [1],(page 183), the two diagonal curves of a rational Bézier surface, x(u, v), not only pass through point x( 12 , 1 2 ), but also meet one more time: α 1 (∞) = α 2 (∞).This second condition can be written in terms of the (projective) control points of the two diagonals as in Eq. ( 2) but after a change of sign of the odd terms.When the rational Bézier surface reduces to a Bézier surface, in other words, when all the weights are the same, we obtain Eq. (8).
The relation between the control points of the diagonal curves, given in Theorem 1, makes it possible in the odd case to solve both central control points, Q n and R n , in terms of the other control points.However, it is not possible to do the same in the even case since Q n and R n appear in the same equation.We illustrate this relation in the following corollary.
i=0 are the control polygons of the main diagonals of a Bézier surface if and only if for even n and, for odd n At this point, let us remark that user could give two curves the role of diagonal curves which do not intersect.In that case, the substitution of both central control points of the given diagonal curves by those computed with Eq. 12 in Corollary 1, for odd degre, would change the given input to a pair of admissible diagonal curves, see Figure 3.For even degree, the corresponding control point subtitutions should be done, Eq. ( 13).For odd degree, the control point which is modified is the central one, so the shape of the new diagonal curves is not too different to the initial one.In the case of even degree, if there was some symmetry in the given diagonals it could be lost in the modified diagonal curves.Nevertheless, a way of solving this handicap easily would be to carry out a degree elevation of the even degree curves given by the user, and then proceed with the degree-elevated odd case.
An alternative way of adapting the information provided by the user was given in papers [12] and [13], where the authors minimized the distance between the given and new diagonal curves.Now, in the same fashion but considering the necessary conditions in Theorem 1 (or Corollary 1), an analogous minimization procedure could be performed.Definition 1. Two tensor product Bézier surfaces of degree n × n are said to be diagonals equivalent if they have the same main diagonal curves.
Proposition 1.The class of diagonals equivalent surfaces is an affine subspace that can be parameterized by (n − 1) 2 control points.
Proof.Let us compute the dimension of the affine subspace of solutions of system (9).The number of variables, {P i,j } n i,j=0 , is (n+1) 2 .The number of equations of the linear system is 2(2n + 1) = 4n + 2, but its rank is two units less, as we have just seen in the proof of Theorem 1.Therefore, the dimension is Example 1.For n = 2 the two conditions in Eq. ( 5) are Therefore, if we solve it, as stated in Corollary 1, are the control polygons of two Bézier curves admissible as main diagonals of a degree 2 × 2 Bézier surface.Indeed, any Bézier surface with a control net has as its main diagonals the Bézier curves with the control polygons Q and R. Notice that once the diagonal curves are prescribed there is only one degree of freedom, P 0,1 .
Example 2. For n = 3 from Corollary 1 we have , are the control polygons of two Bézier curves that are admissible as main diagonals of a degree 3 × 3 Bézier surface with a control net     Notice that there are four degrees of freedom, P 0,1 , P 0,2 , P 1,1 , P 1,2 , in other words, the space of all degree 3 tensor product Bézier surfaces with given diagonals is an affine space of dimension 2 2 .In Figure 4, with the same given diagonal curves, we plot three different surfaces that belong to this affine space.

Generation of a surface with a prescribed boundary and compatible diagonal curves
Let us define another binary equivalence relation in the set of tensor product Bézier surfaces.
Definition 2. Two tensor product Bézier surfaces of degree n×n are said to be boundary and diagonals equivalent if they have the same boundary and the same main diagonals curves.
Proposition 2. The class of boundary and diagonals equivalent surfaces is an affine subspace that can be parameterized by (n − 3) 2 control points.
Proof.Initially, for a degree n × n Bézier surface with a prescribed boundary we have (n − 1) 2 free interior control points.However, since the main diagonal curves must start and end at the corner control points of the net and moreover, the starting and ending derivatives of the diagonal curves are also prescribed by the boundary points, that is to say, then, the system in Eq. ( 9), has eight fewer equations, We show in the proof of Proposition 1, that the rank of the system in Eq. ( 9) is 4n, so now the rank of the reduced system, in Eq. ( 15), is 4(n − 2).Therefore, the number of free control points is According to this result, for degrees n = 2 and n = 3, if we prescribe the boundary and the main diagonal curves, the Bézier surface is totally determined.The situation changes for n ≥ 4. For example, for n = 4 there is a family of Bézier surfaces, which is parameterized by just one interior control point, in such a way that any element of this family has the same prescribed boundary and diagonal curves.
Let us give some low degree examples in order to show the conditions that two control polygons Q and R must meet in order to be those of the diagonal curves of a Bézier surface with a prescribed boundary.
Example 3.For n = 3.When the boundary is prescribed the endpoints of the diagonal curves and the respective tangent lines at these endpoints are fixed, namely Q 0 , Q 1 , Q 5 , Q 6 and R 0 , R 1 , R 5 , R 6 , see Eq. ( 14).Therefore, the diagonal curves can be controlled by Q 2 , Q 4 and R 2 , R 4 , which can be interpreted as meaning that the curvature at the endpoints remains free.Hence, we fix the boundary of the Bézier surface as follows: and using Corollary 1 and the conditions at the corners, in Eq. ( 14), the control polygons of the main diagonals are ,3 + P 3,2 ) , P 3,3 ,1 + P 3,1 ) , P 3,0 , where Therefore, if we fix the boundary of a cubic Bézier curve and its (compatible) diagonals, then the surface is fully determined.
In all the following figures the control points that can be freely prescribed are represented by large points, while those that are determined (by the large ones) are represented by small points.The Bézier surface control net is shown in green and the diagonals control points in red.
For example, in Figure 5, the prescribed boundary control points are, large green points, and the diagonal curves that can be controlled by Q 2 , Q 4 and R 2 , R 4 , are large red points.The remaining control points in the net and in the diagonals polygons are determined and are represented by small points.Let us remark that, in this case, the diagonals are controlled by the eight control points Q 2 , Q 3 , Q 5 , Q 6 , R 2 , R 4 , R 5 , R 6 but, in addition, P 1,2 is free.The two diagonals do not depend on P 1,2 .Indeed, the control polygons are (P 3,4 + P 4,3 ) , P 4,4 , R = P 0,4 , 1 2 (P 0,3 + P 1,4 ) , R 2 , R 3 , R 4 , R 5 , R 6 , 1 2 (P 3,0 + P 4,1 ) , P 4,0 , with Proof.For a degree n × n Bézier surface with a prescribed C 1 -boundary we have (n − 3) 2 free interior control points, that is to say, the boundary control points and their neighboring lines in the net are prescribed.If we also prescribe the two main diagonals, these (n − 3) 2 control points are related into a compatible linear system of rank 4(n − 4), since 16 equations from the initial system with rank 4n, in Eq. 9, only relate prescribed points.Therefore, the number of free control points is According to this result and similarly to the previous work, if we prescribe the boundary, the tangent planes along it and the two diagonal curves, then the smallest degree surfaces with free control points are degree 6 × 6 surfaces.For n = 6 there is a family of Bézier surfaces, parameterized by just one interior control point such that, any element of this family has the same prescribed boundary and tangent plane along it and the same prescribed diagonal curves.
As before, we give some low degree examples.
Example 5.For n = 5.If we fix the boundary, the tangent planes along it and the main diagonals we determine the whole surface.Corollary 1 determines the central control points, Q 5 and R 5 , of the main diagonals and moreover Q depend on prescribed points of the control net, see Eq. ( 4).The interior (n − 3) 2 control points of the net are as follows:    After studing all these different methods for generating surfaces from prescribed information let us make only a comment about multi-patch surfaces.Two patches could be, of course, continously connected along matching boundaries, and they could also be C 1 connected when we prescribe tangent planes along the boundaries of neighbour patches and they agree.But the thing is that, since the tangent lines at the diagonal curves at the corner points depend on the boundary control points, see Eq. ( 4), if certain continuity conditions on the diagonal curves are wanted, it implies that conditions on the prescribed boundary and tangent planes must be imposed.A detailed study of this issue, but out of our scope here, shows that if we want the diagonals to be well connected, then the connection of the patches at the common point to four patches must be C 1 .
In short, if we consider the problem of multi-patches and we want a good connection of diagonal curves, this entails some conditions on the boundary and the tangent planes.

Conclusion
First, in this paper, we study the necessary and sufficient conditions that two curves must verify in order to constitute the diagonal curves of a tensor product Bézier surface, which allows us to determine tensor product Bézier surfaces with prescribed diagonal curves.
The possibility of controlling the diagonals would increase the control of the resulting surface, so, the goal we achieve here is to provide a method that makes it possible to prescribe not only the diagonal curves of the surface but also its boundary, or its boundary and the tangent planes along it.
Whereas for low degrees, it is easy to check that there is only one Bézier surface with prescribed main diagonals and boundary, this is no longer true for higher degrees.For fixed diagonals and boundary not a unique Bézier surface but a family of Bézier surfaces is determined.Such a family has the structure of an affine subspace whose dimension is also determined here.
In other words, there is an equivalence class of Bézier surfaces that have the same diagonals, or the same diagonals and boundary as well as having the same diagonals and meeting the same C 1 -boundary conditions.
In fact, what we are able to prove is that the set of all degree n × n Bézier surfaces where both the diagonal curves and the boundary are prescribed is an affine space of dimension (n − 3) 2 whereas the set of surfaces with prescribed diagonals and C 1 -boundary conditions has the dimension (n − 5) 2 .Therefore, although only for degrees n ≤ 3 and n ≤ 5, respectively, a unique Bézier surface exists as a solution.For higher degrees, there are free control points, that could also be determined by functional minimization, considering functionals defined on the surface, such as the Dirichlet functional.

Figure 1 :
Figure 1: The two main diagonals of a tensor product Bézier surface.Notice that both have the same midpoint.

Figure 2 :
Figure 2: Control polygon (red) of the diagonal curve of a biquadratic Bézier surface obtained by repeated degree elevation.The corresponding degree elevation control points are also in red.

Figure 3 :
Figure 3: If a designer gave two curves that do not intersect (dashed line), one could modify them slightly by means of Corollary 1 in order to get two admissible diagonal curves.

1 −Definition 3 .Proposition 3 .
70 (−P 0,0 + P 0,4 + P 4,0 − P 4,4 ) , P 0,3 + P 1,0 − P 1,4 − P 3,0 + P 3,4 − P 4,1 + P 4,3) + Q 3 + Q 5 − R 5 .4Generation of a surface with a prescribed boundary and tangent planes along it with compatible diagonal curvesLet us define the following binary equivalence relation in the set of tensor product Bézier surfaces.Two tensor product Bézier surfaces of degree n × n are said to be C 1boundary and diagonals equivalent if they have the same boundary, the same tangent planes along it and the same main diagonal curves.The class of C 1 -boundary and diagonals equivalent surfaces is an affine subspace that can be parameterized by (n − 5) 2 control points.

Figure 6 :
Figure 6: n = 4. Same boundary curves for all figures but two different pairs of main diagonals.In each column, with the same diagonal curves, two surfaces are obtained by changing the free control point P 1,2 , in blue.

Figure 7 : n = 5 .Example 6 .
Figure 7: n = 5.Prescribed boundary and tangent planes along the boundary, shown as large green points, and the control points Q 4 , Q 6 and R 4 , R 6 , shown as large red points, let us control the shape of the diagonals.Again after prescribing the C 1boundary control points and the diagonal curves the whole surface is determined.

Figure 8 : n = 6 .
Figure8: n = 6.Given a boundary, the tangent plane along it and the diagonal curves of a Bézier surface, Q 4 , Q 5 , Q 7 , Q 8 and R 4 , R 5 , R 6 , R 8 being the diagonal curves control points that can be prescribed, there is still one free control point, P 2,3 (black).