Spatial constraint based triangular mesh operations in three dimensions

10915670 ยท 2021-02-09

Assignee

Inventors

Cpc classification

International classification

Abstract

A method and system provide the ability to design a (land) surface. A triangular surface mesh representative of an existing surface is obtained. The mesh includes triangles that are connected by vertices and edges. Design constraint sets are determined based design constraints. The design constraints include a maximum slope constraint for a first triangle of the two or more triangles in the triangular surface mesh. The maximum slope constraint is a maximum angle between a normal vector of the first triangle and a reference vector. Heights of the vertices of the first triangle are projected onto the design constraint sets such that the normal vector satisfies all of the design constraints. The projecting includes modifying the heights by a minimum Euclidian distance. A design of the surface represented by the triangular surface mesh is generated based on the projecting.

Claims

1. A computer-implemented method for designing a surface, comprising: (a) obtaining, in a computer, a triangular surface mesh representative of an existing physical surface, wherein the triangular surface mesh comprises two or more triangles that are connected by vertices and edges; (b) determining, in the computer, one or more design constraint sets based on one or more design constraints, wherein at least one of the one or more design constraints comprise: a maximum slope constraint for a first triangle of the two or more triangles in the triangular surface mesh, wherein the maximum slope constraint comprises a maximum angle between a normal vector of the first triangle and a reference vector; (c) projecting, in the computer, one or more heights of the vertices of the first triangle onto the one or more design constraint sets such that the normal vector satisfies all of the one or more design constraints, wherein the projecting comprises modifying the one or more heights by a minimum Euclidian distance, and wherein the modifying changes the triangular surface mesh into a converged triangular surface mesh; (d) generating, in the computer, a design of the surface represented by the converged triangular surface mesh, wherein the generating is based on the projecting; and (e) rendering the design of the surface in a computer-aided design (CAD) application, wherein the surface is constructed based on the design.

2. The computer-implemented method of claim 1, wherein the one or more design constraints further comprise: a surface oriented minimum slope constraint for the first triangle, wherein the surface oriented minimum slope constraint comprises a minimum angle between the normal vector of the first triangle and a directional vector.

3. The computer-implemented method of claim 1, wherein: the surface comprises a land surface; and the method further comprises constructing the land surface based on the design.

4. The computer-implemented method of claim 3, wherein: the design comprises a computer-aided design (CAD) for the land surface.

5. The computer-implemented method of claim 1, wherein the reference vector comprises a Z-vector representative of gravity.

6. The computer-implemented method of claim 1, wherein: the projecting is performed iteratively until all of the one or more design constraints are satisfied.

7. The computer-implemented method of claim 1, wherein: the projecting onto the design constraint set for the maximum slope constraint comprises moving the normal vector onto a cone defined by an origin of the reference vector on the triangular surface mesh and a unit circle around the reference vector that is defined by the maximum angle.

8. The computer-implemented method of claim 1, wherein: the projecting onto to the design constraint set for the maximum slope constraint comprises moving the normal vector onto a polygonal shaped pyramid defined by the reference vector on the triangular surface mesh and a regular polygon around the reference vector, wherein edges of the polygonal shaped pyramid are at the maximum angle with the reference vector.

9. A system for designing a surface, comprising: (a) a computer having a memory and a processor; (b) a computer aided design (CAD) application executed by the processor; (c) a triangular surface mesh, obtained in the CAD application, wherein the triangular surface mesh is representative of an existing physical surface and comprises two or more triangles that are connected by vertices and edges; (d) one or more design constraint sets, determined by the CAD application, based on one or more design constraints, wherein at least one of the one or more design constraints comprise: a maximum slope constraint for a first triangle of the two or more triangles in the triangular surface mesh, wherein the maximum slope constraint comprises a maximum angle between a normal vector of the first triangle and a reference vector; (e) the CAD application projecting, in the computer, one or more heights of the vertices of the first triangle onto the one or more design constraint sets such that the normal vector satisfies all of the one or more design constraints, wherein the projecting comprises modifying the one or more heights by a minimum Euclidian distance, and wherein the modifying changes the triangular surface mesh into a converged triangular surface mesh; and (d) a design of the surface represented by the converged triangular surface mesh, wherein the design is generated and rendered in the CAD application based on the projecting, wherein the surface is constructed based on the design.

10. The system of claim 9, wherein the one or more design constraints further comprise: a surface oriented minimum slope constraint for the first triangle, wherein the surface oriented minimum slope constraint comprises a minimum angle between the normal vector of the first triangle and a directional vector.

11. The system of claim 9, wherein: the surface comprises a land surface; and the land surface is constructed based on the design.

12. The system of claim 11, wherein: the design comprises a computer-aided design (CAD) for the land surface.

13. The system of claim 9, wherein the reference vector comprises a Z-vector representative of gravity.

14. The system of claim 9, wherein: the application performs the projecting iteratively until all of the one or more design constraints are satisfied.

15. The system of claim 9, wherein: the application projects onto the design constraint set for the maximum slope constraint by moving the normal vector onto a cone defined by an origin of the reference vector on the triangular surface mesh and a unit circle around the reference vector that is defined by the maximum angle.

16. The system of claim 9, wherein: the application projects onto to the design constraint set for the maximum slope constraint by moving the normal vector onto a polygonal shaped pyramid defined by the reference vector on the triangular surface mesh and a regular polygon around the reference vector, wherein edges of the polygonal shaped pyramid are at the maximum angle with the reference vector.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) Referring now to the drawings in which like reference numbers represent corresponding parts throughout:

(2) FIG. 1 shows an example of an existing triangular, irregular mesh at the bottom, and a quadrilateral grid on the top;

(3) FIG. 2 shows how an existing triangular mesh is mapped in a quadrilateral grid;

(4) FIG. 3 illustrates an exemplary roof structure view from above;

(5) FIG. 4 depicts an example of a parking lot that has four horizontal parking rows;

(6) FIG. 5 illustrates a triangle mesh representative of an existing ground of a planned parking lot;

(7) FIG. 6 illustrates a triangular mesh for a planned parking lot where drainage happens in parallel, on either side of the building;

(8) FIG. 7 represents the mesh of an existing ground for a roundabout, where water needs to drain from the road at the top along the outer circle to the roads on either side at the bottom;

(9) FIG. 8 shows a triangular mesh in accordance with one or more embodiments of the invention;

(10) FIG. 9 illustrates a simple triangular mesh with vertices, edges, and two triangles in accordance with one or more embodiments of the invention;

(11) FIG. 10 illustrates two lines A and B that are shown as examples of two constraint sets in accordance with one or more embodiments of the invention;

(12) FIG. 11 shows the iterates of the DR method on two constraint sets A and B in accordance with one or more embodiments of the invention;

(13) FIG. 12 shows a triangular mesh from a birds-eye view in accordance with one or more embodiments of the invention;

(14) FIG. 13 shows the birds-eye view of a feature line on a triangular mesh in accordance with one or more embodiments of the invention;

(15) FIG. 14 illustrates a least squares problem in accordance with one or more embodiments of the invention;

(16) FIG. 15 illustrates a maximum angle for a normal vector of a ground plane with respect to gravity in accordance with one or more embodiments of the invention;

(17) FIG. 16 illustrates an optimal solution based on tangent points between a circle and level sets in accordance with one or more embodiments of the invention;

(18) FIG. 17 illustrates a desired orientation ({right arrow over (q)}) of a normal vector ({right arrow over (n)}) for a triangle plane in accordance with one or more embodiments of the invention;

(19) FIG. 18 illustrates a visualization of a surface minimum slope constraint in accordance with one or more embodiments of the invention;

(20) FIG. 19 illustrates a feasible set region for a normal vector with respect to a Surface Oriented Minimum Slope Constraint in accordance with one or more embodiments of the invention;

(21) FIG. 20 shows that there are exactly two tangent points (u, v) with positive Lagrange multipliers , one of which has u<0 and the other has u>0 in accordance with one or more embodiments of the invention;

(22) FIG. 21 shows that there is exactly one tangent point (u, v) with a positive Lagrange multiplier and u>0, and at least one tangent point with a nonpositive Lagrange multiplier in accordance with one or more embodiments of the invention;

(23) FIG. 22 illustrates a circular segment defining a feasible set for a maximum slope and an oriented minimum slope in accordance with one or more embodiments of the invention;

(24) FIG. 23 illustrates a circle representing a feasible region for a maximum slope constraint and for two oriented minimum slope constraints in accordance with one or more embodiments of the invention;

(25) FIG. 24 illustrates multiple surface oriented minimum slope constraints via the intersection of two corresponding circular segments in accordance with one or more embodiments of the invention;

(26) FIG. 25 illustrates two adjacent triangles with surface normal vectors that are used to minimize the curvature in accordance with one or more embodiments of the invention;

(27) FIG. 26 illustrates a hexagon that is used to replace a unit disk for a maximum slope constraint in accordance with one or more embodiments of the invention;

(28) FIG. 27 shows how the original half cone is now replaced with the absolute value function in accordance with one or more embodiments of the invention;

(29) FIG. 28 shows the starting situation for the problem shown in FIG. 7 in accordance with one or more embodiments of the invention;

(30) FIG. 29 shows the mesh of FIG. 28 after 10 iterations in accordance with one or more embodiments of the invention;

(31) FIG. 30 shows the mesh of FIG. 28 after 29 iterations in accordance with one or more embodiments of the invention;

(32) FIG. 31 shows the final mesh of FIG. 28 after convergence in accordance with one or more embodiments of the invention;

(33) FIG. 32 illustrates the mesh of FIG. 28 based on the problem shown in FIG. 8 after 15 iterations in accordance with one or more embodiments of the invention;

(34) FIG. 33 illustrates the mesh of FIG. 28 based on the problem shown in FIG. 8 after 100 iterations;

(35) FIG. 34 illustrates the final mesh of FIG. 28 based on the problem shown in FIG. 8 in accordance with one or more embodiments of the invention;

(36) FIG. 35 is the starting situation mesh for the problem shown in FIG. 9 in accordance with one or more embodiments of the invention;

(37) FIG. 36 illustrates the mesh for the problem shown in FIG. 9 after 10 iterations in accordance with one or more embodiments of the invention;

(38) FIG. 37 illustrates the mesh for the problem shown in FIG. 9 after 20 iterations in accordance with one or more embodiments of the invention;

(39) FIG. 38 is the final solution mesh for the problem shown in FIG. 9 after 20 iterations in accordance with one or more embodiments of the invention;

(40) FIG. 39 illustrates the logical flow for designing a surface in accordance with one or more embodiments of the invention;

(41) FIG. 40 is an exemplary hardware and software environment used to implement one or more embodiments of the invention; and

(42) FIG. 41 schematically illustrates a typical distributed/cloud-based computer system using a network to connect client computers to server computers in accordance with one or more embodiments of the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

(43) In the following description, reference is made to the accompanying drawings which form a part hereof, and which is shown, by way of illustration, several embodiments of the present invention. It is understood that other embodiments may be utilized and structural changes may be made without departing from the scope of the present invention.

(44) The figures herein are used to illustrate various geometric constraints on the triangles, design applications, and the way how iterative projections are performed.

(45) Mathematical notation is utilized herein for a precise description of the geometric constraints and the corresponding projections. The mathematical notation is fairly standard and follows largely [2]. R denotes the set of real numbers. By x:=y, or equivalently y=: x, we mean that x is defined by y. The assignment operators are denoted by and .fwdarw.. The angle between two vectors {right arrow over (n)} and {right arrow over (q)} is denoted by ({right arrow over (n)},{right arrow over (q)}). The cross product of {right arrow over (n)}.sub.1 and {right arrow over (n)}.sub.2 in R.sup.3 is denoted by {right arrow over (n)}.sub.1{right arrow over (n)}.sub.2.

(46) General Overview

(47) Embodiments of the invention provide a method and system for utilizing projections to various geometric design constraints for triangles in three dimensions, and proximity operators for design objective functions. The projections and proximity operators are executed on triangles that are part of an existing triangular mesh. Further, these projections and proximity operators are executed in an iterative way, such that the triangular mesh converges to an optimal solution for a computer-aided design in three dimensions.

(48) Problem Formulation

(49) A common representation of three dimensional objects in computer applications such as graphics and design, are triangular meshes. In many instances, individual or groups of triangles need to satisfy spatial constraints that are imposed either by observation from the real world, or by concrete design specifications for the objects. As these problems tend to be of large scale, choosing a mathematical optimization approach can be particularly challenging. For embodiments of the invention, various geometric constraints are defined as convex sets in Euclidean spaces, and the corresponding projections are found. Furthermore, proximity operators are introduced for certain objective functions. The projections and the proximity operators are used in an iterative method to find optimal design solutions.

(50) Triangular Mesh

(51) In computer-aided design, a triangular mesh is a surface that is represented by a set of connected triangles in three dimensional space R.sup.3. This form of mesh is also called a Triangular Irregular Network (TIN). FIG. 8 shows a triangular mesh in R.sup.3 with underlying contours on the R.sup.2 plane in accordance with one or more embodiments of the invention. What follows is a precise mathematical definition of such a triangular mesh.

(52) Assume that G=(V.sub.0,E.sub.0) is a given triangular mesh on R.sup.2 where V.sub.0 is the set of vertices and E.sub.0 is the set of (undirected) edges, i.e.,
V.sub.0:={p.sub.i=(p.sub.i1,p.sub.i2)R.sup.2|i{1,2, . . . ,n}},(1)
E.sub.0{p.sub.ip.sub.jp.sub.jp.sub.i|p.sub.i,p.sub.jV.sub.0}.(2)
From G, one can derive the set of triangles of the mesh as follows
T.sub.0:={=(p.sub.ip.sub.jp.sub.k)p|{p.sub.ip.sub.j,p.sub.jp.sub.k,p.sub.kp.sub.i}E.sub.0}.(3)

(53) One first aims to
find a vector z=(z.sub.1, . . . ,z.sub.n)X(4)
such that the points
{P.sub.i=(p.sub.i1,p.sub.i2,z.sub.i)}.sub.i{1, . . . ,n}satisfy a given set of constraints.(5)

(54) Clearly, the points (P.sub.i).sub.i{1, . . . ,n} also form a corresponding triangular mesh S in three dimensions, where the mesh does not contain triangles that have a vertical surface (since we first defined all the vertices as unique points in R.sup.2). FIG. 9 illustrates a simple triangular mesh with vertices
V.sub.0:={P.sub.1,P.sub.2,P.sub.3,P.sub.4},
edges
E.sub.0:={P.sub.1P.sub.4,P.sub.1P.sub.2,P.sub.2P.sub.4,P.sub.3P.sub.4,P.sub.2P.sub.4},
and the two triangles
T.sub.0:={(P.sub.1P.sub.2P.sub.4),(P.sub.2P.sub.3P.sub.4)}.
in accordance with one or more embodiments of the invention.

(55) Therefore, if there is no confusion, E.sub.0, V.sub.0, T.sub.0 will be reused to denote the vertices, the edges, and the triangles of the three dimensional mesh.

(56) Interval Constraint

(57) A designer may require that some of the vertices in the triangular mesh cannot exceed a certain elevation, or cannot be lower than a certain elevation. Hence, the elevation of these vertices needs to lie within a given interval. This is referred to as the interval constraint and is defined as follows. For a given subset I of {1, 2, . . . , n}, for all iI, the entries z.sub.i must lie in a given interval of R.

(58) Edge Slope Constraint

(59) A designer may require that the slope of a triangle edge cannot be steeper than a given value, or must be steeper than a given value. Hence, the edge slope needs to lie within a given interval. This is referred to as the edge slope constraint and is defined as follows. For a given subset E of the edges E.sub.0, and for every edge p.sub.ip.sub.jE, the slope

(60) s ij := z i - z j ( p i 1 - p j 1 ) 2 + ( p i 2 - p j 2 ) 2 ( 6 )
must lie in a given subset of R.

(61) Edge Alignment Constraint

(62) A designer may require that the edges of some of the triangles in the mesh align themselves. This is referred to as the edge alignment constraint and is defined as follows. For a given pair of edges p.sub.ip.sub.j, p.sub.mp.sub.nE.sub.0, the edges must have the same slope s.sub.ij=s.sub.mn.

(63) Surface Alignment Constraint

(64) A designer may require that the surfaces of some of the triangles in the mesh align themselves. Aligning triangle surfaces can result in useful patches inside the mesh that may be non-triangular. This is referred to as the surface alignment constraint and is defined as follows. For a given pair of triangles .sub.i, .sub.jT.sub.0 the normal vectors {right arrow over (n)}.sub..sub.i and {right arrow over (n)}.sub..sub.j must be parallel.

(65) Surface Slope Constraint

(66) A designer may require that one or multiple triangles cannot exceed a certain slope with respect to gravity. This is referred to as a maximum surface slope constraint. A designer may also require that some triangles need to have a certain minimum slope in the direction of a given vector. This is referred to as an oriented minimum surface slope constraint. Both surface slope constraints can be defined as a more general surface slope constraints that follow. For a given subset T of the triangles T.sub.0 and for each triangle T, there is a given set of vectors Q.sub. R.sup.3 such that for each {right arrow over (q)}Q.sub., the angle between the normal vector {right arrow over (n)}.sub. and {right arrow over (q)} must lie in a given subset .sub.{right arrow over (q)} of [0, ], which is also referred to as a surface orientation constraint.

(67) Curvature Minimization

(68) In some design problems, the designer may wish to construct a surface that is as smooth as possible. This problem is referred to as minimizing the curvature between adjacent triangles in the mesh. One way to minimize the curvature is to minimize the grade change between each pair of adjacent triangles in the mesh. One may define this as follows. For a given pair of triangles .sub.i, .sub.jT.sub.0 the normal vectors {right arrow over (n)}.sub..sub.i and {right arrow over (n)}.sub..sub.j we want to minimize the angle between the two normal vectors.

(69) Methods Overview

(70) Embodiments of the invention are based on projections, and the use of projections in iterative ways to find solutions for feasibility or optimization problems. A projection of a point onto a convex set is the shortest distance of that point to the set. For example, if a set is a plane in three dimensions, then the projection of a point onto that set is its shadow on the plane. If the point to be projected is already on the plane, than the projection is the point itself.

(71) Given multiple sets (e.g. multiple planes in three dimensions) and a starting point, iterative projection methods can be used to find a point in the intersection of all these sets that is closest from the starting point. These methods project iteratively onto the different sets. If the given sets are convex, then the iterative projections will converge to a solution.

(72) In embodiments of the invention, the sets for each constraint are identified. Closed-form projections are then developed for each of the constraint sets. A proximity operator can be found for the curvature minimization. Iterative projection methods, such as the Douglas-Rachford splitting method, are then used to project iteratively to the constraint sets. This alters the elevations of the triangles in the triangular mesh until the mesh converges to a configuration that is desired by the engineer.

(73) Projections onto Constraint Sets

(74) Suppose there are J constraints imposed on a model. For j {1, 2, . . . , J}, we denote by C.sub.j the set of all points that satisfies the j-th constraint. Thus, (4) can be written in the mathematical form

(75) find a point x C := .Math. j { 1 , 2 , .Math. , J } C j , ( 7 )
which is referred to herein as a feasibility problem. Moreover, of the infinitude of possible solutions for (7), one may be particularly interested in those that are optimal in some sense. For instance, it could be desirable to find a solution that minimizes the slope change between adjacent triangles, a solution that minimizes the volume between the initial triangles and the triangles in the final solution, or variants and combinations thereof.

(76) If more than one objective function is of interest, it is common to additively combine these functions, perhaps by scaling the functions based on their different levels of importance. In summary, one goal is to solve the problem

(77) min F ( z ) subject to z C := .Math. j { 1 , 2 , .Math. , J } C j , ( 8 )
where F may be a sum of (scaled) objective functions. The function F is typically nonsmooth which prevents the use of standard optimization methods.

(78) A constraint set CX is the collection of all feasible data points, i.e., points that satisfy some requirements. Suppose the given data point zX is not feasible (i.e., z.Math.C), one aims to modify z so that the newly obtained point x is feasible (i.e., xC ); and one would like to do it with minimal adjustment on z. This task can be achieved by using the projection onto C. Recall that the projection of z onto C, denoted by P.sub.Cz, is the solution of the optimization problem

(79) P C z := arg min x C .Math. .Math. z - x .Math. .Math. = { x C , .Math. .Math. x - z .Math. .Math. = min y C .Math. .Math. z - y .Math. .Math. } . ( 9 )

(80) It is well known that if C is nonempty, closed, and convex.sup.1, then P.sub.Cz is singleton, see, e.g., [26, Theorem 2.10]. .sup.1C is convex if for all x, yC and [0,1], we have (1)x+yC

(81) It turns out that all spatial constraints encountered in various exemplary settings may be convex and closed. Hence, their projections always exist and are unique. Moreover, one can also successfully obtain explicit formulas for these projections.

(82) Iterative Projection Methods for Feasibility Problems

(83) Consider the feasibility problem

(84) find a point x C := .Math. j { 1 , 2 , .Math. , J } C j , ( 10 )

(85) The intersection C is the feasible set containing the desired solutions. Clearly, it might be tempting to solve this problem by finding the projection onto C directly. However, this is often not possible due to the complexity of C. A workaround is to utilize the projection P.sub.C.sub.j onto each constraint, if the explicit formula is available. Then with an initial point, one can iteratively execute the projections P.sub.C.sub.j's to derive a solution for (10). Let z.sub.0 X be the initial data point. The following are just a few of many (iterative) projection methods (see [2, 10, 12] and the references therein).

(86) Cyclic Projections

(87) In this method, a point is projected in sequence, from one constraint set to the next. Once the projected point reaches the first constraint set again, it is referred to as one cycle or one iteration. FIG. 10 illustrates two lines A and B that are shown as examples of two constraint sets. The method starts with point b.sub.1 that is projected to the set A, resulting in the new point a.sub.0 that then gets projected to the set B. The obtained point b.sub.0 completes one cycle. The process is repeated until the iterations converge to the intersection 1002 of the two sets A and B. The cyclic projections are defiend as follows. Given z.sub.k, one updates z.sub.k+1:=Tz.sub.k where
T:=P.sub.C.sub.JP.sub.C.sub.J-1 . . . P.sub.C.sub.2P.sub.C.sub.1.(11)

(88) Parallel Projections

(89) In this method, a point is projected in parallel to all the constraint sets at once. The resulting points are then averaged to obtain a new point for the next iteration. One defines the parallel projections as follows. Given z.sub.k, one updates z.sub.k+1:=Tz.sub.k where

(90) T := 1 J ( P C 1 + P C 2 + .Math. + P C J ) . ( 12 )

(91) String-Average Projections

(92) The string-average projections is a combination of cyclic and parallel projections. One defines it as follows. Given z.sub.k, one updates z.sub.k+1:=Tz.sub.k where

(93) T := 1 J ( P C 1 + P C 2 P C 1 + .Math. + P C J P C J - 1 .Math. P C 2 P C 1 ) . ( 13 )

(94) In fact, these are probably the simplest methods for solving feasibility problems. In addition, when projection methods succeed (see [11] for some interesting examples), they have various attractive features: they are easy to understand, simple for implementation and maintenance, and sometime can be very fast. [1, 3, 10, 12] provide additional discussions on projection methods.

(95) Iterative Projection Methods for Optimization Problems

(96) Iterative optimization methods are often used for solving (8), which may require the computations of proximity operators for the functions involved. Suppose :X.fwdarw.(,+] is a proper convex lower semicontinuous function (see [25] and [2] for a discussion of convex analysis) and fix xX. Then it is well known (see [2, Section 12.4]) that the function

(97) X .fwdarw. ( - , + ] : y f ( y ) + 1 2 .Math. .Math. x - y .Math. .Math. 2 ( 14 )
has a unique minimizer, which will be denoted by P.sub. (x). The induced operator P.sub.: X.fwdarw.X is called the proximal mapping or proximity operator of (see [23]). Note that if is the indicator function of a set C (the indicator function t.sub.C is defined by t.sub.C(x)=0 if xC and t.sub.C(x)=+ otherwise), then P.sub.=P.sub.C. Thus, proximity operators are generalizations of projections.

(98) The Douglas-Rachford Method

(99) As proximity operators may be made available for several types of objective functions, any iterative optimization methods that utilize proximity operators (e.g., [7, 8, 21]) can be used to solve the corresponding problems. Let us describe one such method, the Douglas-Rachford (DR) splitting. DR emerged from the field of differential equations [14], and was later made widely applicable in other areas thanks to the seminal work [21]. FIG. 11 shows the iterates of the DR method on two constraint sets A and B in accordance with one or more embodiments of the invention.

(100) Using indicator functions, (8) is converted into
min F(x)+t.sub.C.sub.1+t.sub.C.sub.2+ . . . +t.sub.C.sub.J subject to xX.(15)

(101) So, it suffices to present DR for the following general problem

(102) min .Math. i = 1 m f i ( x ) subject to x X , ( 16 )
where each .sub.i is a proper convex lower semicontinuous function on X. The DR operates in the product space X:=X.sup.m with inner product custom characterx,ycustom character:=.sub.i=1.sup.mcustom characterx.sub.i, y.sub.icustom character for x=(x.sub.i).sub.i=1.sup.m and y=(y.sub.i).sub.i=1.sup.m. Set the starting point x.sub.0=(z, . . . , z)X, where zX. Given x.sub.k=(x.sub.k,l, . . . , x.sub.k,m)X, one computes

(103) 0 x _ k := 1 m .Math. i K x k , i , ( 17 )
i{1, . . . ,m}:x.sub.k+1,i:=x.sub.k,ix.sub.k+P.sub..sub.i(2x.sub.k,ix.sub.k,i),(18)
then update x.sub.k+1:=(x.sub.k+1,l, . . . ,x.sub.k+1,m).(19)
Then the monitored sequence (x.sub.k).sub.kN converges to a solution of (16).

(104) It is worth mentioning that when all .sub.i's are indicator functions of the constraints (thus, all proximity operators become projections), then (16) becomes a pure feasibility problem. Therefore, all optimization methods for (16) can also be used for feasibility problems.

(105) Parallelization

(106) By using the indicator function, projections become a special case of proximity operators. Thus, the following remarks simply refer to proximity operators.

(107) Remark 1 (Entries that Possibly Change after Executing a Proximity Operator)

(108) Suppose X=R.sup.n and the objective function : X.fwdarw.(, +] only depends on certain entries, i.e., (x)=((x.sub.i).sub.iI), where I{1, 2, . . . , n} is a given index set.

(109) Let z=(z.sub.1, . . . , z.sub.n)X and execute the proximity operator P.sub.Z. It is obvious that after the execution, the coordinates that possibly change are (z.sub.i).sub.iI; while all other coordinates (z.sub.i).sub.i.Math.I are left unchanged, see, e.g., Method component 2 (projection onto an edge minimum slope constraint). Thus, for simplicity of the presentation, for each projection or proximity operator, one may often focus on the possibly affected coordinates (z.sub.i).sub.iI in the subspace R.sup.|I| where |I| is the number of indices in I.

(110) Remark 2 (Parallelization)

(111) If two functions .sub.1, .sub.2: X.fwdarw.(,+] are independent in the sense that they depend on separate coordinates, then one can execute their respective proximity operators in parallel. Therefore, one can pack multiple independent proximity operators to accelerate the convergence of the method.

(112) Projections onto Linear Constraints

(113) The following describes the projections found for the linear constraints that were defined in the problem formulation above. These closed-form projections ensure that the method will converge to a solution in a reasonable amount of time, using an iterative projection method.

(114) By linear constraints, one refers to any constraint on the triangular mesh that can be represented by a system of linear equalities and inequalities. Indeed, this class includes several important constraints in design problems. In the sections that follow, those constraints will be analyzed.

(115) Interval Constraint

(116) Similar to [3, Section 2.2], one may assume that I is a subset of {1, 2, . . . , n} and (l.sub.i).sub.iI, (u.sub.i).sub.iIR.sup.I are given. Set
Y:={z=(z.sub.1,z.sub.2, . . . ,z.sub.n)X|iI:l.sub.iz.sub.iu.sub.i}.(20)

(117) The closed set Y is an affine subspace, thus, convex. The following explicit formula is for the projection onto Y, whose proof is straightforward, thus, omitted.

(118) Method Component 1 (Projection onto Interval Constraints)

(119) P Y : X .fwdarw. X : ( z 1 , z 2 , .Math. , z n ) ( x 1 , x 2 , .Math. , x n ) , ( 21 ) where x i = { max { l i , min { u i , z i } } i I , z i , i { 1 , 2 , .Math. , n } \ I . ( 22 )

(120) Edge Minimum Slope Constraint

(121) Let P.sub.i=(p.sub.i1, p.sub.i2, h.sub.i) and P.sub.j=(p.sub.j1, p.sub.j2, h.sub.j). The designer may require that the (directional) slope from P.sub.j to P.sub.i must be no less than a threshold level s.sub.ij. More specifically, since the value p.sub.i1, p.sub.i2, p.sub.j1, p.sub.j2 are fixed, one can write this constraint as
h.sub.ih.sub.j.sub.ij:=s.sub.ij{square root over ((p.sub.i1p.sub.j1).sup.2+(p.sub.i2q.sub.j2).sup.2)},(23)
which is called the edge minimum slope constraint. This constraint is a linear inequality, thus, convex. Projection on to this type of constraint is derived analogously to [3, Section 2.3], thus, its proof is also omitted.

(122) Method Component 2 (Projection onto an Edge Minimum Slope Constraint)

(123) Let
E.sub.i,j={x=(x.sub.1,x.sub.2, . . . ,x.sub.n)R.sup.n|x.sub.ix.sub.j.sub.ij}(24)
be the minimum slope constraint on the edge P.sub.iP.sub.j. Let x:=(x.sub.1, . . . , x.sub.n):=P.sub.E.sub.i,jz be the projection of a point z=(z.sub.1, z.sub.2, . . . , z.sub.n) on to E.sub.i,j. Then

(124) x i = 1 2 ( z i + z j + max { z i - z j , ij } ) , ( 25 ) x j = 1 2 ( z i + z j - max { z i - z j , ij } ) , and ( 26 ) x k = z k for all k .Math. { i , j } . ( 27 )

(125) Low Point Constraint

(126) A point P.sub.j=(p.sub.j1, p.sub.j2, z.sub.j) on the mesh is called a low point if each point P.sub.i=(p.sub.i1, p.sub.i2, z.sub.i) connected to P.sub.j satisfies the edge minimum slope constraint
z.sub.iz.sub.j.sub.i:=s.sub.i{square root over ((p.sub.i1p.sub.j1).sup.2+(p.sub.i2q.sub.j2).sup.2)},(28)
where all s.sub.iR are given.

(127) FIG. 12 shows a triangular mesh from a birds-eye view, where the low point P.sub.0 is connected to points P.sub.1, P.sub.2, P.sub.3, P.sub.4, P.sub.5, and P.sub.6. So in this picture, one requires that P.sub.0 is lower than all its connected points and that the slopes on each connecting edge i is at least s.sub.i.

(128) One can treat the low point constraint as a single constraint even though it is the intersection of finitely many edge slope constraints. The following result shows how to project onto this constraint.

(129) Method Component 3 (Projection onto a Low Point Constraint)

(130) Let .sub.2, . . . , .sub.mR. Define the set
E:={(x.sub.1, . . . ,x.sub.m)R.sup.m|i{2, . . . ,m}:x.sub.ix.sub.1.sub.i}.(29)

(131) Let z=(z.sub.1, . . . , z.sub.m)R.sup.m. Let .sub.1=z.sub.1 and let .sub.2.sub.3 . . . .sub.m be the values {z.sub.i.sub.i}.sub.i{2, . . . , m} in nondecreasing order. Let k be the largest number in {1, . . . , m} such that .sub.k(.sub.1+ . . . +.sub.k)/k. Then the projection x:=(x.sub.1, x.sub.2, . . . , x.sub.m):=P.sub.EZ is given by
x.sub.1=(.sub.1+ . . . +.sub.k)/k and x.sub.i=max{x.sub.1,z.sub.i.sub.i}+.sub.i,i{2, . . . ,m}. (30)

(132) To show this formula, first, x is the solution of
min(x.sub.1z.sub.1).sup.2+ . . . +(x.sub.mz.sub.m).sup.2(31)
s.t x.sub.1x.sub.i+.sub.i0,i{2, . . . ,m}.(32)

(133) Let y:=(y.sub.1, . . . , y.sub.m) where y.sub.1=x.sub.1 and y.sub.i:=x.sub.i.sub.i for i{2, . . . , m}. Without loss of generality, one may assume .sub.i=z.sub.i.sub.i for i{2, . . . , m}. Then (4) becomes
min (y):=(y.sub.1.sub.1).sup.2+ . . . +(y.sub.m.sub.m).sup.2(33)
s.t g.sub.i(y):=y.sub.1y.sub.i0,i{2, . . . ,m}.(34)

(134) To find the (unique) solution, we use Lagrange multipliers for convex optimization: there exist .sub.i0, {2, . . . , m}, such that

(135) 1 2 ( y ) + 2 g 2 ( y ) + .Math. + m g m ( y ) = 0 ( 35 ) i { 2 , .Math. , m } : i g i ( y ) = 0 ( 36 ) i { 2 , .Math. , m } : g i ( y ) 0. ( 37 )

(136) It follows from (35) that
(y.sub.1.sub.1)+.sub.2+ . . . +.sub.m=0(38)
(y.sub.2.sub.2).sub.2=0(39)
. . .(40)
(y.sub.m.sub.m).sub.m=0.(41)

(137) Then y.sub.1.sub.1 because .sub.2, . . . , .sub.m0. By substitution, one gets
y.sub.1+y.sub.2+ . . . +y.sub.m=.sub.1+.sub.2+ . . . .sub.m.(42)

(138) Next, for each i{2, . . . , m}, one has y.sub.i.sub.i=.sub.i0, y.sub.iy.sub.10, and (36) implies,
0=.sub.ig.sub.i(y)=(y.sub.i.sub.i)(y.sub.1y.sub.i).(43)
This leads to either y.sub.i=.sub.iy.sub.1 or y.sub.1=y.sub.i.sub.i. That means
y.sub.i=max{y.sub.1,.sub.i} for all i{2, . . . ,m}.(44)

(139) So (42) becomes
.sub.1+.sub.2+ . . . +.sub.m=y.sub.1+max{y.sub.1,.sub.2}+ . . . +max{y.sub.1,.sub.m}.(45)
Next, suppose k is the largest number in {1, . . . , m} such that
.sub.k(.sub.1+ . . . +.sub.k)/k.(46)

(140) The choice of k is always possible since at least (46) is true for k=1. Now setting .sub.m+1=+, one claims that
(.sub.1+ . . . +.sub.k)/k<.sub.k+1.(47)

(141) In fact, if k=m, then (47) clearly holds. If k<m, then by the choice of k, one has .sub.1+ . . . +.sub.k+.sub.k+1<(k+1).sub.k+1, which implies .sub.1+ . . . +.sub.k<k.sub.k+1. So (47) holds. Next, one can show that
.sub.ky.sub.1.sub.k+1.(48)

(142) Indeed, on the one hand, (46) and (45) imply

(143) k k + k + 1 + .Math. + m ( 1 + .Math. + k ) + k + 1 + .Math. + m ( 49 ) = y 1 + max { y 1 , 2 } + .Math. + max { y 1 , m } ( 50 ) y 1 + max { y 1 , k } + .Math. + max { y 1 , k } k - 1 terms ( 51 ) + max { y 1 , k + 1 } + .Math. + max { y 1 , m } ( 52 ) = y 1 + ( k - 1 ) max { y 1 , k ) + max { y 1 , k + 1 } + .Math. + max { y 1 , m } . ( 53 )
If y.sub.1<.sub.k, then (4) implies
k.sub.k=y.sub.1+(k1)max{y.sub.1,.sub.k}<k.sub.k,(54)
which is a contradiction. Thus, y.sub.1.sub.k. On the other hand, (47) and (45) implies

(144) k k + 1 + k + 1 + .Math. + m ( 1 + .Math. + k ) + k + 1 + .Math. + m ( 55 ) = y 1 + max { y 1 , 2 } + .Math. + max { y 1 , m } ( 56 ) = y 1 + y 1 + .Math. + y 1 k - 1 terms + max { y 1 , k + 1 } + .Math. + max { y 1 , m } ( 57 ) ky 1 + max { y 1 , k + 1 } + k + 2 + .Math. + m . ( 58 )
If y.sub.1>.sub.k+1, then (55)-(58) implies
(k+1).sub.k+1ky.sub.1+max{y.sub.1,.sub.k+1}>(k+1).sub.k+1,(59)
which is a contradiction. Thus, y.sub.1.sub.k+1. Therefore, the claim (48) is true. Then (45) implies
.sub.1+.sub.2+ . . . +.sub.m=y.sub.1+max{y.sub.1,.sub.2}+ . . . +max{y.sub.1,.sub.m}=ky.sub.1+.sub.k+1+ . . . +.sub.m, (60)
which leads to y.sub.1=(.sub.1+ . . . +.sub.k)/k. Combining with (44) completes the proof.

(145) Edge Alignment Constraint

(146) On the triangular mesh, the designer may want a constant slope on a particular path, in which case one can say the path is aligned. Such a path is sometimes called a feature line. To formulate this constraint, suppose the feature line is given by adjacent points A.sub.1, A.sub.2, . . . , A.sub.m on the triangular mesh where A.sub.1=(a.sub.i1, a.sub.i2, x.sub.i). FIG. 13 shows the birds-eye view of a feature line on a triangular mesh in accordance with one or more embodiments of the invention. For A.sub.iA.sub.i+1, the length of its shadow on the xy-plane is
.sub.i:=(a.sub.i+1,1a.sub.i,1).sup.2+(a.sub.i+1,2a.sub.i,2).sup.2.(61)
Define also
t.sub.1:=0,t.sub.2:=.sub.1,t.sub.3:=.sub.1+.sub.2, . . . ,t.sub.m:=.sub.1+ . . . +.sub.m1.(62)
Then the alignment constraint is written as
i{1, . . . ,m2}:(x.sub.i+1x.sub.i)/(t.sub.i+1t.sub.i)=(x.sub.i+2x.sub.i+1)/(t.sub.i+2t.sub.i+1).(63)

(147) Method Component 4 (Projection onto an Edge Alignment Constraint)

(148) Suppose the points (a.sub.i1, a.sub.i2), i{1, . . . , m} forms a path in R.sup.2. Define (t.sub.1, . . . , t.sub.m) by (62) and define the convex set
F:={(x.sub.1, . . . ,x.sub.m)R.sup.m|((a.sub.i1,a.sub.i2,x.sub.i)).sub.i{i, . . . ,m}satisfies(63)}R.sup.m.(64)

(149) Let z=(z.sub.1, . . . , z.sub.m)R.sup.m. Then the projection P.sub.Fz is given by
i {1, . . . ,m}:(P.sub.FZ).sub.i=(t.sub.i).(65)
where (t):=+t is the least squares line for the points (t.sub.i, z.sub.i).sub.i{1, . . . m}. More specifically, (, ) is obtained from the linear system

(150) [ m .Math. i = 1 m t i .Math. i = 1 m t i .Math. i = 1 m t i 2 ] [ ] = [ .Math. i = 1 m z i .Math. i = 1 m t i z i ] ( 66 )

(151) To show this, first, F is convex since all constraints in (63) are linear. Next, one considers the points (t.sub.i, z.sub.i) in R.sup.2. The problem is to find (x.sub.1, . . . , x.sub.m) such that the points (t.sub.i, x.sub.i) are aligned and
xz.sup.2=E.sub.i=1.sup.m(x.sub.iz.sub.i).sup.2 is minimized.(67)

(152) This is the least squares problem for the points (t.sub.i, z.sub.i), shown in FIG. 14. So the least squares line is (t)=+t where (, ) satisfies (66). Thus, the projection coordinates are (P.sub.F (z)).sub.i=+t.sub.i for i{1, . . . , m}.

(153) Surface Alignment Constraint

(154) The designer may want to patch several adjacent triangles on the mesh into a single polygon, in which case one may say that these triangles are aligned. This is equivalent to require all vertices of the triangles to lie on the same plane. So the following may result.

(155) Method Component 5 (Projection onto a Surface Alignment Constraint)

(156) Let (a.sub.i1, a.sub.i2), i{1, . . . , m} be a collection of points in R.sup.2 that are not on the same line. Define
F:={(x.sub.1, . . . ,x.sub.m)R.sup.m|{(a.sub.i1,a.sub.i2,x.sub.i)}.sub.i{1, . . . ,m}lie on the same plane}. (69)
Let z=(z.sub.1, . . . , z.sub.m)R.sup.m. Then the projection P.sub.Fz is given by
i{1, . . . ,m}:(P.sub.Fz).sub.i=(a.sub.i1,a.sub.i2).(70)
where (t.sub.1, t.sub.2):=+t.sub.1+t.sub.2 is the least squares plane for the points (a.sub.i1, a.sub.i2, z.sub.i), i{1, . . . , m}. More specifically, (, , ) is the solution of the system

(157) [ m .Math. e , a 1 .Math. .Math. e , a 1 .Math. .Math. e , a 1 .Math. .Math. a 1 .Math. 2 .Math. a 1 , a 2 .Math. .Math. e , a 2 .Math. .Math. a 1 , a 2 .Math. .Math. a 2 .Math. 2 ] [ ] = [ .Math. e , z .Math. .Math. a 1 , z .Math. .Math. a 2 , z .Math. ] . ( 71 )
where e=(1, 1, . . . , 1), a.sub.1=(a.sub.11, a.sub.21, . . . , a.sub.m1), and a.sub.2=(a.sub.12 a.sub.22, . . . , a.sub.m2).

(158) To show this, first, F is a convex set. Let x=(x.sub.1, . . . , x.sub.m)=P.sub.FZ, then x minimizes
xz.sup.2=.sub.i=1.sup.m(x.sub.iz.sub.i).sup.2(72)
subject to the constraint that {(a.sub.i1, a.sub.i2, x.sub.i)}.sub.i{1, . . . , m} lie on the same plane in R.sup.3. Thus, it is equivalent to find the least squares plane (t.sub.1, t.sub.2)=+t.sub.1+t.sub.2 that fits {(a.sub.i1, a.sub.i2, z.sub.i)}.sub.i{1, . . . , m}. One defines e, a.sub.1, a.sub.2 as above, then (, , ) is the solution of (71). Since {(a.sub.i1, a.sub.i2)}.sub.i{1, . . . , m} are not on the same line, (71) has a unique solution (, , ). Finally, one computes x.sub.i=+a.sub.i1+a.sub.i2 for i{1, . . . , m}.
Projections onto General Surface Slope Constraints

(159) Surface slope constraints are any requirement imposed on the slope of a triangle. In this section, a general setup is provided for projections onto such constraints.

(160) Normal Vector and Surface Slope Constraint

(161) Let (e.sub.1, e.sub.2, e.sub.3) be the standard basis of R.sup.3. Given three points P.sub.1=(P.sub.11, P.sub.12, h.sub.1), P.sub.2=(P.sub.21, p.sub.22, h.sub.2), and P.sub.3=(p.sub.31, p.sub.32, h.sub.3) in R.sup.3, the normal vector to the plane P.sub.1P.sub.2P.sub.3 is the cross product

(162) n .fwdarw. = [ p 11 - p 31 p 12 - p 32 h 1 - h 3 ] [ p 21 - p 31 p 22 - p 32 h 2 - h 3 ] = : [ a 1 b 1 t 1 ] [ a 2 b 2 t 2 ] = [ b 1 t 2 - b 2 t 1 a 2 t 1 - a 1 t 2 a 1 b 2 - a 2 b 1 ] ( 73 )
The shadows of P.sub.1, P.sub.2, P.sub.3 on xy-plane are (p.sub.11, p.sub.12), (p.sub.21, p.sub.22), (p.sub.31, p.sub.32), which are not on the same line. This implies a.sub.1b.sub.2a.sub.2b.sub.10. So one can rescale and use

(163) n .fwdarw. = ( b 1 t 2 - b 2 t 1 a 1 b 2 - a 2 b 1 , - a 1 t 2 - a 2 t 1 a 1 b 2 - a 2 b 1 , 1 ) . ( 74 )
If one defines

(164) 0 u = b 2 t 1 - b 1 t 2 a 1 b 2 - a 2 b 1 and v = a 1 t 2 - a 2 t 1 a 1 b 2 - a 2 b 1 ,
then
t.sub.1=a.sub.1u+b.sub.1v,t.sub.2=a.sub.2u+b.sub.2v, and {right arrow over (n)}=(u,v,1).(75)
Obviously, surface slope constraints depend solely on the normal vector {right arrow over (n)}. Thus, one can represent a general surface slope constraint in the form
g(u,v)0.(76)
An important case of such constraints is the surface orientation constraint below.

(165) Definition 1 (surface orientation constraint) Let be a triangle with normal vector {right arrow over (n)}=(u,v,1)R.sup.3 as above. Let {right arrow over (q)}=(q.sub.1, q.sub.2, q.sub.3)R.sup.3 \{0} be a unit vector and be an angle in [0, ], the constraint

(166) ( n .fwdarw. , q .fwdarw. ) , orequivalently , cos ( n .fwdarw. , q .fwdarw. ) = - uq 1 - vq 2 + q 3 u 2 + v 2 + 1 cos , ( 77 )
is called the surface orientation constraint specified by the pair ({right arrow over (q)}, ). Below is a description of the general framework for projection onto general surface slope constraints, followed by considerations of two special surface orientation constraints: the surface maximum slope constraint and the surface oriented minimum slope constraint.

(167) Projection onto a General Surface Slope Constraint

(168) Consider a single triangle determined by three points Q.sub.1=(p.sub.11, p.sub.12, w.sub.1), Q.sub.2=(p.sub.21, p.sub.22, w.sub.2), and Q.sub.3=(p.sub.31, p.sub.32, w.sub.3) in R.sup.3. Without loss of generality, one may assume
w.sub.1+w.sub.2+w.sub.3=0.(78)
Projecting onto an orientation constraint is to find the new heights h.sub.1, h.sub.2, h.sub.3 that minimizes
:=(h.sub.1w.sub.1).sup.2+(h.sub.2w.sub.2).sup.2+(h.sub.3w.sub.3).sup.2(79)
such that the new points P.sub.1=(p.sub.11, p.sub.12, h.sub.1), P.sub.2=(p.sub.11, p.sub.12, h.sub.2), and P.sub.3=(p.sub.11, p.sub.12, h.sub.3) satisfy the given orientation constraint. Define t.sub.1:=h.sub.1h.sub.3 and t.sub.2:=h.sub.2h.sub.3, then
=(t.sub.1+h.sub.3w.sub.1).sup.2+(t.sub.2+h.sub.3w.sub.2).sup.2+(h.sub.3w.sub.3).sup.2.(80)
Using the change of variables (75), one has:
=(a.sub.1u+b.sub.1v+h.sub.3w.sub.1).sup.2+(a.sub.2u+b.sub.2v+h.sub.3w.sub.2).sup.2+(h.sub.3w.sub.3).sup.2.(81)
The new triangle P.sub.1P.sub.2P.sub.3 needs to satisfy some given orientation constraint g(u, v)0. So the projection reduces to

(169) min ( u , v , h 3 ) R 3 = ( a 1 u + b 1 v + h 3 - w 1 ) 2 + ( a 2 u + b 2 v + h 3 - w 2 ) 2 + ( h 3 - w 3 ) 2 ( 82 ) subject to g ( u , v ) 0. ( 83 )

(170) Next, suppose that changing variables is necessary, for instance, (u, v) is replaced by the new variables (, {circumflex over (v)}) under the linear transformation

(171) [ u ^ v ^ ] := Q [ u v ] , where Q is an invertible matrix . ( 84 )

(172) One may also define

(173) [ a ^ 1 b ^ 1 a ^ 2 b ^ 2 ] := [ a 1 b 1 a 2 b 2 ] Q - 1 .
Then

(174) a ^ 1 u ^ + b ^ 1 v ^ = [ a ^ 1 b ^ 1 ] [ u ^ v ^ ] = [ a 1 b 1 ] Q - 1 Q [ u v ] = a 1 u + b 1 v , and ( 85 ) a ^ 2 u ^ + b ^ 2 v ^ = a 2 u + b 2 v . ( 86 )
So (82)-(83) becomes

(175) min ( u ^ , v ^ , h 3 ) R 3 = ( a ^ 1 u ^ + b ^ 1 v ^ + h 3 - w 1 ) 2 + ( a ^ 2 u ^ + b ^ 2 v ^ + h 3 - w 2 ) 2 + ( h 3 - w 3 ) 2 ( 87 ) subject to g ^ ( u ^ , v ^ ) := g ( u , v ) 0 , ( 88 )
Therefore, one can treat (87)-(88) as (82)-(83) with new respective coefficients .sub.i, {circumflex over (b)}.sub.i

(176) Next, one can simplify the model (82)-(83). Since (83) does not involve h.sub.3, one can convert problem (82)-(83) into two variables (u, v) as follows: first, set the derivative of with respect to h.sub.3 to zero
.sub.h.sub.3(u,v,h.sub.3)=2(a.sub.1u+b.sub.1v+h.sub.3w.sub.1)+2(a.sub.2u+b.sub.2v+h.sub.3w.sub.2)+2(h.sub.3w.sub.3)=0.(89)
Then one obtains

(177) h 3 = - 1 3 [ ( a 1 + a 2 ) u + ( b 1 + b 2 ) v ] . ( 90 )
Substituting into (82) and multiplying by 9, one obtains

(178) 9 = [ ( 2 a 1 - a 2 ) u + ( 2 b 1 - b 2 ) v - 3 w 1 ] 2 ( 91 ) + [ ( 2 a 2 - a 1 ) u + ( 2 b 2 - b 1 ) v - 3 w 2 ] 2 ( 92 ) + [ ( a 1 + a 2 ) u + ( b 1 + b 2 ) v - 3 ( w 1 + w 2 ) ] 2 ( 93 ) = : ( 6 a 1 2 + 6 a 2 2 - 6 a 1 a 2 ) u 2 + ( 6 b 1 2 + 6 b 2 2 - 6 b 1 b 2 ) v 2 ( 94 ) + 6 ( 2 a 1 b 1 + 2 a 2 b 2 - a 1 b 2 - a 2 b 1 ) uv ( 95 ) - 18 ( a 1 w 1 + a 2 w 2 ) u - 18 ( b 1 w 1 + b 2 w 2 ) v + Z . ( 96 )
where Z is some constant. So, by defining
A=2(a.sub.1.sup.2+a.sub.2.sup.2a.sub.1a.sub.2)>0,(97)
B=2(b.sub.1.sup.2+b.sub.2.sup.2b.sub.1b.sub.2)>0,(98)
C=2a.sub.1b.sub.1+2a.sub.2b.sub.2a.sub.1b.sub.2a.sub.2b.sub.1,(99)
w.sub.a=3(a.sub.1w.sub.1+a.sub.2w.sub.2),(100)
w.sub.b=3(b.sub.1w.sub.1+b.sub.2w.sub.2),(101)
one has 9=3Au.sup.2+3Bv.sup.2+6Cuv6w.sub.au6w.sub.bv+Z. Thus, (82)-(83) reduces to

(179) min ( u , v ) R 2 ( u , v ) = A 2 u 2 + Cuv + B 2 v 2 - w a u - w b v ( 102 ) subjectto g ( u , v ) 0. ( 103 )
As long as one can find the solution (u, v), one can obtain the projection (h.sub.1, h.sub.2, h.sub.3) from (90), (75), and (73). More specifically,

(180) 0 h 3 = - 1 3 [ ( a 1 + a 2 ) u + ( b 1 + b 2 ) v ] , ( 104 ) h 1 = a 1 u + b 1 v + h 3 , ( 105 ) h 2 = a 2 u + b 2 v + h 3 . ( 106 )
Due to (85)-(86), if new variables (, {circumflex over (v)}) are used, then one also has (104)-(106) in which (a.sub.i, b.sub.i, u, v) is replaced by (.sub.i, {circumflex over (b)}.sub.i, , {circumflex over (v)}).
Projection onto Surface Maximum Slope Constraint

(181) Let P.sub.1P.sub.2P.sub.3 be a triangle in R.sup.3 with normal vector {right arrow over (n)}=(u,v,1) obtained as in the normal vector and surface slope constraint section above. In certain cases, it is required that the angle between {right arrow over (n)} and a given direction {right arrow over (q)} must not exceed a given threshold. For example, suppose P.sub.1P.sub.2P.sub.3 represents the desired ground, that cannot be too steep with respect to gravity, i.e., the slope of the plane P.sub.1P.sub.2P.sub.3 must not exceed a threshold s:=s.sub.maxR.sub.+. Then the angle between {circumflex over (n)} and e.sub.3=(0,0,1) must satisfy ({circumflex over (n)},e.sub.3)tan.sup.1 (s), which is shown as cone 1502 in FIG. 15. Accordingly, FIG. 15 illustrates a maximum angle for a normal vector of a ground plane with respect to gravity in accordance with one or more embodiments of the invention. Thus, whenever the normal vector {right arrow over (n)} is outside the cone 1502, the constraint is violated. The inequality ({right arrow over (n)}, e.sub.3)tan.sup.1 (s) is equivalent to
cos ({right arrow over (n)},e.sub.3)=custom character{right arrow over (n)},e.sub.3custom character/{right arrow over (n)}cos(tan.sup.1(s))=1/{square root over (1+s.sup.2)}.(107)

(182) Definition 2 (surface maximum slope constraint) One calls (107) the surface maximum slope constraint with maximum slope s. This is a special case of surface orientation constraint where ({right arrow over (q)}, )=(e.sub.3, tan.sup.1 (s)). From (107), one may conclude

(183) 1 u 2 + v 2 + 1 1 1 + s 2 u 2 + v 2 - s 2 0. ( 108 )
Using the general model (102)-(103) with the constants defined by (97)-(101), projection onto the surface maximum slope constraint reduces to

(184) min ( u , v ) R 2 = A 2 u 2 + Cuv + B 2 v 2 - w a u - w b v ( 109 ) subject to u 2 + v 2 - s 2 0 , ( 110 )
Rescaling by

(185) ( u , v , w a , w b ) ( u s , v s , w a s , w b s ) ,
one can obtain an equivalent problem

(186) min ( u , v ) R 2 ( u , v ) = A 2 u 2 + Cuv + B 2 v 2 - w a u - w b u ( 111 ) subject to g ( u , v ) := u 2 + v 2 - 1 0. ( 112 )

(187) Hence, the projection to the surface maximum slope constraint will find new elevations for the triangle vertices, such that the angle between the z-axis and the normal vector of the triangle surface does not exceed tan.sup.1 (s) (i.e. the normal vector lays in the cone 1502 depicted in FIG. 15), and that equation (79) is minimized.

(188) This problem may be solved directly by several ways including numerical methods. One exemplary method is presented herein, in which the well-known Lagrange multipliers, also known as Karush-Kuhn-Tucker (KKT) conditions [19, 20], and Ferrari's method for quartic equations [16] are used. First, one observes the following:

(189) 1. (u, v) is a strictly convex quadratic surface.

(190) 2. For each value 0, the level set (u, v)= is an ellipse in R.sup.2 whose center is the vertex (u.sub.0, v.sub.0) of (u, v), which satisfies
Au.sub.0+Cv.sub.0=w.sub.a(113)
Cu.sub.0+Bv.sub.0=w.sub.b.(114)

(191) 3. This is minimizing a strictly convex function over a closed, bounded, convex set. Thus, there exists a unique solution.

(192) One may consider two cases:

(193) Case 1: g(u.sub.0, v.sub.0)0. Then (u.sub.0, v.sub.0) is the solution of (111)-(112).

(194) Case 2: g(u.sub.0, v.sub.0)>0. Then the solution of (111)-(112) is the tangent point of the circle g(u, v)=0 and the smallest elliptical level set (u, v)=r that intersects the circle (see FIG. 16). Accordingly, FIG. 16 illustrates an optimal solution based on tangent points between a circle and level sets. To find the maximizers/minimizers, one considers the following Lagrange multipliers system

(195) u ( u , v ) + 2 u g ( u , v ) = 0 , ( 115 ) u ( u , v ) + 2 v g ( u , v ) = 0 , ( 116 ) u 2 + v 2 - 1 = 0. ( 117 )

(196) Using the geometry of R.sup.2 (see FIG. 16) and the theory of Lagrange multipliers, one can obtain the below properties.

(197) Consider problem (111)-(112) and its Lagrange multipliers system (115)-(117). Suppose the solution (u.sub.0, v.sub.0) of (113)-(114) satisfies g(u.sub.0, v.sub.0)>0. Then

(198) 1. (115)-(117) yields a unique solution (u.sub.1, v.sub.1, .sub.1) such that .sub.1>0; and in this case, (u.sub.1, v.sub.1) is the unique solution of (111)-(112).

(199) 2. (115)-(117) yields at least one solution (u.sub.2, v.sub.2, .sub.2) such that .sub.2<0.

(200) Therefore, one seeks a solution (u, v, ) of (115)-(117) with >0. First, (115) and (116) yield
(A+)u+Cv=w.sub.a(118)
Cu+(B+)v=w.sub.b.(119)

(201) Using the Cauchy-Schwarz inequality, one has
AB=[a.sub.1.sup.2+a.sub.2.sup.2+(a.sub.1a.sub.2).sup.2][b.sub.1.sup.2+b.sub.2.sup.2+(b.sub.1b.sub.2).sup.2](120)
[a.sub.1b.sub.1+a.sub.2b.sub.2+(a.sub.1a.sub.2)(b.sub.1b.sub.2)].sup.2=C.sup.2.(121)

(202) Since A, B, >0, the determinant of (118)-(119) is
(A+)(B+)C.sup.2>ABC.sup.2>0.(122)
This implies the system (118)-(119) has a unique solution

(203) u = w a ( B + ) - w b C ( A + ) ( B + ) - C 2 = w a + w a B - w b C 2 + ( A + B ) + AB - C 2 , ( 123 ) v = w b ( A + ) - w a C ( A + ) ( B + ) - C 2 = w b + w b A - w a C 2 + ( A + B ) + AB - C 2 , ( 124 )

(204) Next, substituting u and v into (117) yields

(205) [ 2 + ( A + B ) + AB - C 2 ] 2 ( 125 ) = [ w a + ( w a B - w b C ) ] 2 + [ w b + ( w b A - w a C ) ] 2 ( 126 ) = ( w a 2 + w b 2 ) 2 + 2 ( w a 2 B + w b 2 A - 2 w a w b C ) ( 127 ) + ( w a B - w b C ) 2 + ( w b A - w a C ) 2 . ( 128 )

(206) Defining the constants accordingly, one may rewrite as
(.sup.2+R.sub.1+R.sub.2).sup.2=R.sub.3.sup.2+2R.sub.4+R.sub.5.(129)

(207) One can simply solve this equation by the classic Ferrari's method for quartic equations [9]. However, since there is a unique positive , one will find its explicit formula following Ferrari's technique. A real variable y is introduced
(.sup.2+R.sub.1+R.sub.2+y).sup.2=R.sub.3.sup.2+2R.sub.4+R.sub.5+2(.sup.2+R.sub.1+R.sub.2)y+y.sup.2(130)
=(R.sub.3+2y).sup.2+2(R.sub.4+R.sub.1y)+R.sub.5+2R.sub.2y+y.sup.2.(131)

(208) One can choose y such that the right hand side is a perfect square in . Thus, the right hand side must have zero discriminant, i.e.,
[R.sub.4+R.sub.1y].sup.2(R.sub.3+2y)(R.sub.5+2R.sub.2y+y.sup.2)=0custom character(132)
2y.sup.3+[R.sub.1.sup.2R.sub.34R.sub.2]y.sup.2+[2R.sub.1R.sub.42R.sub.2R.sub.32R.sub.5]y+R.sub.4.sup.2R.sub.3R.sub.5=0. (133)

(209) This is a cubic equation in y, so Cardano's method [9] can be used to find one real solution y.sub.0. Then (130)-(131) becomes

(210) ( 2 + R 1 + R 2 + y 0 ) 2 = ( R 3 + 2 y 0 ) ( + R 4 + R 1 y 0 R 3 + 2 y 0 ) 2 . ( 134 )
From the discussion above, this equation must have at least one positive and one negative solutions. Next, one solves for the (unique) positive :

(211) Case 2a: R.sub.3+2y.sub.0<0. Then

(212) = - R 4 + R 1 y 0 R 3 + 2 y 0
is the unique value of , which is a contradiction. Thus, this case cannot happen.

(213) Case 2b. R.sub.3+.sup.2y.sub.0=0. Then

(214) 0 y 0 = - R 3 2
and
.sup.2+R.sub.1+R.sub.2+y.sub.0=0.(135)
So one has

(215) = 1 2 ( - R 1 R 1 2 - 4 ( R 2 - R 3 2 ) ) = 1 2 ( - R 1 R 1 2 - 4 R 2 + 2 R 3 ) . ( 136 )
Since there is only one positive , one takes

(216) = 1 2 ( - R 1 + R 1 2 - 4 R 2 + 2 R 3 ) . ( 137 )

(217) Case 2c: R.sub.3+2y.sub.0>0. Define r:={square root over (R.sub.3+2y.sub.0)}. From (134),

(218) ( 2 + R 1 + R 2 + y 0 ) 2 = ( R 3 + 2 y 0 + R 4 + R 1 y 0 R 3 + 2 y 0 ) 2 ( 138 ) = ( r + R 4 + R 1 y 0 r ) 2 . ( 139 )
This leads to two quadratic equations in

(219) 2 + ( R 1 r ) + ( R 2 + y 0 R 4 + R 1 y 0 r ) = 0. ( 140 )

(220) Since there is only one positive , one must have R.sub.4+R.sub.1y.sub.00. Otherwise, (140) consists of two quadratic equations that have constant term R.sub.2+y.sub.0; thus, will yield an even number (possibly none) of positive solutions, which is a contradiction. Moreover, one must take the equation with negative constant term. So one sets rr.Math.sgn(R.sub.4+R.sub.1y.sub.0) and takes only the equation

(221) 2 + ( R 1 - r ) + ( R 2 + y 0 - R 4 + R 1 y 0 r ) = 0. ( 141 ) )
It follows that the positive is

(222) = 1 2 [ r - R 1 + ( r - R 1 ) 2 - 4 ( R 2 + y 0 - R 4 + R 1 y 0 r ) ] . ( 142 )

(223) Next, one obtains u and v from (123)-(124) and then rescales variables (u, v)(su, sv). Finally, one can use (104)-(106) to obtain (h.sub.1, h.sub.2, h.sub.3).

(224) Projection onto Surface Oriented Minimum Slope Constraint

(225) Nonconvex Surface Minimum Constraint

(226) Let P.sub.1P.sub.2P.sub.3 be a triangle with the normal vector {right arrow over (n)}=(u, v, 1) as described above. In some cases, it is required that the angle ({right arrow over (n)}, {right arrow over (q)}) for some given vector {right arrow over (q)} and number .

(227) This happens, for example, if P.sub.1P.sub.2P.sub.3 must have a slope at least s:=s.sub.min R.sub.+. In this case, the angle between {right arrow over (n)} and e.sub.3=(0,0,1) satisfies
({right arrow over (n)},e.sub.3)tan.sup.1(s).(143)

(228) If one considers FIG. 15 again, in this case, the normal vector needs to be outside of the cone 1502. The inequality ({right arrow over (n)}, e.sub.3)tan.sup.1 (s) is equivalent to

(229) cos ( n -> , e 3 ) = .Math. n -> , e 3 .Math. .Math. n -> .Math. cos ( tan - 1 ( s ) ) = 1 1 + s 2 . ( 144 )
One can refer to (143) or (144) as the surface minimum slope constraint with minimum slope s. From (144), one has

(230) 1 u 2 + v 2 + 1 1 1 + s 2 u 2 + v 2 - s 2 0. ( 145 )
This is clearly a nonconvex constraint in (u, v). Despite the projection onto this constraint that is still available, nonconvexity may prevent iterative methods from convergence. Therefore, one will find a convex replacement for this constraint which can still guarantee (143)-(144).

(231) The Surface Oriented Minimum Slope Constraint

(232) (143) implies the angle between {right arrow over (n)} and the xy-plane satisfies
({right arrow over (n)},xyplane)(/2)tan.sup.1(s).(146)
In some cases, it is not unreasonable to align the plane P.sub.1P.sub.2P.sub.3 toward a given location/direction. For instance, in civil engineering drainage, the designer may want to direct the water to certain drains or inlets. Suppose one wants P.sub.1P.sub.2P.sub.3 to incline toward a unit direction {right arrow over (q)}=(q.sub.1, q.sub.2, 0)R.sup.3 (see FIG. 17). In this regard, FIG. 17 illustrates a desired orientation ({right arrow over (q)}) of a normal vector (n) for a triangle plane. Then one can fulfill (146) by requiring

(233) ( n -> , q -> ) 2 - tan - 1 ( s ) ,
i.e.,

(234) 0 cos ( n -> , q -> ) = .Math. n -> , q -> .Math. .Math. n -> .Math. cos ( 2 - tan - 1 ( s ) ) = s 1 + s 2 ( 147 )
and arrive at the following definition.

(235) Definition 3 [surface oriented minimum slope constraint]. One calls (147) the surface oriented minimum slope constraint specified by ({right arrow over (q)}, s), the unit vector {right arrow over (q)} and the minimum slope s. This is a special case of the surface orientation constraint where

(236) ( q -> , ) = ( q -> , 2 - tan - 1 ( s ) ) .
Substituting {right arrow over (n)}=(u, v, 1) and {right arrow over (q)}=(q.sub.1, q.sub.2, 0) into (147), one has

(237) - q 1 u - q 2 v u 2 + v 2 + 1 s 1 + s 2 , ( 148 )
which is equivalent to

(238) q 1 u + q 2 v < 0 , ( 149 ) u 2 + v 2 + 1 - 1 + s 2 s 2 ( q 1 u + q 2 v ) 2 0. ( 150 )
This constraint not only guarantees surface minimum slope, but also generates a convex set in (u, v). A visualization of this finding is given in FIG. 18. In other words, FIG. 18 illustrates a visualization of a surface minimum slope constraint in accordance with one or more embodiments of the invention. The constraint requires that the normal vector lays on or inside the half cone 1802, whereas the direction vector q is the axis of the full cone.

(239) Projection onto Surface Oriented Minimum Slope Constraint

(240) By the model (82)-(83), the projection onto the surface oriented minimum slope constraint is

(241) min ( u , v ) R 2 ( u , v , h 3 ) = ( a 1 u + b 1 v + h 3 - w 1 ) 2 + ( a 2 u + b 2 v + h 3 - w 2 ) 2 + ( h 3 - w 3 ) 2 ( 151 ) subject to ( 149 ) - ( 150 ) . ( 152 )

(242) Again, one solves (151)-(152) directly using Lagrange multipliers and Ferrari's method for quartic equations. First, define

(243) Q := [ q 1 q 2 q 2 - q 1 ] ,
then Q.sup.2=Id since{right arrow over (q)}=q.sub.1.sup.2+q.sub.2.sup.2=1. So Q=Q.sup.T=Q.sup.1. Next, the variables are changed

(244) [ u ^ v ^ ] := Q [ u v ] = [ q 1 u q 2 v q 2 u - q 1 v ] [ u v ] = Q [ u ^ v ^ ] = [ q 1 u ^ q 2 v ^ q 2 u ^ - q 1 v ^ ] . ( 153 )
Then (150) becomes

(245) ( q 1 u ^ + q 2 v ^ ) 2 + ( q 2 u ^ - q 1 v ^ ) 2 + 1 - ( 1 + 1 s 2 ) u ^ 2 = ( - 1 s 2 ) u ^ 2 + v ^ 2 + 1 0. ( 154 )
Thus, the constraint (149)-(150) becomes

(246) u ^ < 0 , ( 155 ) v ^ 2 - u ^ 2 s 2 + 1 0 , ( 156 )

(247) Following the projections onto a general surface slope constraint described above, the coefficients are changed (without relabeling)

(248) [ a 1 a 2 b 1 b 2 ] Q [ a 1 a 2 b 1 b 2 ] ( 157 )
and the following problem is obtained

(249) 0 min ( u ^ , v ^ ) R 2 ( u ^ , v ^ ) = A 2 u ^ 2 + C u ^ v ^ + B 2 v ^ 2 - w a u ^ - w b v ^ ( 158 ) subject to { u ^ < 0 , v ^ 2 - u ^ 2 s 2 + 1 0 . ( 159 )
where A, B, C, w.sub.a, w.sub.b are defined below using the new a.sub.1, a.sub.2, b.sub.1, b.sub.2 from (157)
A=2(a.sub.1.sup.2a.sub.2.sup.2a.sub.1a.sub.2)>0,(160)
B=2(b.sub.1.sup.2+b.sub.2.sup.2b.sub.1b.sub.2)>0,(161)
C=2a.sub.1b.sub.1+2a.sub.2b.sub.2a.sub.1b.sub.2a.sub.2b.sub.1,(162)
w.sub.a=3(a.sub.1w.sub.1+a.sub.2w.sub.2),(163)
w.sub.b=3(b.sub.1w.sub.1+b.sub.2w.sub.2).(164)
Changing variables by

(250) ( u , v , A , B , w b ) ( u ^ s , v ^ , sA , B s , w b s ) ,
then (158)-(159) becomes

(251) min ( u ^ , v ^ ) R 2 ( u , v ) = A 2 u 2 + Cuv + B 2 v 2 - w a u - w b v ( 165 ) subjectto { g 1 ( u , v ) := u < 0 , g 2 ( u , v ) := v 2 - u 2 + 1 0 . ( 166 )

(252) Hence, the projection to the surface oriented minimum slope constraint will find new elevations for the triangle vertices, such that the angle between the normal vector of the triangle and the z-axis is at least tan.sup.1(s) and the angle between the normal vector and the directional vector q is at most

(253) 2 - tan - 1 ( s ) ,
and that equation (151) is minimized.

(254) Before solving the above problem, one can observe that

(255) 1. The constraint (166) is one side of a hyperbola, thus, convex.

(256) 2. The objective (u, v) in (165) is a nonnegative strictly convex quadratic surface.

(257) 3. For each value 0, the level set (u, v)= is an ellipse in R.sup.2 whose center is the vertex (u.sub.0, v.sub.0) of (u, v), which satisfies
Au.sub.0+Cv.sub.0=w.sub.a(167)
Cu.sub.0+Bv.sub.0=w.sub.b.(168)

(258) Therefore, (165)-(166) has a unique solution. To solve it, two cases are considered:

(259) Case 1: (u.sub.0, v.sub.0) is feasible, i.e., it lies inside or on the left branch {(u, v)R.sup.2|g.sub.2(u, v)=0, u<}. Then it is the unique solution of (165)-(166) because the optimal objective value is zero. FIG. 19 illustrates a feasible set region for a normal vector with respect to a Surface Oriented Minimum Slope Constraint in accordance with one or more embodiments of the invention.

(260) Case 2: (u.sub.0, v.sub.0) is not feasible. Let (u, v) be a solution to (165)-(166). By Lagrange multipliers, there exists >0 such that

(261) u ( u , v ) + 2 u g 2 ( u , v ) = 0 , ( 169 ) v ( u , v ) + 2 v g 2 ( u , v ) = 0 , ( 170 ) g 2 ( u , v ) = v 2 - u 2 + 1 = 0 , ( 171 ) g 1 ( u , v ) = u < 0. ( 172 )

(262) Consider the system of three equations (169)-(171). Using the geometry of R.sup.2 (see FIGS. 20 and 21), one may conclude that it has at least two solutions. To describe its solutions, let (u.sub.0, v.sub.0) be defined by (167)-(168), then

(263) 1. If g.sub.2(u.sub.0, v.sub.0)>0, then (169)-(171) has a unique solution (u.sub.1, v.sub.1, .sub.1) with .sub.1>0 and u.sub.1<0, and a unique solution (u.sub.2, v.sub.2, .sub.2) with .sub.2>0 and u.sub.2>0.

(264) 2. If g.sub.2(u.sub.0, v.sub.0)0 and g.sub.1(u.sub.0, v.sub.0)=u>0, then (169)-(171) has a unique solution (u.sub.1, v.sub.1, .sub.1) with .sub.1>0. Thus, u.sub.1<0. In addition, (169)-(171) also has at least one solution (u.sub.2, v.sub.2, .sub.2) with .sub.2<0.

(265) 3. In both cases 1 and 2, (u.sub.1, v.sub.1, .sub.1) is the unique solution of the whole Lagrange system (169)-(172), thus, (u.sub.1, v.sub.1) is the unique solution of (165)-(166).

(266) To prove the above conclusion, suppose (u, v, ) is a solution of (169)-(171), then (u, v) is the tangent point of the hyperbola v.sup.2u.sup.2+1=0 and an elliptical level set of (u, v).

(267) FIG. 20 shows that there are exactly two tangent points (u, v) with positive Lagrange multipliers , one of which has u<0 and the other has u>0 in accordance with one or more embodiments of the invention. This justifies conclusion 1.

(268) FIG. 21 shows that there is exactly one tangent point (u, v) with a positive Lagrange multiplier and u>0, and at least one tangent point with a nonpositive Lagrange multiplier in accordance with one or more embodiments of the invention. This justifies conclusion .

(269) Now if (u, v) is a solution to (165)-(166), then there exists >0 such that (u, v, ) is a solution to (169)-(171). So, conclusion 3 follows from conclusions 1 and 2.

(270) Next, one can show how to find the solution in Case 2. First, write (169)-(170) as
(A)u+Cv=w.sub.a,(173)
Cu+(B+)v=w.sub.b.(174)
Suppose for now that the determinant (A)(B+)C.sup.20. Then

(271) u = w a ( B + ) - w b C ( A - ) ( B + ) - C 2 = ( w a + w a B - w b C ) - 2 + ( A - B ) + ( AB - C 2 ) , ( 175 ) v = w b ( A - ) - w a C ( A - ) ( B + ) - C 2 = - w b + ( w b A - w a C ) - 2 + ( A - B ) + ( AB - C 2 ) , ( 176 )
Substituting into (171), one can derive

(272) 1 = ( w a + w a B - w b C 2 + ( B - A ) + ( C 2 - AB ) ) 2 - ( w b + ( w a C - w b A ) 2 + ( B - A ) + ( C 2 - AB ) ) 2 . ( 177 )
This implies

(273) [ 2 + ( B - A ) + ( C 2 - AB ) ] 2 = ( w a + w a B - w b C ) 2 - [ w b + ( w a C - w b A ) ] 2 = ( w a 2 - w b 2 ) 2 + 2 ( w a 2 B + w b 2 A - 2 w a w b C ) + ( w a B - w b C ) 2 - ( w a C - w b A ) 2 . ( 178 ) ( 179 ) ( 180 ) ( 181 )

(274) By defining the constants accordingly, one rewrites as
(.sup.2+R.sub.1+R.sub.2).sup.2=R.sub.3.sup.2+2R.sub.4+R.sub.5.(182)

(275) Again, one can analyze this equation analogously to the projection onto the surface maximum slope constraint described above. However, complications arise since there are possibly more than one positive 's. Instead, one can expand (182)
.sup.4+2R.sub.1.sup.3+(R.sub.1.sup.2+2R.sub.2R.sub.3).sup.2+2(R.sub.1R.sub.2R.sub.4)+R.sub.2.sup.2R.sub.5=0,(183)
and use the classical Ferrari's method for quartic equation. Then for each >0, define
D=(A)(B+)C.sup.2,(184)
D.sub.u=w.sub.a(B+)w.sub.bC,(185)
D.sub.v=w.sub.b(A)w.sub.aC.(186)

(276) Case 2a: D=D.sub.u=D.sub.v=0. Then one has the system
Cu+(B+)v=w.sub.b,(187)
v.sup.2u.sup.2+1=0.(188)

(277) Since B>0 and >0, the first equation implies v=(w.sub.bCu)/(B+). Then the second one becomes:
(w.sub.bCu).sup.2(B+).sup.2u.sup.2+(B+).sup.2=0,i.e.,(189)
[C.sup.2(B+).sup.2]u.sup.22w.sub.bCu+[w.sub.b.sup.2+(B+).sup.2]0.(190)
If the determinant
(w.sub.bC).sup.2(C.sup.2(B+).sup.2)(w.sub.b.sup.2+(B+).sup.2)0,(191)
then two solutions u are obtained. Since there is a unique pair (u, v) with u<0, the quadratic equation (190) must yield one positive and one negative solutions

(278) u = w b C ( w b C ) 2 - ( C 2 - ( B + ) 2 ) ( w b 2 + ( B + ) 2 ) C 2 - ( B + ) 2 , ( 192 )
and one must also have (C.sup.2(B+).sup.2)(w.sub.b.sup.2+(B+).sup.2)<0. So, the negative solution u is

(279) u = w b C + ( w b C ) 2 - ( C 2 - ( B + ) 2 ) ( w b 2 + ( B + ) 2 ) C 2 - ( B + ) 2 . ( 193 )

(280) Case 2b: D0. Then by (175)-(176), u=D.sub.u/D and v=D.sub.v/D.

(281) Next, among all (u, v)'s, choose the pair with u<0. Then rescale variables (u, v)(su, v). Finally, one can use (104)-(106) to obtain (h.sub.1, h.sub.2, h.sub.3).

(282) Multiple Surface Orientation Constraints

(283) It is possible to impose multiple surface orientation constraints on one triangle. However, it might cause infeasibility. For instance, it is easy to see that one cannot tilt the normal vector toward opposite directions. Therefore, care must be taken when enforcing multiple orientation constraints. Below is a description of the feasibility in such cases.

(284) Feasibility Criterion for One Maximum and One Oriented Minimum Slope Constraints

(285) Given a triangle with unit normal vector {right arrow over (n)}. Suppose constraints are enforced on {right arrow over (n)} as follows:
cos ({right arrow over (n)},e.sub.3)1/{square root over (1+t.sup.2)}(maximum slope)(194)
cos ({right arrow over (n)},{right arrow over (q)})s/{square root over (1+s.sup.2)}(oriented minimum slope)(195)
where e.sub.3=(0,0,1); {right arrow over (q)}=(q.sub.1, q.sub.2, 0) (q.sub.1, q.sub.2) is a given unit vector; and t, sR.sub.+ are also given. Then the problem is feasible if and only if ts.

(286) To verify this, assume {right arrow over (n)}=(u, v, w) is a unit vector (w>0), and its shadow on xy-plane is {right arrow over (n)}.sub.0=(u, v). Then (194) implies

(287) 0 w 1 1 + t 2 u 2 + v 2 = 1 - w 2 1 - 1 1 + t 2 = t 2 1 + t 2 , ( 196 )
which is a disk on R.sup.2 centered at the origin with radius t/{square root over (1+t.sup.2)}, and (195) implies

(288) uq 1 + vq 2 s 1 + s 2 , ( 197 )
which is a circular segment 2202 with height

(289) t 1 + t 2 - s 1 + s 2
(see FIG. 22). Thus, FIG. 22 illustrates a circular segment defining a feasible set for a maximum slope and an oriented minimum slope in accordance with one or more embodiments of the invention.

(290) So {right arrow over (n)}.sub.0=(u, v) must lie in the area 2202, which is nonempty if and only if

(291) t 1 + t 2 s 1 + s 2 t 2 1 + t 2 s 2 1 + s 2 t s .

(292) Feasibility Criterion for One Maximum and Two Oriented Minimum Slope Constraints

(293) Given a triangle with unit normal vector {right arrow over (n)}. Suppose {right arrow over (n)} satisfies:

(294) cos ( n .fwdarw. , e 3 ) 1 1 + t 2 , cos ( n .fwdarw. , q .fwdarw. 1 ) s 1 1 + s 1 2 , and cos ( n .fwdarw. , q .fwdarw. 2 ) s 2 1 + s 2 2 . ( 198 )
where e.sub.3=(0,0,1), {right arrow over (q)}.sub.i=(q.sub.i1, q.sub.i2, 0)(q.sub.i1 q.sub.i2) are unit vectors, and t, s.sub.1, s.sub.2 R.sub.+. Then the problem is feasible if and only if

(295) ( q .fwdarw. 1 , q .fwdarw. 2 ) cos - 1 ( s 1 1 + t 2 t 1 + s 1 2 ) + cos - 1 ( s 2 1 + t 2 t 1 + s 2 2 ) . ( 199 )

(296) To see this, the (feasible) disk and circular segments (i.e., regions 2302 and 2304) are illustrated in FIG. 23, where

(297) r := t 1 + t 2 , r 1 := s 1 1 + s 1 2 , and r 2 := s 2 1 + s 2 2 .
Thus, the intersection is nonempty if and only if

(298) ( q -> 1 , q -> 2 ) cos - 1 ( r 1 r ) + cos - 1 ( r 2 r ) .
Accordingly, FIG. 23 illustrates a circle representing a feasible region for a maximum slope constraint and regions 2302 and 2304 show the feasible region for two oriented minimum slope constraints.

(299) Feasibility Criterion for Multiple Surface Oriented Minimum Slope Constraints:

(300) Given a triangle with unit normal vector {right arrow over (n)}, s, t R, and a collection of unit vectors Q:={{right arrow over (q)}.sub.i}.sub.i1 R.sup.2. Let ts>0. Suppose the constraints are enforced on n as follows:
cos ({right arrow over (n)},e.sub.3)1/{square root over (1+t.sup.2)},(200)
iI:cos ({right arrow over (n)},{right arrow over (q)}.sub.i)s/{square root over (1+s.sup.2)}.(201)
Then it suffices to enforce 2 constraints in (201) since the rest will be automatically fulfilled.

(301) To verify this, one can assume {{right arrow over (q)}.sub.1, {right arrow over (q)}.sub.2}Q is the pair that make the largest angle (see FIG. 24) and the area S is the intersection of two corresponding circular segments. Accordingly, FIG. 24 illustrates multiple surface oriented minimum slope constraints via the intersection of two corresponding circular segments in accordance with one or more embodiments of the invention.

(302) Similar to previous cases, one can illustrate the disk of radius

(303) t 1 + t 2
and several circular segments of the same height in FIG. 24

(304) ( where r = s 1 + s 2 ) .
One can argue that all other {right arrow over (q)}.sub.i's lie in between {right arrow over (q)}.sub.1 and {right arrow over (q)}.sub.2 (otherwise, the intersection with S is empty). Notice that the distances from the origin to all circular segments are equal. Thus, one can deduce that S satisfies all other oriented minimum slope constraint {right arrow over (q)}.sub.i. Thus, it suffices to enforce at most two oriented minimum slope constraints.

(305) Further, one can associate each {right arrow over (q)}.sub.i with different minimum slope s.sub.i and then obtain analogous feasibility criterion.

(306) Curvature Minimization

(307) In some design problems, the designer may wish to construct a surface that is as smooth as possible. This problem is referred to as minimizing the curvature between adjacent triangles in the mesh.

(308) Given the points P.sub.i=(p.sub.i1, p.sub.i2, h.sub.i), i=1, 2, 3, 4, so that they form two adjacent triangles .sub.1=P.sub.1P.sub.2P.sub.4 and .sub.2=P.sub.2P.sub.3P.sub.4 (see FIG. 25). In this regard, FIG. 25 illustrates two adjacent triangles with surface normal vectors that are used to minimize the curvature in accordance with one or more embodiments of the invention.

(309) Define a.sub.i:=p.sub.i1p.sub.41 and b.sub.i:=p.sub.i2p.sub.42, for i=1, 2, 3. Then the respective normal vectors are computed by the cross products

(310) 0 n .fwdarw. 1 = [ a 1 b 1 h 1 - h 4 ] [ a 2 b 2 h 2 - h 4 ] = [ - b 2 h 1 + b 1 h 2 + ( b 2 - b 1 ) h 4 a 2 h 1 - a 1 h 2 + ( a 1 - a 1 ) h 4 a 1 b 2 - a 2 b 1 ] ( 202 ) n .fwdarw. 2 = [ a 2 b 2 h 2 - h 4 ] [ a 3 b 3 h 3 - h 4 ] = [ - b 3 h 2 + b 2 h 3 + ( b 3 - b 2 ) h 4 a 3 h 2 - a 2 h 3 + ( a 2 - a 3 ) h 4 a 2 b 3 - a 3 b 2 ] ( 203 )
One can rescale and obtain

(311) n .fwdarw. 1 = ( - b 2 h 1 + b 1 h 2 + ( b 2 - b 1 ) h 4 a 1 b 2 - a 2 b 1 , a 2 h 1 - a 1 h 2 + ( a 1 - a 2 ) h 4 a 1 b 2 - a 2 b 1 , 1 ) , ( 204 ) n .fwdarw. 2 = ( - b 3 h 2 + b 1 h 3 + ( b 3 - b 2 ) h 4 a 2 b 3 - a 3 b 2 , a 3 h 2 - a 2 h 3 + ( a 2 - a 3 ) h 4 a 2 b 3 - a 3 b 2 , 1 ) . ( 205 )
The curvature can be represented by the difference between {right arrow over (n)}.sub.1 and {right arrow over (n)}.sub.2, i.e.,

(312) .fwdarw. 12 := .fwdarw. 1 2 = n .fwdarw. 1 - n .fwdarw. 2 = : [ .Math. u , h .Math. .Math. v , h .Math. ] ( 206 )
where

(313) u := ( u 1 , u 2 , u 3 , u 4 ) , v := ( v 1 , v 2 , v 3 , v 4 ) , h := ( h 1 , h 2 , h 3 , h 4 ) , ( 207 ) u 1 = - b 2 a 1 b 2 - a 2 b 1 , u 2 = b 1 a 1 b 2 - a 2 b 1 + b 3 a 2 b 3 - a 3 b 2 , ( 208 ) u 3 = - b 2 a 2 b 3 - a 3 b 2 , u 4 = - ( u 1 + u 2 + u 3 ) , ( 209 ) v 1 = a 2 a 1 b 2 - a 2 b 1 , v 2 = - a 1 a 1 b 2 - a 2 b 1 + - a 3 a 2 b 3 - a 3 b 2 , ( 210 ) v 3 = a 2 a 2 b 3 - a 3 b 2 , v 4 = - ( v 1 + v 2 + v 3 ) . ( 211 )

(314) Now let custom character be the set of all pairs of adjacent triangles (.sub.i, .sub.j) for which it is desirable to minimize the curvature. Then for each pair (.sub.i, .sub.j)custom character, one finds the corresponding vectors h.sub.ij=(h.sub.1.sup.ij, h.sub.2.sup.ij, h.sub.3.sup.ij, h.sub.4.sup.ij)R.sup.4, u.sub.ij, v.sub.ijR.sup.4, and computes the corresponding curvature .sub.ij=(custom characteru.sub.ij, h.sub.ijcustom character, custom characterv.sub.ij, h.sub.ijcustom character). One can then aim to minimize all the computed curvatures. Thus, one can arrive at the objective

(315) G 1 , * ( x ) := .Math. ( i , j ) �� .Math. .fwdarw. ij .Math. * ( 212 )
where .sub.* can be either 1-norm or max-norm in R.sup.2. For 1-norm, the objective is

(316) G 1 , 1 ( x ) := .Math. ( i , j ) �� .Math. .Math. u ij , h ij .Math. .Math. + .Math. .Math. v ij , h ij .Math. .Math. , ( 213 )
and for max-norm, the objective is

(317) G 1 , ( x ) := .Math. ( i , j ) �� max { .Math. .Math. u ij , h ij .Math. .Math. + .Math. .Math. v ij , h ij .Math. .Math. } . ( 214 )

(318) Simplified Computations for Symmetric Cases.

(319) Suppose the two dimensional mesh satisfies the following symmetry: for every pair of adjacent triangles (P.sub.1P.sub.2P.sub.4, P.sub.2P.sub.3P.sub.4)custom character, there exists tR such that
{right arrow over (P.sub.4P.sub.1)}+{right arrow over (P.sub.4P.sub.3)}=t{right arrow over (P.sub.4P.sub.2)}.(215)
Then it follows that (a.sub.1, b.sub.1)+(a.sub.3, b.sub.3)=t(a.sub.2, b.sub.2). So one can deduce a.sub.1b.sub.2a.sub.2b.sub.1=a.sub.2b.sub.3a.sub.3b.sub.2. Using (207)-(211), one obtains

(320) u = - b 2 a 1 b 2 - a 2 b 1 ( 1 , - t , 1 , t - 2 ) and v = a 2 a 1 b 2 - a 2 b 1 ( 1 , - t , 1 , t - 2 ) . ( 216 )
That means u and v are parallel. This simplifies the computations for (213) and (214).

(321) Proximity Operators

(322) Since optimization methods can require proximity operators, one will derive the necessary formulas. It is sometimes convenient to compute the proximity operator P.sub. via the proximity operator of its Fenchel conjugate *, which is defined by *:X.fwdarw.R:x*custom charactersup.sub.xX(custom characterx*, xcustom character(x)). Indeed, if >0, then (see, e.g., [2, custom characterTheorem 14.3(ii)])
xX:x=P.sub.(x)+P.sub..sub.1.sub.*(.sup.1x).(217)
One may also recall a useful formula from [2, Lemma 2.3]: if :X.fwdarw.R is convex and positively homogeneous, >0, wX, and h:X.fwdarw.R:xcustom character(xw), then

(323) P h ( x ) = w + P f ( x - w ) = x - P f * ( x - w ) . ( 218 )

(324) Formula for Proximity Operators:

(325) Let {u.sub.i}.sub.iI be a system of finitely many vectors in R.sup.n, and

(326) f : R .fwdarw. R : x .fwdarw. max i I { .Math. .Math. u i , x .Math. .Math. } . ( 219 )

(327) Then *=t.sub.D where D:=convU.sub.iI{u.sub.i,u.sub.i}. Consequently, the proximity operator of can be computed by P.sub.=IdP.sub.D, where P.sub.D is the projection onto the set D.

(328) To see this, first, suppose x*D, then one can express

(329) 0 x * = .Math. i I i u i where .Math. i I .Math. i .Math. 1. ( 220 )
It follows that for all xX,

(330) .Math. x * , x .Math. - f ( x ) = .Math. i I i .Math. u i , x .Math. - max i I .Math. .Math. u i , x .Math. .Math. ( .Math. i I i - 1 ) max i I .Math. .Math. u i , x .Math. .Math. 0. ( 221 )
So, * (x*)=sup.sub.xX[custom characterx*, xcustom character(x)]0. Notice that equality happens if one sets x=0. Thus, *(x*)=0.

(331) Now suppose x*.Math.D. Since D is nonempty, closed, and convex, the classic separation theorem implies that there exists xX such that
custom characterx*,xcustom character>custom characteru,xcustom character for all uD(222)
This leads to custom characterx*, xcustom character(x)>0. Since is homogeneous, one can have
*(x*)custom characterx*,xcustom character(x).fwdarw.+ as .fwdarw.+.(223)
So *(x*)=+. Therefore, one concludes that *=t.sub.D. Now employing formula (218) and noting that P.sub.*=P.sub.D, the projection onto D (see the beginning of the iterative projection methods optimization problems description above), one obtains the proximity operator for .

(332) Next, one presents two special cases of the above proximity formula, which will be used in curvature minimization.

Example 1

(333) Given >0, a vector u R.sup.n \{0} and the function
:R.sup.n.fwdarw.R: x custom character|custom characteru,xcustom character|.(224)
Then the proximity operator of is
P.sub.=IdP.sub.D where D:=[u,u].(225)
The explicit projection onto D is given below (see also, [4, Theorem 2.7]).

(334) P D x = min { 1 , max { - 1 , .Math. u , x .Math. .Math. u .Math. 2 } } u = min { , max { - , .Math. u , x .Math. .Math. u .Math. 2 } } u . ( 226 )

Example 2

(335) Given two vectors u, vR.sup.n and
:R.sup.n.fwdarw.R:xcustom charactermax{|custom characteru,xcustom character|,|custom characterv,xcustom character|}.(227)
Then the proximity operator of is
P.sub.=IdP.sub.D where D:=conv{u,v,u,v}.(228)
In general, P.sub.D is the projection onto a parallelogram in R.sup.n.
Approximation of Surface Slope Constraint Projections

(336) In this section, the problem of surface slope constraint projections are considered. Such projections may be written in the form

(337) min u R 2 ( u ) := A 2 u 1 2 + Cu 1 u 2 + B 2 u 2 2 - w a u 1 - w b u 2 ( 229 )
subject to u:={uR.sup.2|g(u)0}.(230)

(338) If one defines

(339) M := [ A C C B ] and w := [ W a W b ] ,
then

(340) ( u ) = 1 2 u T Mu - w T u . ( 231 )
In practice, solving (229)-(230) directly as described above (e.g., as described above in the Projection onto the surface maximum slope constraint section and the Projection onto Surface Oriented Minimum Slope Constraint section) might not be straightforward as one may encounter numerical instability. Therefore, one can use an alternative approach where the constraint is approximated by a regular polygon.

(341) Approximation for Maximum Slope Constraint

(342) Consider the projection onto maximum slope constraint written in the form

(343) min u R 2 ( u ) := 1 2 u T Mu - w T u ( 232 ) subject to u := { ( u 1 , u 2 ) R 2 .Math. u 1 2 + u 2 2 1 } . ( 233 )
The unit disk may be replaced by a convex (or simple) regular polygon that is contained in . For example, the unit disk may be replaced by a hexagon (see FIG. 26). In this regard, FIG. 26 illustrates a hexagon that is used to replace a unit disk for a maximum slope constraint in accordance with one or more embodiments of the invention. More specifically, let m3 be an integer and 0.sub.1.sub.2 . . . .sub.m<2. Define the points on the unit circle p.sub.k:=(cos .sub.k, sin .sub.k) for k=1, 2, . . . , m, and set also p.sub.0:=p.sub.m. Now define the convex m-polygon U:=conv{p.sub.k|k=0, 1, . . . , m}. One then arrives at the approximate problem

(344) min u R 2 ( u ) := 1 2 u T Mu - w T u subject to u U . ( 234 )
This problem may be solved as follows. Let u.sub.0:=M.sup.1w be the vertex of the paraboloid (u).

(345) Case 1: u.sub.0 . Then u.sub.0 is even the solution of (232)-(233), thus, the problem is solved.

(346) Case 2: u.sub.0 .Math.C. So one also has u.sub.0.Math.U. The solution of (234) may be found by the following steps.

(347) Step 2a: Find the index set
K:={k|0 and u.sub.0 are on opposite sides of the line p.sub.kp.sub.k+1}.(235)

(348) Step 2b: Minimize (u) on each edge p.sub.kp.sub.k+1 for kK. Consider (u) on an edge p.sub.kp.sub.k+1. Define p.sub.k=p.sub.k+1p.sub.k. Take a point up.sub.kp.sub.k+1, then
u=p.sub.k+tp.sub.k for some t[0,1].(236)
So

(349) ( t ) := ( u ) = 1 2 ( p k + t p k ) T M ( p k + t p k ) - w T ( p k + t p k ) ( 237 ) = t 2 2 p k T M p k - t ( w T p k - p k T M p k ) + 1 2 p k T Mp k - ( 238 ) w T p k .
The vertex of (t) is

(350) t _ := w T p k - p k T M p k p k T M p k ,
so the minimizer of (t) on [0,1] is
t.sub.k:=min{1,max{0,t}}.(239)

(351) Step 2c: If there exists kK such that 0<t.sub.k<1, then u=p.sub.k+t.sub.kp.sub.k is the solution of (234). Otherwise, the solution of (234) is

(352) 00 u = p k 0 + t k 0 p k 0 where k 0 := argmin k K ( p k + t k p k ) . ( 240 )

(353) Hence, the projection to the surface maximum slope constraint is approximated by using a regular polygon instead of a unit disk.

(354) Approximation for Oriented Minimum Slope Constraint

(355) Consider the projection onto oriented minimum slope constraint written in the form

(356) 01 min u R 2 ( u ) := 1 2 u T Mu - w T u ( 241 ) subject to u := { ( u 1 , u 2 ) R 2 | u 1 < 0 , u 2 2 - u 1 2 s 2 + 1 0 } . ( 242 )
The constraint may be replaced by
U:={(u.sub.1,u.sub.2)R.sup.2|u.sub.1s(|u.sub.2|+1)}.(243)
FIG. 27 shows how the original half cone is now replaced with the absolute value function in accordance with one or more embodiments of the invention. One can easily check that U. So one arrives at an approximate problem

(357) 02 min u R 2 ( u ) := 1 2 u T Mu - w T u subject to u U . ( 244 )
Let u.sub.0:=M.sup.1w be the vertex of the paraboloid (u).

(358) Case 1: u.sub.0 C. Then u.sub.0 is even the solution of (241)-(242), thus, the problem is solved.

(359) Case 2: u.sub.0 C. So u.sub.0 U. One solves (244) by first finding the minimizer of (u) on the boundary of U, which consists of two half-lines
{p+tp.sub.1|tR.sub.+} and {p+tp.sub.2|tR.sub.+},(245)
where p:=(s, 0), p.sub.1:=(s, 1), and p.sub.2:=(s, 1).
Let u:=p+tp for t[0, +). Similar to the computation above, one has

(360) 03 ( t ) := ( u ) = t 2 2 p T M p - t ( w T p - p T M p ) + 1 2 p T Mp - w T p . ( 246 )
So the minimizer of (u) on [0, +) is

(361) 04 t := max { 0 , w T p - p T M p p T M p } . ( 247 )
Second, one sets p=p.sub.1 and p=p.sub.2 in the above formula to obtain t.sub.1 and t.sub.2, respectively. Finally, comparing the values (p+t.sub.1p.sub.1) and (p+t.sub.2p.sub.2), one obtains the minimizer of (244).

Visualization Examples

(362) The closed-form proximity and projection operators can be used in the DR method to solve various design problems described above.

(363) FIG. 28 shows the starting situation for the problem shown in FIG. 7 in accordance with one or more embodiments of the invention. Triangles 2802 represent triangles that violate the design constraints, and triangles 2902 (from FIG. 29) represent triangles that satisfy the design constraints. FIG. 29 shows the mesh after 10 iterations in accordance with one or more embodiments of the invention. FIG. 30 shows the mesh after 29 iterations, and FIG. 31 shows the final mesh after convergence in accordance with one or more embodiments of the invention.

(364) Consider FIG. 28 again, this time as a starting situation for the problem shown in FIG. 8. FIG. 32 is after 15 iterations, FIG. 33 is after 100 iterations, and FIG. 34 is the final solution.

(365) FIG. 35 is the starting situation for the problem shown in FIG. 9. FIG. 36 is after 10 iterations, FIG. 37 is after 20 iterations, and FIG. 38 is the final solution.

(366) Logical Flow

(367) FIG. 39 illustrates the logical flow for designing a surface in accordance with one or more embodiments of the invention.

(368) At step 3902, a triangular surface mesh representative of an existing surface is obtained. The triangular surface mesh includes two or more triangles that are connected by vertices and edges. In embodiments of the invention, the surface may be a land surface (e.g., that is actually constructed based on the design [e.g., a computer-aided designCAD]).

(369) At step 3904, one or more design constraint sets are determined based on one or more design constraints. The design constraints can include various constraints including a maximum slope constraint for a first triangle of the two or more triangles in the triangular surface mesh. The maximum slope constraint is a maximum angle between a normal vector of the first triangle and a reference vector (e.g., a Z-vector representative of gravity).

(370) An additional design constraint may be a surface oriented minimum slope constraint for the first triangle. The surface oriented minimum slope constraint is a minimum angle between the normal vector of the first triangle and a directional vector.

(371) At step 3906, one or more heights of the vertices of the first triangle are projected onto the one or more design constraint sets such that the normal vector satisfies all of the one or more design constraints. The projecting includes modifying the one or more heights by a minimum Euclidian distance. Further, the projecting may be performed iteratively until all of the one or more design constraints are satisfied. In addition, the projecting onto the design constraint set for the maximum slope constraint may include moving the normal vector onto a cone defined by an origin of the reference vector on the triangular surface mesh and a unit circle around the reference vector that is defined by the maximum angle. Alternatively, or in addition, the projecting onto to the design constraint set for the maximum slope constraint may include moving the normal vector onto a polygonal shaped pyramid defined by the reference vector on the triangular surface mesh and a regular polygon around the reference vector, wherein edges of the polygonal shaped pyramid are at the maximum angle with the reference vector.

(372) At step 3908, a design of the surface represented by the triangular surface mesh is generated (based on the projecting).

(373) Hardware Environment

(374) FIG. 40 is an exemplary hardware and software environment 4000 used to implement one or more embodiments of the invention. The hardware and software environment includes a computer 4002 and may include peripherals. Computer 4002 may be a user/client computer, server computer, or may be a database computer. The computer 4002 comprises a general purpose hardware processor 4004A and/or a special purpose hardware processor 4004B (hereinafter alternatively collectively referred to as processor 4004) and a memory 4006, such as random access memory (RAM). The computer 4002 may be coupled to, and/or integrated with, other devices, including input/output (I/O) devices such as a keyboard 4014, a cursor control device 4016 (e.g., a mouse, a pointing device, pen and tablet, touch screen, multi-touch device, etc.) and a printer 4028. In one or more embodiments, computer 4002 may be coupled to, or may comprise, a portable or media viewing/listening device 4032 (e.g., an MP3 player, IPOD, NOOK, portable digital video player, cellular device, personal digital assistant, etc.). In yet another embodiment, the computer 4002 may comprise a multi-touch device, mobile phone, gaming system, internet enabled television, television set top box, or other internet enabled device executing on various platforms and operating systems.

(375) In one embodiment, the computer 4002 operates by the general purpose processor 4004A performing instructions defined by the computer program 4010 under control of an operating system 4008. The computer program 4010 and/or the operating system 4008 may be stored in the memory 4006 and may interface with the user and/or other devices to accept input and commands and, based on such input and commands and the instructions defined by the computer program 4010 and operating system 4008, to provide output and results.

(376) Output/results may be presented on the display 4022 or provided to another device for presentation or further processing or action. In one embodiment, the display 4022 comprises a liquid crystal display (LCD) having a plurality of separately addressable liquid crystals. Alternatively, the display 4022 may comprise a light emitting diode (LED) display having clusters of red, green and blue diodes driven together to form full-color pixels. Each liquid crystal or pixel of the display 4022 changes to an opaque or translucent state to form a part of the image on the display in response to the data or information generated by the processor 4004 from the application of the instructions of the computer program 4010 and/or operating system 4008 to the input and commands. The image may be provided through a graphical user interface (GUI) module 4018. Although the GUI module 4018 is depicted as a separate module, the instructions performing the GUI functions can be resident or distributed in the operating system 4008, the computer program 4010, or implemented with special purpose memory and processors.

(377) In one or more embodiments, the display 4022 is integrated with/into the computer 4002 and comprises a multi-touch device having a touch sensing surface (e.g., track pod or touch screen) with the ability to recognize the presence of two or more points of contact with the surface. Examples of multi-touch devices include mobile devices (e.g., IPHONE, NEXUS S, DROID devices, etc.), tablet computers (e.g., IPAD, HP TOUCHPAD), portable/handheld game/music/video player/console devices (e.g., IPOD TOUCH, MP3 players, NINTENDO 3DS, PLAYSTATION PORTABLE, etc.), touch tables, and walls (e.g., where an image is projected through acrylic and/or glass, and the image is then backlit with LEDs).

(378) Some or all of the operations performed by the computer 4002 according to the computer program 4010 instructions may be implemented in a special purpose processor 4004B. In this embodiment, some or all of the computer program 4010 instructions may be implemented via firmware instructions stored in a read only memory (ROM), a programmable read only memory (PROM) or flash memory within the special purpose processor 4004B or in memory 4006. The special purpose processor 4004B may also be hardwired through circuit design to perform some or all of the operations to implement the present invention. Further, the special purpose processor 4004B may be a hybrid processor, which includes dedicated circuitry for performing a subset of functions, and other circuits for performing more general functions such as responding to computer program 4010 instructions. In one embodiment, the special purpose processor 4004B is an application specific integrated circuit (ASIC).

(379) The computer 4002 may also implement a compiler 4012 that allows an application or computer program 4010 written in a programming language such as C, C++, Assembly, SQL, PYTHON, PROLOG, MATLAB, RUBY, RAILS, HASKELL, or other language to be translated into processor 4004 readable code. Alternatively, the compiler 4012 may be an interpreter that executes instructions/source code directly, translates source code into an intermediate representation that is executed, or that executes stored precompiled code. Such source code may be written in a variety of programming languages such as JAVA, JAVASCRIPT, PERL, BASIC, etc. After completion, the application or computer program 4010 accesses and manipulates data accepted from I/O devices and stored in the memory 4006 of the computer 4002 using the relationships and logic that were generated using the compiler 4012.

(380) The computer 4002 also optionally comprises an external communication device such as a modem, satellite link, Ethernet card, or other device for accepting input from, and providing output to, other computers 4002.

(381) In one embodiment, instructions implementing the operating system 4008, the computer program 4010, and the compiler 4012 are tangibly embodied in a non-transitory computer-readable medium, e.g., data storage device 4020, which could include one or more fixed or removable data storage devices, such as a zip drive, floppy disc drive 4024, hard drive, CD-ROM drive, tape drive, etc. Further, the operating system 4008 and the computer program 4010 are comprised of computer program 4010 instructions which, when accessed, read and executed by the computer 4002, cause the computer 4002 to perform the steps necessary to implement and/or use the present invention or to load the program of instructions into a memory 4006, thus creating a special purpose data structure causing the computer 4002 to operate as a specially programmed computer executing the method steps described herein. Computer program 4010 and/or operating instructions may also be tangibly embodied in memory 4006 and/or data communications devices 4030, thereby making a computer program product or article of manufacture according to the invention. As such, the terms article of manufacture, program storage device, and computer program product, as used herein, are intended to encompass a computer program accessible from any computer readable device or media.

(382) Of course, those skilled in the art will recognize that any combination of the above components, or any number of different components, peripherals, and other devices, may be used with the computer 4002.

(383) FIG. 41 schematically illustrates a typical distributed/cloud-based computer system 4100 using a network 4104 to connect client computers 4102 to server computers 4106. A typical combination of resources may include a network 4104 comprising the Internet, LANs (local area networks), WANs (wide area networks), SNA (systems network architecture) networks, or the like, clients 4102 that are personal computers or workstations (as set forth in FIG. 40), and servers 4106 that are personal computers, workstations, minicomputers, or mainframes (as set forth in FIG. 40). However, it may be noted that different networks such as a cellular network (e.g., GSM [global system for mobile communications] or otherwise), a satellite based network, or any other type of network may be used to connect clients 4102 and servers 4106 in accordance with embodiments of the invention.

(384) A network 4104 such as the Internet connects clients 4102 to server computers 4106. Network 4104 may utilize ethernet, coaxial cable, wireless communications, radio frequency (RF), etc. to connect and provide the communication between clients 4102 and servers 4106. Further, in a cloud-based computing system, resources (e.g., storage, processors, applications, memory, infrastructure, etc.) in clients 4102 and server computers 4106 may be shared by clients 4102, server computers 4106, and users across one or more networks. Resources may be shared by multiple users and can be dynamically reallocated per demand. In this regard, cloud computing may be referred to as a model for enabling access to a shared pool of configurable computing resources.

(385) Clients 4102 may execute a client application or web browser and communicate with server computers 4106 executing web servers 4110. Such a web browser is typically a program such as MICROSOFT INTERNET EXPLORER, MOZILLA FIREFOX, OPERA, APPLE SAFARI, GOOGLE CHROME, etc. Further, the software executing on clients 4102 may be downloaded from server computer 4106 to client computers 4102 and installed as a plug-in or ACTIVEX control of a web browser. Accordingly, clients 4102 may utilize ACTIVEX components/component object model (COM) or distributed COM (DCOM) components to provide a user interface on a display of client 4102. The web server 4110 is typically a program such as MICROSOFT'S INTERNET INFORMATION SERVER.

(386) Web server 4110 may host an Active Server Page (ASP) or Internet Server Application Programming Interface (ISAPI) application 4112, which may be executing scripts. The scripts invoke objects that execute business logic (referred to as business objects). The business objects then manipulate data in database 4116 through a database management system (DBMS) 4114. Alternatively, database 4116 may be part of, or connected directly to, client 4102 instead of communicating/obtaining the information from database 4116 across network 4104. When a developer encapsulates the business functionality into objects, the system may be referred to as a component object model (COM) system. Accordingly, the scripts executing on web server 4110 (and/or application 4112) invoke COM objects that implement the business logic. Further, server 4106 may utilize MICROSOFT'S TRANSACTION SERVER (MTS) to access required data stored in database 4116 via an interface such as ADO (Active Data Objects), OLE DB (Object Linking and Embedding DataBase), or ODBC (Open DataBase Connectivity).

(387) Generally, these components 4100-4116 all comprise logic and/or data that is embodied in/or retrievable from device, medium, signal, or carrier, e.g., a data storage device, a data communications device, a remote computer or device coupled to the computer via a network or via another data communications device, etc. Moreover, this logic and/or data, when read, executed, and/or interpreted, results in the steps necessary to implement and/or use the present invention being performed.

(388) Although the terms user computer, client computer, and/or server computer are referred to herein, it is understood that such computers 4102 and 4106 may be interchangeable and may further include thin client devices with limited or full processing capabilities, portable devices such as cell phones, notebook computers, pocket computers, multi-touch devices, and/or any other devices with suitable processing, communication, and input/output capability.

(389) Of course, those skilled in the art will recognize that any combination of the above components, or any number of different components, peripherals, and other devices, may be used with computers 4102 and 4106. Further, embodiments of the invention are implemented as a software application on a client 4102 or server computer 4106. In addition, as described above, the client 4102 or server computer 4106 may comprise a thin client device or a portable device that has a multi-touch-based display.

CONCLUSION

(390) This concludes the description of the preferred embodiment of the invention. The following describes some alternative embodiments for accomplishing the present invention. For example, any type of computer, such as a mainframe, minicomputer, or personal computer, or computer configuration, such as a timesharing mainframe, local area network, or standalone personal computer, could be used with the present invention.

(391) The foregoing description of the preferred embodiment of the invention has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. It is intended that the scope of the invention be limited not by this detailed description, but rather by the claims appended hereto.

REFERENCES

(392) [1] BAUSCHKE, H. H., AND BORWEIN, J. M. On projection algorithms for solving convex feasibility problems. SIAM Rev. 38, 3 (1996), 367-426. [2] BAUSCHKE, H. H., AND COMBETTES, P. L. Convex analysis and monotone operator theory in Hilbert spaces. CMS Books in Mathematics/Ouvrages de Mathmatiques de la SMC. Springer, New York, 2011. With a foreword by Hdy Attouch. [3] BAUSCHKE, H. H., AND KOCH, V. R. Projection methods: Swiss army knives for solving feasibility and best approximation problems with halfspaces. In Infinite products of operators and their applications, vol. 636 of Contemp. Math. Amer. Math. Soc., Providence, R.I., 2015, pp. 1-40. [4] BAUSCHKE, H. H., KOCH, V. R., AND PHAN, H. M. Stadium norm and Douglas-Rachford splitting: a new approach to road design optimization. Oper. Res. 64, 1 (2016), 201-218. [5] BINIAZ, A., AND DASTGHAIBYFARD, G. Drainage reality in terrains with higher-order Delaunay triangulations. Springer Berlin Heidelberg, Berlin, Heidelberg, 2008, pp. 199-211. [6] BINIAZ, A., AND DASTGHAIBYFARD, G. Slope fidelity in terrains with higher-order delaunay triangulations. In 16th International Conference in Central Europe on Computer Graphics, Visualization, and Computer Vision (Plzen, Czech Republic, 2008), Vclav Skala-UNION Agency, pp. 17-23. [7] BOT, R. I., CSETNEK, E. R., AND HEINRICH, A. A primal-dual splitting algorithm for finding zeros of sums of maximal monotone operators. SIAM J. Optim. 23, 4 (2013), 2011-2036. [8] BRICEO ARIAS, L. M., AND COMBETTES, P. L. A monotone+skew splitting model for composite monotone inclusions in duality. SIAM J. Optim. 21, 4 (2011), 1230-1250. [9] CARDANO, G. The great art or The rules of algebra. The M.I.T. Press, Cambridge, Mass.-London, 1968. Translated from the Latin and edited by T. Richard Witmer, With a foreword by Oystein Ore. [10] CEGIELSKI, A. Iterative methods for fixed point problems in Hilbert spaces, vol. 2057 of Lecture Notes in Mathematics. Springer, Heidelberg, 2012. [11] CENSOR, Y., CHEN, W., COMBETTES, P. L., DAVIDI, R., AND HERMAN, G. T. On the effectiveness of projection methods for convex feasibility problems with linear inequality constraints. Comput. Optim. Appl. 51, 3 (2012), 1065-1088. [12] CENSOR, Y., AND ZENIOS, S. A. Parallel optimization. Numerical Mathematics and Scientific Computation. Oxford University Press, New York, 1997. Theory, algorithms, and applications, With a foreword by George B. Dantzig. [13] CORNISH, G., AND MUIR GRAVES, R. Classic Golf Hole Design. John Wiley & Sons, Inc., Hoboken DC, 2002. [14] DOUGLAS, JR., J., AND RACHFORD, JR., H. H. On the numerical solution of heat conduction problems in two and three space variables. Trans. Amer. Math. Soc. 82 (1956), 421-439. [15] HAWTREE, F. W. The Golf Course, Planning design, construction and maintenance. E & FN Spon, and imprint of Chapman & Hall, London, U K, 2005. [16] IRVING, R. Beyond the Quadratic Formula. The Mathematical Association of America, Washington D.C., 2010. [17] ITOH, T., AND SHIMADA, K. Automatic conversion of triangular meshes into quadrilateral meshes with directionality. International Journal of CADCAM 1, 1 (2002), 11-21. [18] JOHNSTON, B. P., SULLIVAN, J. M., AND KWASNIK, A. Automatic conversion of triangular finite element meshes to quadrilateral elements. International Journal for Numerical Methods in Engineering 31, 1 (1991), 67-84. [19] KARUSH, W. MINIMA OF FUNCTIONS OF SEVERAL VARIABLES WITH INEQUALITIES AS SIDE CONDITIONS. ProQuest LLC, Ann Arbor, Mich., 1939. Thesis (SM)The University of Chicago. [20] KUHN, H. W., AND TUCKER, A. W. Nonlinear programming. In Proceedings of the Second Berkeley Symposium on Mathematical Statistics and Probability, 1950 (1951), University of California Press, Berkeley and Los Angeles, pp. 481-492. [21] LIONS, P.-L., AND MERCIER, B. Splitting algorithms for the sum of two nonlinear operators. SIAM J. Numer. Anal. 16, 6 (1979), 964-979. [22] MOORE, I.D., GRAYSON, R., AND LADSON, A. Digital terrain modelling: a review of hydrological, geomorphological, and biological applications. Hydrological processes 5, 1 (1991), 3-30. [23] MOREAU, J.-J. Proximit et dualit dans un espace hilbertien. Bull. Soc. Math. France 93 (1965), 273-299. [24] RANK, E., SCHWEINGRUBER, M., AND SOMMER, M. Adaptive mesh generation and transformation of triangular to quadrilateral meshes. Communications in Numerical Methods in Engineering 9, 2 (1993), 121-129. [25] ROCKAFELLAR, R. T. Convex analysis. Princeton Mathematical Series, No. 28. Princeton University Press, Princeton, N.J., 1970. [26] RUSZCZYSKI, A. Nonlinear optimization. Princeton University Press, Princeton, N.J., 2006.