Spatial constraint based triangular mesh operations in three dimensions

Information

  • Patent Grant
  • 10915670
  • Patent Number
    10,915,670
  • Date Filed
    Thursday, September 14, 2017
    6 years ago
  • Date Issued
    Tuesday, February 9, 2021
    3 years ago
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.
Description
BACKGROUND OF THE INVENTION
1. Field of the Invention

The present invention relates generally to road design, and in particular, to a method, apparatus, system, and article of manufacture for designing a grading of a triangular mesh representing a physical site to accommodate proper drainage.


2. Description of the Related Art

(Note: This application references a number of different publications as indicated throughout the specification by reference numbers enclosed in brackets, e.g., [x]. A list of these different publications ordered according to these reference numbers can be found below in the section entitled “References.” Each of these publications is incorporated by reference herein.)


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. To better understand the problems of the prior art, an explanation of the design problems may be useful.


One issue of the prior art relates to how to solve design problems with concrete applications in the computational surface generation of triangular meshes. In many cases, these surfaces need to satisfy certain spatial constraints.


Digital Terrain Modeling in Computational Geometry


Digital terrain modeling may be done through a set of contours, or a collection of ordered elevation points at arbitrary datums in a landscape. These points can then be connected through a triangular mesh, which is usually called a Triangular Irregular Network (TIN) [22]. As pointed out in [5], traditional triangulation methods may result in terrain models that do not represent the true conditions in terms of drainage pools and channels, and may result in local minima and sharp slope changes that do not exist in reality. In [6], the authors apply heuristics to generate higher order Delaunay triangulations that attempt to mitigate these problems. A more deterministic approach would be to identify existing drainage channels and, within certain boundaries, adjust the triangle surfaces in order to smooth out grade change and create drainage channels.


Computer-Aided Design of Golf Course Features


Contour changes are an integral part of any golf course design. They may involve smaller terrain changes such as cut and fill of bunker walls for erosion control [13], or higher earthwork quantity features such as artificially embanked mounds, as well as differently sloped greens that require cut and fill in order to fit into the existing ground [13]. Tee flattening with constrained end slopes may require large fill quantities, or can be designed by balancing quantities through benched fills [15]. Hence, for each feature of a golf course, the architect needs to consider a variety of surface maximum and minimum slope constraints, surface alignment constraints, as well as other surface slope requirements that are not only part of the course difficulty, but also essential for drainage and environmental impact.


Mesh Conversion


A common problem in topology is the conversion of one surface representation into another. One such example is converting an existing triangular, irregular mesh into the closest regular rectangular mesh. In each context, the term closest could mean different things such as the vertical distance of the corner points of the rectangle to the triangular grid, or the minimum distance of the average of the triangle elevations to the average of the corner points, or the minimum of the volume between the triangles and the rectangular surface that encompasses them. Methods to convert two dimensional, triangular meshes into quadrilateral meshes while keeping some or all of the original vertices are shown in [17, 18, 24]. An extension of these methods to three dimensions would require that the triangles that are grouped into quadrilaterals to satisfy some surface alignment conditions. Furthermore, one would like to minimize the distance between the original and final elevations of the vertices, using either the 1-norm or the 2-norm. FIG. 1 shows an example of an existing triangular, irregular mesh at the bottom, and a quadrilateral grid on the top. The designer would like to convert the three dimensional triangular mesh 102 into a three dimensional quadrilateral mesh that aligns with the grid lines 104 shown on the top. FIG. 2 shows how the existing triangular mesh 102 is mapped in the quadrilateral grid 104. If a quadrilateral cuts an existing triangle, it may need to be retriangulated to form new triangles so that each quadrilateral is triangulated. The mentioned surface alignment conditions would then apply to triangles that are inside an individual quadrilateral. The design objective function is then to minimize the elevation difference between the triangle vertices in the original triangular mesh 102, and the triangle vertices in the new mesh that groups the triangles into quadrilaterals.


Computer-Aided Design for Architecture and Civil Engineering Structures


In Computer-Aided Design (CAD), triangular meshes are widely used in various engineering disciplines. Existing and finished ground surfaces in architecture and civil engineering are represented by triangulated irregular networks. Slopes are relevant in the context of drainage, in both, civil engineering (transportation structures), and architecture (roof designs), as well as in the context of surface alignments such as solar farms, embankment dams, and airport infrastructure layouts.


In architecture, the design of a complex roof requires slope constraints for drainage, but can also include orientation and maximum slope constraints. Consider the example in FIG. 3 of a roof seen from above. The roof polygons 302 with the light dashed lines are triangulated, in order to create a triangular mesh. The engineer may want to place multiple solar panels 304 on a roof. The solar panels 304 require a minimum inclination towards the position of the sun at noon, shown by the arrows 306. Also, the panel 304 should not exceed a certain angle, to preserve a maximum average efficiency. This requires a surface orientation constraint for some of the triangles.


A concrete problem that arises in civil engineering design is the grading of a parking lot. Within a given area, the engineer has to define grading slopes such that the parking lot fits within existing structures, the drainage requirements on the lot are met, and safety and comfort is taken into account. Besides these requirements, the engineer would like to change the existing surface as little as possible, in order to save on earthwork costs.



FIG. 4 depicts an example of a parking lot that has four horizontal parking rows. In FIG. 4, the designer wants water to flow in the direction of the arrows 402 towards and along the thick lines 404 into the inlets 406 that are represented as circles. Lines 408 are curbs that need to be aligned.


Drainage schemes can vary for each situation. The triangular mesh in FIG. 5 represents the existing ground of a planned parking lot. The engineer would like the water to drain away from the building, and along the drainage lines 502 into the four corners. Lines 504 indicate where the triangle edges need to be aligned. In FIG. 6, the engineer would like to study a different scheme, where the drainage 602 happens in parallel, on either side of the building. Lastly, FIG. 7 represents the mesh of an existing ground for a roundabout, where a minimum slope is required from the inner circle to the outer one, and water needs to drain from the road at the top along the outer circle to the roads on either side at the bottom (indicated by drainage lines 702).


SUMMARY OF THE INVENTION

Embodiments of the invention overcome the problems of the prior art based on geometric design constraints for triangles. In particular, a design constraint is defined that includes a maximum slope constraint for at least one of the triangles in a triangular surface mesh. The maximum slope constraint is a maximum angle between a normal vector of the triangle and a reference (e.g., Z) vector. Heights of the vertices of the triangle are projected onto design constraint sets such that the normal vector satisfies all of the design constraints (e.g., the maximum slope constraint). During the projection, the height(s) (e.g., the Z-coordinate [and not the x or y coordinate(s)]) of the triangle is moved by a minimum Euclidian distance. The projection is performed iteratively such that the triangular mesh converges to an optimal solution for a CAD design of the land surface. Accordingly, a design of the surface represented by the triangular surface mesh is generated based on the projecting.





BRIEF DESCRIPTION OF THE DRAWINGS

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



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



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



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



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



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



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



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;



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



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



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;



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;



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



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;



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



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;



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;



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;



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



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;



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;



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;



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;



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;



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;



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;



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;



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;



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



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



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



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



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;



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



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;



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



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;



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;



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;



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



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



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

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.


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


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 “→”. 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)}1 and {right arrow over (n)}2 in R3 is denoted by {right arrow over (n)}1×{right arrow over (n)}2.


General Overview


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.


Problem Formulation


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.


Triangular Mesh


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


Assume that G=(V0,E0) is a given triangular mesh on R2 where V0 is the set of vertices and E0 is the set of (undirected) edges, i.e.,

V0:={pi=(pi1,pi2)∈R2|i∈{1,2, . . . ,n}},  (1)
E0{pipj≡pjpi|pi,pj∈V0}.  (2)

From G, one can derive the set of triangles of the mesh as follows

T0:={Δ=(pipjpk)p|{pipj,pjpk,pkpi}E0}.  (3)


One first aims to

find a vector z=(z1, . . . ,zn)∈X  (4)

such that the points

{Pi=(pi1,pi2,zi)}i∈{1, . . . ,n}satisfy a given set of constraints.  (5)


Clearly, the points (Pi)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 R2). FIG. 9 illustrates a simple triangular mesh with vertices

V0:={P1,P2,P3,P4},
edges
E0:={P1P4,P1P2,P2P4,P3P4,P2P4},
and the two triangles
T0:={(P1P2P4),(P2P3P4)}.

in accordance with one or more embodiments of the invention.


Therefore, if there is no confusion, E0, V0, T0 will be reused to denote the vertices, the edges, and the triangles of the three dimensional mesh.


Interval Constraint


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 i∈I, the entries zi must lie in a given interval of R.


Edge Slope Constraint


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 E0, and for every edge pipj∈E, the slope










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.


Edge Alignment Constraint


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 pipj, pmpn∈E0, the edges must have the same slope sij=smn.


Surface Alignment Constraint


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 Δi, Δj∈T0 the normal vectors {right arrow over (n)}Δi and {right arrow over (n)}Δj must be parallel.


Surface Slope Constraint


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 T0 and for each triangle Δ∈T, there is a given set of vectors QΔ ⊂R3 such that for each {right arrow over (q)}∈QΔ, the angle between the normal vector {right arrow over (n)}Δ and {right arrow over (q)} must lie in a given subset θ{right arrow over (q)} of [0, π], which is also referred to as a surface orientation constraint.


Curvature Minimization


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 Δi, Δj∈T0 the normal vectors {right arrow over (n)}Δi and {right arrow over (n)}Δj we want to minimize the angle between the two normal vectors.


Methods Overview


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.


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.


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.


Projections onto Constraint Sets


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












find





a





point





x


C

:=




j


{

1
,
2
,









,
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.


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












min






F


(
z
)







subject





to





z


C

:=




j


{

1
,
2
,









,
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.


A constraint set CX is the collection of all feasible data points, i.e., points that satisfy some requirements. Suppose the given data point z∈X is not feasible (i.e., z∉C), one aims to modify z so that the newly obtained point x is feasible (i.e., x∈C ); 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 PCz, is the solution of the optimization problem











P
C


z

:=




arg





min







x

C









z
-
x






=


{






x

C

,






x
-
z





=


min






y

C









z
-
y








}

.






(
9
)







It is well known that if C is nonempty, closed, and convex1, then PCz is singleton, see, e.g., [26, Theorem 2.10]. 1C is convex if for all x, y∈C and λ∈[0,1], we have (1−λ)x+λy∈C


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.


Iterative Projection Methods for Feasibility Problems


Consider the feasibility problem












find





a





point





x


C

:=




j


{

1
,
2
,









,
J

}





C
j



,




(
10
)







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 PCj onto each constraint, if the explicit formula is available. Then with an initial point, one can iteratively execute the projections PCj's to derive a solution for (10). Let z0 ∈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).


Cyclic Projections


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−1 that is projected to the set A, resulting in the new point a0 that then gets projected to the set B. The obtained point b0 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 zk, one updates zk+1:=Tzk where

T:=PCJPCJ-1 . . . PC2PC1.  (11)


Parallel Projections


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 zk, one updates zk+1:=Tzk where









T
:=


1
J




(


P

C
1


+

P

C
2


+

+

P

C
J



)

.






(
12
)







String-Average Projections


The string-average projections is a combination of cyclic and parallel projections. One defines it as follows. Given zk, one updates zk+1:=Tzk where









T
:=


1
J




(


P

C
1


+


P

C
2




P

C
1



+

+


P

C
J




P

C

J
-
1















P

C
2




P

C
1




)

.






(
13
)







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.


Iterative Projection Methods for Optimization Problems


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









X



(


-


,

+



]



:






y




f


(
y
)


+


1
2








x
-
y





2







(
14
)








has a unique minimizer, which will be denoted by Pƒ (x). The induced operator Pƒ: X→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 tC is defined by tC(x)=0 if x∈C and tC(x)=+∞ otherwise), then Pƒ=PC. Thus, proximity operators are generalizations of projections.


The Douglas-Rachford Method


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.


Using indicator functions, (8) is converted into

min F(x)+tC1+tC2+ . . . +tCJ subject to x∈X.  (15)


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











min









i
=
1

m









f
i



(
x
)







subject





to





x




X

,




(
16
)








where each ƒi is a proper convex lower semicontinuous function on X. The DR operates in the product space X:=Xm with inner product custom characterx,ycustom character:=Σi=1mcustom characterxi, yicustom character for x=(xi)i=1m and y=(yi)i=1m. Set the starting point x0=(z, . . . , z)∈X, where z∈X. Given xk=(xk,l, . . . , xk,m)∈X, one computes












x
_

k

:=


1
m






i

K








x

k
,
i





,




(
17
)








i∈{1, . . . ,m}:xk+1,i:=xk,ixk+Pγƒi(2xk,i−xk,i),  (18)
then update xk+1:=(xk+1,l, . . . ,xk+1,m).  (19)

Then the monitored sequence (xk)k∈N converges to a solution of (16).


It is worth mentioning that when all ƒ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.


Parallelization


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


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


Suppose X=Rn and the objective function ƒ: X→(−∞, +∞] only depends on certain entries, i.e., ƒ(x)=ƒ((xi)i∈I), where I{1, 2, . . . , n} is a given index set.


Let z=(z1, . . . , zn)∈X and execute the proximity operator PƒZ. It is obvious that after the execution, the coordinates that possibly change are (zi)i∈I; while all other coordinates (zi)i∉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 (zi)i∈I in the subspace R|I| where |I| is the number of indices in I.


Remark 2 (Parallelization)


If two functions ƒ1, ƒ2: X→(−∞,+∞] 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.


Projections onto Linear Constraints


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.


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.


Interval Constraint


Similar to [3, Section 2.2], one may assume that I is a subset of {1, 2, . . . , n} and (li)i∈I, (ui)i∈I∈RI are given. Set

Y:={z=(z1,z2, . . . ,zn)∈X|∀i∈I:li≤zi≤ui}.  (20)


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.


Method Component 1 (Projection onto Interval Constraints)












P
Y



:






X



X


:







(


z
1

,

z
2

,





,

z
n


)




(


x
1

,

x
2

,





,

x
n


)


,




(
21
)







where






x
i


=

{





max


{


l
i

,

min


{


u
i

,

z
i


}



}






i

I

,







z
i

,




i



{

1
,
2
,





,
n

}


\

I





.






(
22
)







Edge Minimum Slope Constraint


Let Pi=(pi1, pi2, hi) and Pj=(pj1, pj2, hj). The designer may require that the (directional) slope from Pj to Pi must be no less than a threshold level sij. More specifically, since the value pi1, pi2, pj1, pj2 are fixed, one can write this constraint as

hi−hj≥αij:=sij√{square root over ((pi1−pj1)2+(pi2−qj2)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.


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


Let

Ei,j={x=(x1,x2, . . . ,xn)∈Rn|xi−xj≥αij}  (24)

be the minimum slope constraint on the edge PiPj. Let x:=(x1, . . . , xn):=PEi,jz be the projection of a point z=(z1, z2, . . . , zn) on to Ei,j. Then











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




{

i
,
j

}

.






(
27
)







Low Point Constraint


A point Pj=(pj1, pj2, zj) on the mesh is called a low point if each point Pi=(pi1, pi2, zi) connected to Pj satisfies the edge minimum slope constraint

zi−zj≥αi:=si√{square root over ((pi1−pj1)2+(pi2−qj2)2)},  (28)

where all si∈R are given.



FIG. 12 shows a triangular mesh from a birds-eye view, where the low point P0 is connected to points P1, P2, P3, P4, P5, and P6. So in this picture, one requires that P0 is lower than all its connected points and that the slopes on each connecting edge i is at least si.


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.


Method Component 3 (Projection onto a Low Point Constraint)


Let α2, . . . , αm∈R. Define the set

E:={(x1, . . . ,xm)∈Rm|∀i∈{2, . . . ,m}:xi−x1≥αi}.  (29)


Let z=(z1, . . . , zm)∈Rm. Let δ1=z1 and let δ2≤δ3≤ . . . ≤δm be the values {zi−αi}i∈{2, . . . , m} in nondecreasing order. Let k be the largest number in {1, . . . , m} such that δk≤(δ1+ . . . +δk)/k. Then the projection x:=(x1, x2, . . . , xm):=PEZ is given by

x1=(δ1+ . . . +δk)/k and xi=max{x1,zi−αi}+αi,∀i∈{2, . . . ,m}.   (30)


To show this formula, first, x is the solution of

min(x1−z1)2+ . . . +(xm−zm)2  (31)
s.t x1−xii≤0,i∈{2, . . . ,m}.  (32)


Let y:=(y1, . . . , ym) where y1=x1 and yi:=xi−αi for i∈{2, . . . , m}. Without loss of generality, one may assume δi=zi−αi for i∈{2, . . . , m}. Then (4) becomes

min ϕ(y):=(y1−δ1)2+ . . . +(ym−δm)2  (33)
s.t gi(y):=y1−yi≤0,i∈{2, . . . ,m}.  (34)


To find the (unique) solution, we use Lagrange multipliers for convex optimization: there exist λi≥0, λ∈{2, . . . , m}, such that












1
2





ϕ


(
y
)




+


λ
2






g
2



(
y
)




+

+


λ
m






g
m



(
y
)





=
0




(
35
)









i



{

2
,





,
m

}



:







λ
i




g
i



(
y
)





=
0




(
36
)








i




{

2
,





,
m

}



:








g
i



(
y
)




0.






(
37
)







It follows from (35) that

(y1−δ1)+λ2+ . . . +λm=0  (38)
(y2−δ2)−λ2=0  (39)
. . .  (40)
(ym−δm)−λm=0.  (41)


Then y1≤δ1 because λ2, . . . , λm≥0. By substitution, one gets

y1+y2+ . . . +ym12+ . . . δm.  (42)


Next, for each i∈{2, . . . , m}, one has yi−δii≥0, yi−y1≥0, and (36) implies,

0=λigi(y)=(yi−δi)(y1−yi).  (43)

This leads to either yii≥y1 or y1=yi≥δi. That means

yi=max{y1i} for all i∈{2, . . . ,m}.  (44)


So (42) becomes

δ12+ . . . +δm=y1+max{y12}+ . . . +max{y1m}.  (45)

Next, suppose k is the largest number in {1, . . . , m} such that

δk≤(δ1+ . . . +δk)/k.  (46)


The choice of k is always possible since at least (46) is true for k=1. Now setting δm+1=+∞, one claims that

1+ . . . +δk)/k<δk+1.  (47)


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

δk≤y1≤δk+1.  (48)


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
















k






δ
k


+

δ

k
+
1


+

+

δ
m





(


δ
1

+

+

δ
k


)

+

δ

k
+
1


+

+

δ
m







(
49
)











=


y
1

+

max


{


y
1

,

δ
2


}


+

+

max


{


y
1

,

δ
m


}








(
50
)














y
1

+



max


{


y
1

,

δ
k


}


+

+

max


{


y
1

,

δ
k


}






k
-

1

terms










(
51
)













+
max



{


y
1

,

δ

k
+
1



}


+

+

max


{


y
1

,

δ
m


}







(
52
)






=


y
1

+


(

k
-
1

)


max


{


y
1

,

δ
k


)


+

max


{


y
1

,

δ

k
+
1



}


+

+

max



{


y
1

,

δ
m


}

.







(
53
)








If y1k, then (4) implies

k=y1+(k−1)max{y1k}<kδk,  (54)

which is a contradiction. Thus, y1≥δk. On the other hand, (47) and (45) implies











k






δ

k
+
1



+

δ

k
+
1


+

+

δ
m





(


δ
1

+

+

δ
k


)

+

δ

k
+
1


+

+

δ
m






(
55
)






=


y
1

+

max


{


y
1

,

δ
2


}


+

+

max


{


y
1

,

δ
m


}







(
56
)






=


y
1

+



y
1

+

+

y
1





k
-

1

terms




+

max


{


y
1

,

δ

k
+
1



}


+

+

max


{


y
1

,

δ
m


}







(
57
)









ky
1

+

max


{


y
1

,

δ

k
+
1



}


+

δ

k
+
2


+

+


δ
m

.






(
58
)








If y1k+1, then (55)-(58) implies

(k+1)δk+1≥ky1+max{y1k+1}>(k+1)δk+1,  (59)

which is a contradiction. Thus, y1≤δk+1. Therefore, the claim (48) is true. Then (45) implies

δ12+ . . . +δm=y1+max{y12}+ . . . +max{y1m}=ky1k+1+ . . . +δm,   (60)

which leads to y1=(δ1+ . . . +δk)/k. Combining with (44) completes the proof.


Edge Alignment Constraint


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 A1, A2, . . . , Am on the triangular mesh where A1=(ai1, ai2, xi). 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 AiAi+1, the length of its “shadow” on the xy-plane is

δi:=(ai+1,1−ai,1)2+(ai+1,2−ai,2)2.  (61)
Define also
t1:=0,t2:=δ1,t3:=δ12, . . . ,tm:=δ1+ . . . +δm−1.  (62)

Then the alignment constraint is written as

i∈{1, . . . ,m−2}:(xi+1−xi)/(ti+1−ti)=(xi+2−xi+1)/(ti+2−ti+1).  (63)


Method Component 4 (Projection onto an Edge Alignment Constraint)


Suppose the points (ai1, ai2), i∈{1, . . . , m} forms a path in R2. Define (t1, . . . , tm) by (62) and define the convex set

F:={(x1, . . . ,xm)∈Rm|((ai1,ai2,xi))i∈{i, . . . ,m}satisfies(63)}⊂Rm.  (64)


Let z=(z1, . . . , zm)∈Rm. Then the projection PFz is given by

i ∈{1, . . . ,m}:(PFZ)i=ƒ(ti).  (65)

where ƒ(t):=α+βt is the least squares line for the points (ti, zi)i∈{1, . . . m}. More specifically, (α, β) is obtained from the linear system











[



m






i
=
1

m



t
i










i
=
1

m



t
i








i
=
1

m



t
i
2





]



[



α




β



]


=

[







i
=
1

m



z
i










i
=
1

m




t
i



z
i






]





(
66
)







To show this, first, F is convex since all constraints in (63) are linear. Next, one considers the points (ti, zi) in R2. The problem is to find (x1, . . . , xm) such that the points (ti, xi) are aligned and

x−z∥2=Ei=1m(xi−zi)2 is minimized.  (67)


This is the least squares problem for the points (ti, zi), shown in FIG. 14. So the least squares line is ƒ(t)=α+βt where (α, β) satisfies (66). Thus, the projection coordinates are (PF (z))i=α+βti for i∈{1, . . . , m}.


Surface Alignment Constraint


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.


Method Component 5 (Projection onto a Surface Alignment Constraint)


Let (ai1, ai2), i∈{1, . . . , m} be a collection of points in R2 that are not on the same line. Define

F:={(x1, . . . ,xm)∈Rm|{(ai1,ai2,xi)}i∈{1, . . . ,m}lie on the same plane}.   (69)

Let z=(z1, . . . , zm)∈Rm. Then the projection PFz is given by

i∈{1, . . . ,m}:(PFz)i=ƒ(ai1,ai2).  (70)

where ƒ(t1, t2):=α+∈t1+γt2 is the least squares plane for the points (ai1, ai2, zi), i∈{1, . . . , m}. More specifically, (α, β, γ) is the solution of the system











[



m





e
,

a
1









e
,

a
1











e
,

a
1










a
1



2









a
1

,

a
2














e
,

a
2











a
1

,

a
2










a
2



2




]



[



α




β




γ



]


=


[






e
,
z











a
1

,
z











a
2

,
z






]

.





(
71
)








where e=(1, 1, . . . , 1), a1=(a11, a21, . . . , am1), and a2=(a12 a22, . . . , am2).


To show this, first, F is a convex set. Let x=(x1, . . . , xm)=PFZ, then x minimizes

x−z∥2i=1m(xi−zi)2  (72)

subject to the constraint that {(ai1, ai2, xi)}i∈{1, . . . , m} lie on the same plane in R3. Thus, it is equivalent to find the least squares plane ƒ(t1, t2)=α+βt1+γt2 that fits {(ai1, ai2, zi)}i∈{1, . . . , m}. One defines e, a1, a2 as above, then (α, β, γ) is the solution of (71). Since {(ai1, ai2)}i∈{1, . . . , m} are not on the same line, (71) has a unique solution (α, β, γ). Finally, one computes xi=α+βai1+γai2 for i∈{1, . . . , m}.


Projections onto General Surface Slope Constraints


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.


Normal Vector and Surface Slope Constraint


Let (e1, e2, e3) be the standard basis of R3. Given three points P1=(P11, P12, h1), P2=(P21, p22, h2), and P3=(p31, p32, h3) in R3, the normal vector to the plane P1P2P3 is the cross product










n


=



[





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 P1, P2, P3 on xy-plane are (p11, p12), (p21, p22), (p31, p32), which are not on the same line. This implies a1b2−a2b1≠0. So one can rescale and use










n


=


(





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







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

t1=a1u+b1v,t2=a2u+b2v, 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.


Definition 1 (surface orientation constraint) Let Δ be a triangle with normal vector {right arrow over (n)}=(−u,−v,1)∈R3 as above. Let {right arrow over (q)}=(q1, q2, q3)∈R3 \{0} be a unit vector and θ be an angle in [0, π], the constraint














(


n


,

q



)



θ

,
orequivalently
,






cos









(


n


,

q



)



=




-

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.


Projection onto a General Surface Slope Constraint


Consider a single triangle determined by three points Q1=(p11, p12, w1), Q2=(p21, p22, w2), and Q3=(p31, p32, w3) in R3. Without loss of generality, one may assume

w1+w2+w3=0.  (78)

Projecting onto an orientation constraint is to find the new heights h1, h2, h3 that minimizes

ϕ:=(h1−w1)2+(h2−w2)2+(h3−w3)2  (79)

such that the new points P1=(p11, p12, h1), P2=(p11, p12, h2), and P3=(p11, p12, h3) satisfy the given orientation constraint. Define t1:=h1−h3 and t2:=h2−h3, then

ϕ=(t1+h3−w1)2+(t2+h3−w2)2+(h3−w3)2.  (80)

Using the change of variables (75), one has:

ϕ=(a1u+b1v+h3−w1)2+(a2u+b2v+h3−w2)2+(h3−w3)2.  (81)

The new triangle P1P2P3 needs to satisfy some given orientation constraint g(u, v)≤0. So the projection reduces to











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
)







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











[




u
^






v
^




]

:=

Q


[



u




v



]



,

where





Q





is





an





invertible






matrix
.






(
84
)







One may also define







[





a
^

1





b
^

1







a
^

2





b
^

2




]

:=


[




a
1




b
1






a
2




b
2




]




Q

-
1


.







Then














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











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 âi, {circumflex over (b)}i


Next, one can simplify the model (82)-(83). Since (83) does not involve h3, one can convert problem (82)-(83) into two variables (u, v) as follows: first, set the derivative of ϕ with respect to h3 to zero

h3ϕ(u,v,h3)=2(a1u+b1v+h3−w1)+2(a2u+b2v+h3−w2)+2(h3−w3)=0.(89)

Then one obtains










h
3

=

-



1
3



[



(


a
1

+

a
2


)


u

+


(


b
1

+

b
2


)


v


]


.






(
90
)








Substituting into (82) and multiplying by 9, one obtains










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(a12+a22−a1a2)>0,  (97)
B=2(b12+b22−b1b2)>0,  (98)
C=2a1b1+2a2b2−a1b2−a2b1,  (99)
wa=3(a1w1+a2w2),  (100)
wb=3(b1w1+b2w2),  (101)

one has 9ϕ=3Au2+3Bv2+6Cuv−6wau−6wbv+Z. Thus, (82)-(83) reduces to











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 (h1, h2, h3) from (90), (75), and (73). More specifically,











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 (ai, bi, u, v) is replaced by (âi, {circumflex over (b)}i, û, {circumflex over (v)}).


Projection onto Surface Maximum Slope Constraint


Let P1P2P3 be a triangle in R3 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 P1P2P3 represents the desired ground, that cannot be too steep with respect to gravity, i.e., the slope of the plane P1P2P3 must not exceed a threshold s:=smax∈R+. Then the angle between {circumflex over (n)} and e3=(0,0,1) must satisfy ∠({circumflex over (n)},e3)≤tan−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)}, e3)≤tan−1 (s) is equivalent to

cos ∠({right arrow over (n)},e3)=custom character{right arrow over (n)},e3custom character/∥{right arrow over (n)}∥≥cos(tan−1(s))=1/√{square root over (1+s2)}.  (107)


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)}, θ)=(e3, tan−1 (s)). From (107), one may conclude











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











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








(

u
,
v
,

w
a

,

w
b


)



(


u
s

,

v
s

,


w
a

s

,


w
b

s


)


,





one can obtain an equivalent problem











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
)







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−1 (s) (i.e. the normal vector lays in the cone 1502 depicted in FIG. 15), and that equation (79) is minimized.


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:


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


2. For each value η≥0, the level set ϕ(u, v)=η is an ellipse in R2 whose center is the vertex (u0, v0) of ϕ(u, v), which satisfies

Au0+Cv0=wa  (113)
Cu0+Bv0=wb.  (114)


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


One may consider two cases:


Case 1: g(u0, v0)≤0. Then (u0, v0) is the solution of (111)-(112).


Case 2: g(u0, v0)>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














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
)







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


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


1. (115)-(117) yields a unique solution (u1, v1, λ1) such that λ1>0; and in this case, (u1, v1) is the unique solution of (111)-(112).


2. (115)-(117) yields at least one solution (u2, v2, λ2) such that λ2<0.


Therefore, one seeks a solution (u, v, λ) of (115)-(117) with λ>0. First, (115) and (116) yield

(A+λ)u+Cv=wa  (118)
Cu+(B+λ)v=wb.  (119)


Using the Cauchy-Schwarz inequality, one has

AB=[a12+a22+(a1−a2)2][b12+b22+(b1−b2)2](120)
≥[a1b1+a2b2+(a1−a2)(b1−b2)]2=C2.  (121)


Since A, B, λ>0, the determinant of (118)-(119) is

(A+λ)(B+λ)−C2>AB−C2>0.  (122)

This implies the system (118)-(119) has a unique solution










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
)







Next, substituting u and v into (117) yields










[


λ
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
)







Defining the constants accordingly, one may rewrite as

2+R1λ+R2)2=R3λ2+2R4λ+R5.  (129)


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

2+R1λ+R2+y)2=R3λ2+2R4λ+R5+2(λ2+R1λ+R2)y+y2  (130)
=(R3+2y2+2(R4+R1y)+R5+2R2y+y2.  (131)


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.,

[R4+R1y]2−(R3+2y)(R5+2R2y+y2)=0custom character  (132)
−2y3+[R12−R3−4R2]y2+[2R1R4−2R2R3−2R5]y+R42−R3R5=0.   (133)


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











(


λ
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 Δ:


Case 2a: R3+2y0<0. Then






λ
=

-



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.


Case 2b. R3+2y0=0. Then







y
0

=

-


R
3

2







and

λ2+R1λ+R2+y0=0.  (135)

So one has









λ
=



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









λ
=


1
2




(


-

R
1


+



R
1
2

-

4


R
2


+

2


R
3





)

.






(
137
)







Case 2c: R3+2y0>0. Define r:=√{square root over (R3+2y0)}. From (134),











(


λ
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 λ











λ
2

+


(


R
1

±
r

)


λ

+

(


R
2

+


y
0

±



R
4

+


R
1



y
0



r



)


=
0.




(
140
)







Since there is only one positive λ, one must have R4+R1y0≠0. Otherwise, (140) consists of two quadratic equations that have constant term R2+y0; 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 r←r·sgn(R4+R1y0) and takes only the equation











λ
2

+


(


R
1

-
r

)


λ

+

(


R
2

+

y
0

-



R
4

+


R
1



y
0



r


)


=
0.





(
141
)

)








It follows that the positive Δ is









λ
=



1
2



[

r
-

R
1

+




(

r
-

R
1


)

2

-

4


(


R
2

+

y
0

-



R
4

+


R
1



y
0



r


)





]


.





(
142
)







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 (h1, h2, h3).


Projection onto Surface Oriented Minimum Slope Constraint


Nonconvex Surface Minimum Constraint


Let P1P2P3 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 α.


This happens, for example, if P1P2P3 must have a slope at least s:=smin ∈R+. In this case, the angle between {right arrow over (n)} and e3=(0,0,1) satisfies

∠({right arrow over (n)},e3)≥tan−1(s).  (143)


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)}, e3)≥tan−1 (s) is equivalent to










cos









(


n
->

,

e
3


)



=







n
->

,

e
3







n
->






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











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).


The Surface Oriented Minimum Slope Constraint


(143) implies the angle between {right arrow over (n)} and the xy-plane satisfies

∠({right arrow over (n)},xy−plane)≤(π/2)−tan−1(s).  (146)

In some cases, it is not unreasonable to align the plane P1P2P3 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 P1P2P3 to incline toward a unit direction {right arrow over (q)}=(q1, q2, 0)∈R3 (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











(


n
->

,

q
->


)





π
2

-


tan

-
1




(
s
)




,





i.e.,










cos









(


n
->

,

q
->


)



=







n
->

,

q
->







n
->






cos






(


π
2

-


tan

-
1




(
s
)



)



=

s


1
+

s
2









(
147
)








and arrive at the following definition.


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










(


q
->

,
θ

)

=


(


q
->

,


π
2

-


tan

-
1




(
s
)




)

.














Substituting {right arrow over (n)}=(−u, −v, 1) and {right arrow over (q)}=(q1, q2, 0) into (147), one has














-

q
1



u

-


q
2


v





u
2

+

v
2

+
1





s


1
+

s
2





,




(
148
)








which is equivalent to













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.


Projection onto Surface Oriented Minimum Slope Constraint


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











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
)







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







Q
:=

[




q
1




q
2






q
2




-

q
1





]


,





then Q2=Id since∥{right arrow over (q)}∥=q12+q22=1. So Q=QT=Q−1. Next, the variables are changed










[




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












(



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











u
^

<
0

,




(
155
)










v
^

2

-



u
^

2


s
2


+
1


0

,




(
156
)







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










[




a
1




a
2






b
1




b
2




]



Q


[




a
1




a
2






b
1




b
2




]






(
157
)








and the following problem is obtained











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, wa, wb are defined below using the new a1, a2, b1, b2 from (157)

A=2(a12a22−a1a2)>0,  (160)
B=2(b12+b22−b1b2)>0,  (161)
C=2a1b1+2a2b2−a1b2−a2b1,  (162)
wa=3(a1w1+a2w2),  (163)
wb=3(b1w1+b2w2).  (164)

Changing variables by








(

u
,
v
,
A
,
B
,

w
b


)



(



u
^

s

,

v
^

,
sA
,

B
s

,


w
b

s


)


,





then (158)-(159) becomes











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
)







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−1(s) and the angle between the normal vector and the directional vector q is at most








π
2

-


tan

-
1




(
s
)



,





and that equation (151) is minimized.


Before solving the above problem, one can observe that


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


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


3. For each value η≥0, the level set ϕ(u, v)=η is an ellipse in R2 whose center is the vertex (u0, v0) of ϕ(u, v), which satisfies

Au0+Cv0=wa  (167)
Cu0+Bv0=wb.  (168)


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


Case 1: (u0, v0) is feasible, i.e., it lies inside or on the left branch {(u, v)∈R2|g2(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.


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














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
)







Consider the system of three equations (169)-(171). Using the geometry of R2 (see FIGS. 20 and 21), one may conclude that it has at least two solutions. To describe its solutions, let (u0, v0) be defined by (167)-(168), then


1. If g2(u0, v0)>0, then (169)-(171) has a unique solution (u1, v1, λ1) with λ1>0 and u1<0, and a unique solution (u2, v2, λ2) with λ2>0 and u2>0.


2. If g2(u0, v0)≤0 and g1(u0, v0)=u>0, then (169)-(171) has a unique solution (u1, v1, λ1) with λ1>0. Thus, u1<0. In addition, (169)-(171) also has at least one solution (u2, v2, λ2) with λ2<0.


3. In both cases 1 and 2, (u1, v1, λ1) is the unique solution of the whole Lagrange system (169)-(172), thus, (u1, v1) is the unique solution of (165)-(166).


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



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.



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 λ.


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.


Next, one can show how to find the solution in Case 2. First, write (169)-(170) as

(A−λ)u+Cv=wa,  (173)
Cu+(B+λ)v=wb.  (174)

Suppose for now that the determinant (A−λ)(B+λ)−C2≠0. Then












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









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













[


λ
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
)













By defining the constants accordingly, one rewrites as

2+R1λ+R2)2=R3λ2+2R4λ+R5.  (182)


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)

λ4+2R1λ3+(R12+2R2−R32+2(R1R2−R4)Δ+R22−R5=0,  (183)

and use the classical Ferrari's method for quartic equation. Then for each λ>0, define

D=(A−λ)(B+λ)−C2,  (184)
Du=wa(B+λ)−wbC,  (185)
Dv=wb(A−λ)−waC.  (186)


Case 2a: D=Du=Dv=0. Then one has the system

Cu+(B+λ)v=wb,  (187)
v2−u2+1=0.  (188)


Since B>0 and λ>0, the first equation implies v=(wb−Cu)/(B+λ). Then the second one becomes:

(wb−Cu)2−(B+λ)2u2+(B+λ)2=0,i.e.,  (189)
[C2−(B+λ)2]u2−2wbCu+[wb2+(B+λ)2]≥0.  (190)

If the determinant

(wbC)2−(C2−(B+λ)2)(wb2+(B+λ)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










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 (C2−(B+λ)2)(wb2+(B+λ)2)<0. So, the negative solution u is









u
=





w
b


C

+




(


w
b


C

)

2

-


(


C
2

-


(

B
+
λ

)

2


)



(


w
b
2

+


(

B
+
λ

)

2


)







C
2

-


(

B
+
λ

)

2



.





(
193
)







Case 2b: D≠0. Then by (175)-(176), u=Du/D and v=Dv/D.


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 (h1, h2, h3).


Multiple Surface Orientation Constraints


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.


Feasibility Criterion for One Maximum and One Oriented Minimum Slope Constraints


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)},e3)≥1/√{square root over (1+t2)}(maximum slope)  (194)
cos ∠({right arrow over (n)},{right arrow over (q)})≥s/√{square root over (1+s2)}(oriented minimum slope)  (195)

where e3=(0,0,1); {right arrow over (q)}=(q1, q2, 0) ≡(q1, q2) is a given unit vector; and t, s∈R+ are also given. Then the problem is feasible if and only if t≥s.


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)}0=(u, v). Then (194) implies












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 R2 centered at the origin with radius t/√{square root over (1+t2)}, and (195) implies












uq
1

+

vq
2




s


1
+

s
2





,




(
197
)








which is a circular segment 2202 with height







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.


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








t


1
+

t
2






s


1
+

s
2









t
2


1
+

t
2






s
2


1
+

s
2






t


s
.






Feasibility Criterion for One Maximum and Two Oriented Minimum Slope Constraints


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












cos









(


n


,

e
3


)





1


1
+

t
2





,


cos









(


n


,


q


1


)






s
1



1
+

s
1
2





,
and








cos









(


n


,


q


2


)







s
2



1
+

s
2
2




.






(
198
)








where e3=(0,0,1), {right arrow over (q)}i=(qi1, qi2, 0)≡(qi1 qi2) are unit vectors, and t, s1, s2 ∈R+. Then the problem is feasible if and only if














(



q


1

,


q


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
)








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







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










(



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.


Feasibility Criterion for Multiple Surface Oriented Minimum Slope Constraints:


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)}i}i∈1 ⊂R2. Let t≥s>0. Suppose the constraints are enforced on n as follows:

cos ∠({right arrow over (n)},e3)≥1/√{square root over (1+t2)},  (200)
i∈I:cos ∠({right arrow over (n)},{right arrow over (q)}i)≥s/√{square root over (1+s2)}.  (201)

Then it suffices to enforce 2 constraints in (201) since the rest will be automatically fulfilled.


To verify this, one can assume {{right arrow over (q)}1, {right arrow over (q)}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.


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






t


1
+

t
2








and several circular segments of the same height in FIG. 24







(


where





r

=

s


1
+

s
2





)

.





One can argue that all other {right arrow over (q)}i's lie in between {right arrow over (q)}1 and {right arrow over (q)}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)}i. Thus, it suffices to enforce at most two oriented minimum slope constraints.


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


Curvature Minimization


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.


Given the points Pi=(pi1, pi2, hi), i=1, 2, 3, 4, so that they form two adjacent triangles Δ1=P1P2P4 and Δ2=P2P3P4 (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.


Define ai:=pi1−p41 and bi:=pi2−p42, for i=1, 2, 3. Then the respective normal vectors are computed by the cross products











n


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


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












n


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


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)}1 and {right arrow over (n)}2, i.e.,











δ


12

:=



δ




Δ
1



Δ
2



=




n


1

-


n


2


=


:



[






u
,
h










v
,
h






]








(
206
)








where










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
)







Now let custom character be the set of all pairs of adjacent triangles (Δi, Δj) for which it is desirable to minimize the curvature. Then for each pair (Δi, Δj)∈custom character, one finds the corresponding vectors hij=(h1ij, h2ij, h3ij, h4ij)∈R4, uij, vij∈R4, and computes the corresponding curvature δij=(custom characteruij, hijcustom character, custom charactervij, hijcustom character). One can then aim to minimize all the computed curvatures. Thus, one can arrive at the objective











G

1
,
*




(
x
)


:=





(


Δ
i

,

Δ
j


)


𝒵












δ


ij



*






(
212
)








where ∥⋅∥* can be either 1-norm or max-norm in R2. For 1-norm, the objective is












G

1
,
1




(
x
)


:=






(


Δ
i

,

Δ
j


)


𝒵













u
ij

,

h
ij







+






v
ij

,

h
ij








,




(
213
)








and for max-norm, the objective is











G

1
,





(
x
)


:=





(


Δ
i

,

Δ
j


)


𝒵




max



{







u
ij

,

h
ij






+






v
ij

,

h
ij







}

.







(
214
)







Simplified Computations for Symmetric Cases.


Suppose the two dimensional mesh satisfies the following symmetry: for every pair of adjacent triangles (P1P2P4, P2P3P4)∈custom character, there exists t∈R such that

{right arrow over (P4P1)}+{right arrow over (P4P3)}=t{right arrow over (P4P2)}.  (215)

Then it follows that (a1, b1)+(a3, b3)=t(a2, b2). So one can deduce a1b2−a2b1=a2b3−a3b2. Using (207)-(211), one obtains









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).


Proximity Operators


Since optimization methods can require proximity operators, one will derive the necessary formulas. It is sometimes convenient to compute the proximity operator Pƒ via the proximity operator of its Fenchel conjugate ƒ*, which is defined by ƒ*:X→R:x*custom charactersupx∈X(custom characterx*, xcustom character−ƒ(x)). Indeed, if γ>0, then (see, e.g., [2, custom characterTheorem 14.3(ii)])

x∈X:x=Pγƒ(x)+γPγ−1ƒ*(γ−1x).  (217)

One may also recall a useful formula from [2, Lemma 2.3]: if ƒ:X→R is convex and positively homogeneous, α>0, w∈X, and h:X→R:xcustom characterαƒ(x−w), then











P
h



(
x
)


=


w
+

α







P
f



(


x
-
w

α

)




=

x
-

α








P

f
*




(


x
-
w

α

)


.








(
218
)







Formula for Proximity Operators:


Let {ui}i∈I be a system of finitely many vectors in Rn, and










f


:







R






R


:






x




max

i

I





{






u
i

,
x





}

.







(
219
)







Then ƒ*=tD where D:=convUi∈I{ui,−ui}. Consequently, the proximity operator of ƒ can be computed by Pƒ=Id−PD, where PD is the projection onto the set D.


To see this, first, suppose x*∈D, then one can express










x
*

=





i

I









λ
i



u
i






where









i

I










λ
i







1.





(
220
)








It follows that for all x∈X,














x
*

,
x



-

f


(
x
)



=






i

I





λ
i






u
i

,
x





-


max

i

I









u
i

,
x










(





i

I




λ
i


-
1

)




max

i

I









u
i

,
x








0.





(
221
)








So, ƒ* (x*)=supx∈X[custom characterx*, xcustom character−ƒ(x)]≤0. Notice that equality happens if one sets x=0. Thus, ƒ*(x*)=0.


Now suppose x*∉D. Since D is nonempty, closed, and convex, the classic separation theorem implies that there exists x∈X such that

custom characterx*,xcustom character>custom characteru,xcustom character for all u∈D  (222)

This leads to custom characterx*, xcustom character−ƒ(x)>0. Since ƒ is homogeneous, one can have

ƒ*(x*)≥custom characterx*,λxcustom character−ƒx)→+∞ as λ→+∞.  (223)

So ƒ*(x*)=+∞. Therefore, one concludes that ƒ*=tD. Now employing formula (218) and noting that Pƒ*=PD, the projection onto D (see the beginning of the iterative projection methods optimization problems description above), one obtains the proximity operator for ƒ.


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


Example 1

Given α>0, a vector u ∈Rn \{0} and the function

ƒ:Rn→R: x custom characterα|custom characteru,xcustom character|.  (224)

Then the proximity operator of ƒ is

Pƒ=Id−PD where D:=[−αu,αu].  (225)

The explicit projection onto D is given below (see also, [4, Theorem 2.7]).











P
D


x

=


min


{

1
,

max


{


-
1

,





α





u

,
x







α





u



2



}



}


α





u

=

min


{

α
,

max


{


-
α

,




u
,
x






u


2



}



}



u
.







(
226
)







Example 2

Given two vectors u, v∈Rn and

ƒ:Rn→R:xcustom charactermax{|custom characteru,xcustom character|,|custom characterv,xcustom character|}.  (227)

Then the proximity operator of ƒ is

Pƒ=Id−PD where D:=conv{u,v,−u,−v}.  (228)

In general, PD is the projection onto a parallelogram in Rn.


Approximation of Surface Slope Constraint Projections


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











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∈Ω:={u∈R2|g(u)≤0}.  (230)


If one defines







M
:=



[



A


C




C


B



]






and





w

:=

[




W
a






W
b




]



,





then










φ


(
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.


Approximation for Maximum Slope Constraint


Consider the projection onto maximum slope constraint written in the form











min

u


R
2





φ


(
u
)



:=



1
2



u
T


Mu

-


w
T


u






(
232
)








subject





to





u


Ω

:=

{


(


u
1

,

u
2


)




R
2








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 m≥3 be an integer and 0≤θ1≤θ2≤ . . . ≤θm<2π. Define the points on the unit circle pk:=(cos θk, sin θk) for k=1, 2, . . . , m, and set also p0:=pm. Now define the convex m-polygon U:=conv{pk|k=0, 1, . . . , m}. One then arrives at the approximate problem











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 u0:=M−1w be the vertex of the paraboloid φ(u).


Case 1: u0 ∈Ω. Then u0 is even the solution of (232)-(233), thus, the problem is solved.


Case 2: u0 ∉C. So one also has u0∉U. The solution of (234) may be found by the following steps.


Step 2a: Find the index set

K:={k|0 and u0 are on opposite sides of the line pkpk+1}.  (235)


Step 2b: Minimize φ(u) on each edge pkpk+1 for k∈K. Consider φ(u) on an edge pkpk+1. Define Δpk=pk+1−pk. Take a point u∈pkpk+1, then

u=pk+tΔpk for some t∈[0,1].  (236)
So










ψ


(
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








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

tk:=min{1,max{0,t}}.  (239)


Step 2c: If there exists k∈K such that 0<tk<1, then u=pk+tkΔpk is the solution of (234). Otherwise, the solution of (234) is









u
=



p

k
0


+


t

k
0



Δ






p

k
0







where






k
0



:=


argmin

k

K





φ


(


p
k

+


t
k


Δ






p
k



)


.







(
240
)







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


Approximation for Oriented Minimum Slope Constraint


Consider the projection onto oriented minimum slope constraint written in the form
















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:={(u1,u2)∈R2|u1≤−s(|u2|+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











min

u


R
2





φ


(
u
)



:=




1
2



u
T


Mu

-


w
T


u





subject





to





u




U
.






(
244
)








Let u0:=M−1w be the vertex of the paraboloid φ(u).


Case 1: u0 ∈C. Then u0 is even the solution of (241)-(242), thus, the problem is solved.


Case 2: u0 ∈C. So u0 ∈U. One solves (244) by first finding the minimizer of φ(u) on the boundary of U, which consists of two half-lines

{p+tΔp1|t∈R+} and {p+tΔp2|tΣR+},  (245)

where p:=(−s, 0), Δp1:=(−s, 1), and Δp2:=(−s, −1).


Let u:=p+tΔp for t∈[0, +∞). Similar to the computation above, one has










ψ


(
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









t
:=

max



{

0
,




w
T


Δ





p

-


p
T


M





Δ





p



Δ






p
T


M





Δ





p



}

.






(
247
)








Second, one sets Δp=Δp1 and Δp=Δp2 in the above formula to obtain t1 and t2, respectively. Finally, comparing the values φ(p+t1Δp1) and φ(p+t2Δp2), one obtains the minimizer of (244).


Visualization Examples

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



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.


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.



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.


Logical Flow



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


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 design—CAD]).


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).


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.


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.


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


Hardware Environment



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.


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.


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.


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).


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).


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.


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.


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.


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.



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.


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.


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.


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).


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.


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.


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

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.


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



  • [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 Mathématiques de la SMC. Springer, New York, 2011. With a foreword by Hédy 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), Václav 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] BRICEÑO 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] RUSZCZYŃSKI, A. Nonlinear optimization. Princeton University Press, Princeton, N.J., 2006.


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; andthe 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; andthe 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.
CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit under 35 U.S.C. Section 119(e) of the following commonly-assigned U.S. provisional patent application(s), which is/are incorporated by reference herein: Provisional Application Ser. No. 62/394,608, filed on Sep. 14, 2016, with inventor(s) Hung M. Phan and Valentin R. Koch, entitled “Applying Geometric Constraints on Triangles in Three Dimensions,”.

US Referenced Citations (16)
Number Name Date Kind
1021657 Burrows Mar 1912 A
7133044 Maillot Nov 2006 B2
7196702 Lee Mar 2007 B1
7236167 Lee Jun 2007 B2
7755623 Rockwood Jul 2010 B2
8836701 Rockwood Sep 2014 B1
9262859 Rockwood Feb 2016 B2
9898848 Black Feb 2018 B2
20080259077 Liepa Oct 2008 A1
20110025690 Tzur Feb 2011 A1
20150262405 Black Sep 2015 A1
20160232262 Shayani Aug 2016 A1
20170024921 Beeler Jan 2017 A1
20170124726 Soulard May 2017 A1
20180268095 Shayani Sep 2018 A1
20180322646 Matthies Nov 2018 A1
Non-Patent Literature Citations (22)
Entry
Bauschke, H.H., et al., “On Projection Algorithms for Solving Convex Feasibility Problems”, SIAM Review. Sep. 1996, pp. 367-426, vol. 38, No. 3.
Bauschke, H.H., et al., “Projection Methods: Swiss Army Knives for Solving Feasibility and Best Approximation Problems with Halfspaces”, In Infinite products of operators and their applications, 2015, vol. 636, pp. 1-39, Contemp. Math., Amer. Math. Soc., Providence, RI.
Bauschke, H.H., et al., “Stadium norm and Douglas-Rachford splitting: a new approach to road design optimization”, Operations Research, 2014, pp. 1-35, vol. 64, No. 1.
Biniaz, A., et al., “Drainage reality in terrains with higher-order Delaunay triangulations” Springer Berlin Heidelberg, Berlin, Heidelberg, 2008, pp. 199-211.
Biniaz, A., et al., “Slope fidelity in terrains with higher-order delaunay triangulations”, 16th International Conference in Central Europe on Computer Graphics, Visualization, and Computer Vision, 2008 (Plzen, Czech Republic), Václav Skala—UNION Agency, pp. 17-23.
Bo̧t, R.I., et al., “A primal-dual splitting algorithm for finding zeros of sums of maximally monotone operators”, SIAM Journal on Optimization, 2013, pp. 2011-2036, vol. 23, No. 4.
Briceño Arias, L.M., et al., “A monotone+ skew splitting model for composite monotone inclusions in duality”. SIAM Journal on Optimization, 2010, pp. 1230-1250, vol. 21, No. 4.
Censor, Y., et al., “On the Effectiveness of Projection Methods for Convex Feasibility Problems with Linear Inequality Constraints”, Comput. Optim. Appl., 2012, pp. 1065-1088, vol. 51, No. 3.
Censor, Y., et al., “Parallel Optimization: Theory, Algorithms and Applications”, Numerical Mathematics and Scientific Computation, 1997, pp. 1-20, Oxford University Press, New York.
Douglas Jr., J. et al., “On the numerical solution of heat conduction problems in two and three space variables”, Trans. Amer. Math. Soc., 1956, pp. 421-439, vol. 82.
Itoh, T., et al., “Automatic Conversion of Triangular Meshes Into Quadrilateral Meshes with Directionality”, International Journal of CAD/CAM, 2002, pp. 11-21, vol. 1., No. 1.
Johnston, B.P., et al., “Automatic Conversion of Triangular Finite Element Meshes to Quadrilateral Elements”, International Journal for Numerical Methods in Engineering, 1991, pp. 67-84, vol. 31.
Kuhn, H.W., et al., “Nonlinear Programming”, Proceedings of the Second Berkeley Symposium on Mathematical Statistics and Probability, 1951, pp. 481-492, University of California Press, Berkeley and Los Angeles.
Lions, P.I., et al., “Splitting Algorithms for the Sum of Two Nonlinear Operators*”, Siam J. Num. Anal., Dec. 1979, pp. 964-979, vol. 16, No. 6.
Moore, I.D., et al., “Digital terrain modelling: a review of hydrological, geomorphological, and biological applications”, Hydrological processes, 1991, pp. 3-30, vol. 5.
Moreau, J.J., “Proximite et dualite dans un espace hilbertien”, Bulletin de la S. M. F., tome 93, 1965, pp. 273-299.
Rank, E., et al., “Adaptive Mesh Generation and Transformation of Triangular to Quadrilateral Meshes”, Communications in Numerical Methods in Engineering, 1993, pp. 121-129, vol. 9.
Bauschke, H.H., et al., “Convex Analysis and Monotone Operator Theory in Hilbert Spaces”, CMS Books in Mathematics/Ouvrages de Mathématiques de la SMC, 2011, Springer, New York.
Graves, R.M., et al., “Classic Golf Hole Design”, 2002, pp. 50, 182-186, John Wiley & Sons, Inc., Hoboken DC.
Hawtree, F.W., “The Golf Course, Planning design, construction and maintenance”, E & FN Spon, 2005, pp. 72, imprint of Chapman & Hall, London, UK.
Irving, R., “Beyond the Quadratic Formula”, The Mathematical Association of America, 2010, pp. 146-149, Washington DC.
Ruszczynski, A., “Nonlinear optimization”, Princeton University Press, 2006, pp. 20, 113-117, Princeton, NJ.
Related Publications (1)
Number Date Country
20180075169 A1 Mar 2018 US
Provisional Applications (1)
Number Date Country
62394608 Sep 2016 US