Algorithm Search⌘K

Conceptadvanced

Twist compatibility

Also called compatibility of corner twists.

At a patch corner the two edges each give a twist r_uv, and a smooth patch has r_uv = r_vu, so incompatible cross derivative data cannot be met by any polynomial patch.

Twist compatibility is the condition that the two twist vectors at a corner of a patch agree. At a corner, one edge gives the cross derivative rvr_v along it, and its derivative along the edge is a twist rvur_{vu}. The other edge gives rur_u, and its derivative along that edge is a twist ruvr_{uv}. Every polynomial patch has ruv=rvur_{uv} = r_{vu}, so when the two twists come from different and independent data, no polynomial patch can take both. This is the main obstacle to smooth joins of patches at a vertex, and Gregory's rational patch is one way around it.

In plain words

To join a new patch smoothly to its neighbours, the patch must match not only the edges of the hole but also the slopes across them. The slopes come from the neighbours. At a corner of the hole two edges meet. Walk along the first edge and watch how the slope across it changes. Then walk along the second edge and watch how the slope across that edge changes. For any smooth surface these two rates of change are the same thing seen in two ways, so they must agree. When the neighbours were made independently, they usually do not agree, and then no ordinary polynomial patch fits. The way out is to give up smoothness at the single corner point: a patch with a rational blend uses the first rate near the first edge and the second rate near the second edge.

The idea

The data. Let a patch r(u,v)r(u, v) on [0,1]2[0, 1]^2 have the corner at (0,0)(0, 0). The boundary data near that corner are two edge curves and two cross derivatives:

r(u,0)=c(u),r(0,v)=d(v),rv(u,0)=t(u),ru(0,v)=s(v).r(u, 0) = c(u), \quad r(0, v) = d(v), \quad r_v(u, 0) = t(u), \quad r_u(0, v) = s(v).

Simple consistency at the corner needs c(0)=d(0)c(0) = d(0), c′(0)=s(0)c'(0) = s(0) and d′(0)=t(0)d'(0) = t(0). In a G1G^1 join the cross derivatives tt and ss come from the neighbouring patches, through condition (1) on the tangent plane continuity page.

The two twists. Differentiate the cross derivatives along their edges:

rvu(0,0)=t′(0),ruv(0,0)=s′(0).r_{vu}(0, 0) = t'(0), \qquad r_{uv}(0, 0) = s'(0).

Theorem. If t′(0)≠s′(0)t'(0) \ne s'(0), no patch rr of class C2C^2 near the corner, and in particular no polynomial or polynomial spline patch that is C2C^2 there, has rv(u,0)=t(u)r_v(u, 0) = t(u) and ru(0,v)=s(v)r_u(0, v) = s(v).

Proof. For a C2C^2 function the mixed partial derivatives are equal, ruv=rvur_{uv} = r_{vu} (the theorem of Schwarz). From rv(u,0)=t(u)r_v(u, 0) = t(u) for all uu we get rvu(0,0)=t′(0)r_{vu}(0, 0) = t'(0), and from ru(0,v)=s(v)r_u(0, v) = s(v) for all vv we get ruv(0,0)=s′(0)r_{uv}(0, 0) = s'(0). So t′(0)=s′(0)t'(0) = s'(0), a contradiction. A polynomial is C∞C^\infty. □\square

The condition t′(0)=s′(0)t'(0) = s'(0) is the twist compatibility condition. It is a condition on the data, and it is easy to break: two neighbours that are designed separately, or nn patches around one vertex with cross derivatives chosen edge by edge, give two twists with no reason to agree.

The rational blend. The theorem needs C2C^2 at the corner point only. So replace the constant twist WW in the corner term of a Coons type construction by a function that is s′(0)s'(0) on one edge and t′(0)t'(0) on the other:

W(u,v)=u s′(0)+v t′(0)u+v,(u,v)≠(0,0),W(u, v) = \frac{u\, s'(0) + v\, t'(0)}{u + v}, \qquad (u, v) \ne (0, 0),
r(u,v)=c(u)+v t(u)+d(v)+u s(v)−[c(0)+u c′(0)+v d′(0)+uv W(u,v)].r(u, v) = c(u) + v\, t(u) + d(v) + u\, s(v) - \bigl[c(0) + u\, c'(0) + v\, d'(0) + u v\, W(u, v)\bigr].

This is the Boolean sum of the two first order Taylor projectors of the corner, Puf=f(0,v)+ufu(0,v)P_u f = f(0, v) + u f_u(0, v) and Pvf=f(u,0)+vfv(u,0)P_v f = f(u, 0) + v f_v(u, 0), with the twist of PuPvfP_u P_v f replaced by WW, as in Coons patches.

It meets all four conditions. At v=0v = 0: r(u,0)=c(u)+d(0)+us(0)−c(0)−uc′(0)=c(u)r(u, 0) = c(u) + d(0) + u s(0) - c(0) - u c'(0) = c(u). Differentiate in vv. The term uvWu v W has ∂v(uvW)=uW+uvWv\partial_v (u v W) = u W + u v W_v, and for fixed u>0u > 0, Wv=u(t′(0)−s′(0))/(u+v)2W_v = u (t'(0) - s'(0)) / (u + v)^2 is bounded, so at v=0v = 0 this is uW(u,0)=us′(0)u W(u, 0) = u s'(0). Hence rv(u,0)=t(u)+d′(0)+us′(0)−d′(0)−us′(0)=t(u)r_v(u, 0) = t(u) + d'(0) + u s'(0) - d'(0) - u s'(0) = t(u). The edge u=0u = 0 is symmetric, with W(0,v)=t′(0)W(0, v) = t'(0). At the corner, ∣uvW∣≤uvmax⁡(∣s′(0)∣,∣t′(0)∣)|u v W| \le u v \max(|s'(0)|, |t'(0)|) for vectors compared by length, so rr is continuous there, and the same bound gives ru(0,0)=s(0)r_u(0, 0) = s(0) and rv(0,0)=t(0)r_v(0, 0) = t(0). □\square

The patch is not C2C^2 at the corner: its mixed derivative tends to s′(0)s'(0) along one edge and to t′(0)t'(0) along the other, as the theorem says it must. The full Gregory patch does this at all four corners.

Examples

A plane that tilts along one edge. Take c(u)=(u,0,0)c(u) = (u, 0, 0), d(v)=(0,v,0)d(v) = (0, v, 0), the cross derivative t(u)=(0,1,u)t(u) = (0, 1, u) along v=0v = 0, so the surface rises more steeply across that edge as uu grows, and s(v)=(1,0,0)s(v) = (1, 0, 0) along u=0u = 0, so it does not rise across that edge at all. The corner conditions hold: s(0)=c′(0)s(0) = c'(0) and t(0)=d′(0)t(0) = d'(0). The twists are t′(0)=(0,0,1)t'(0) = (0, 0, 1) and s′(0)=(0,0,0)s'(0) = (0, 0, 0), so the data are incompatible. A polynomial height z(u,v)z(u, v) would need zvu(0,0)=1z_{vu}(0, 0) = 1 and zuv(0,0)=0z_{uv}(0, 0) = 0. The rational blend gives W=(0,0,v/(u+v))W = (0, 0, v/(u + v)) and

r(u,v)=(u, v, u2vu+v).r(u, v) = \Bigl(u,\ v,\ \frac{u^2 v}{u + v}\Bigr).

Here zv=u3/(u+v)2z_v = u^3/(u + v)^2, which is uu at v=0v = 0, and zu=uv(u+2v)/(u+v)2z_u = u v (u + 2v)/(u + v)^2, which is 00 at u=0u = 0, as asked. Both first derivatives tend to 00 at the corner, so the patch is C1C^1 there. The mixed derivative is zuv=u2(u+3v)/(u+v)3z_{uv} = u^2 (u + 3v)/(u + v)^3: it is 11 on the edge v=0v = 0 and 00 on the edge u=0u = 0, so it has no limit at the corner.

Compatible data. With t(u)=(0,1,u)t(u) = (0, 1, u) and s(v)=(1,0,v)s(v) = (1, 0, v) both twists are (0,0,1)(0, 0, 1), WW is constant, and the formula gives the polynomial z=uvz = u v, the hyperbolic paraboloid.

The bicubic Coons patch. The bicubically blended Coons patch interpolates positions and cross derivatives on all four edges. Its correction term is a bicubic Hermite patch that needs a twist vector at each corner. With incompatible data, any constant choice of that twist matches one edge and misses the other, so the patch is not G1G^1 to one of the neighbours near the corner.

Where it is used

  • Gregory patches. Each corner of the patch has two inner control points instead of one, and a rational blend picks one near each edge.
  • n-sided patches and vertex blends. Where nn patches meet at a vertex, the G1G^1 conditions of the nn edges are coupled through the twists. Schemes either choose the cross derivatives so that the twists agree, or use rational blends, or split the region so that the problem moves to points where it can be solved.
  • Twist estimation. When a designer gives only curves, as for a Gordon surface or a bicubic Coons patch, the program must invent the twists. Any estimate that is the same for both edges makes the data compatible, but a poor estimate shows as a flat spot or a bulge near the corner.
  • Solid modelers. Chiyokura and Kimura used Gregory patches so that a patch in a network can be changed locally, without the twist constraints that would tie it to all its neighbours.

References

  1. J. A. Gregory, Smooth interpolation without twist constraints, in R. E. Barnhill and R. F. Riesenfeld (eds.), Computer Aided Geometric Design, Academic Press, 1974, pp. 71 to 87, the compatibility conditions on the twists of boundary data, and the rational blend of the two twists that removes them
  2. Gerald Farin, Curves and Surfaces for CAGD, A Practical Guide, fifth edition, Morgan Kaufmann, 2002, Chapter 22, Coons Patches (the twist terms of the bicubically blended Coons patch and the compatibility problem)
  3. Hiroaki Chiyokura and Fumihiko Kimura, Design of solids with free-form surfaces, Computer Graphics 17(3), SIGGRAPH 1983, the use of Gregory patches to fill a patch network with G1 joins where the corner twists of neighbouring patches disagree (general locator)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/B9HV86/text.yaml