Tutorial 3: Framed Closed Curves

A closed discrete curve γ is map from a discrete circle Sn1={zCzn=1}, nN, into some space M. In some situations it is more convenient to consider the discrete circle just as Z/nZ,Z/nZk+nZe2πik/nSn1,and a closed discrete curve as a periodic sequence, i.e. γ:ZM such that γi+n=γi. In this case we just write γ=(γ0,,γn1) and keep in mind that it is meant to be a periodic sequence.

Now, if γ=(γ0,,γn1) is a closed discrete curve in R3, we have a corresponding parallel transport P. But in general there exists no parallel frame for the curve. This you certainly have noticed already from the last homework.

angledefect_

We can still apply the algorithm to the curve and obtain a normal vector field which by construction satisfies Pk(Nk1)=Nk for all k=1,,n1. But there is no reason that this should also be true for k=n. Here we may have a certain angle defect ω, Pn(Nn1)=cos(ω)N0+sin(ω)T×N0.

Note that the normal spaces (and thus also the space of normal vector fields) are natural complex vector spaces. The complex numbers act on Nk:=Tk as follows: C×NkNk,(x+iy,N)(x+iy)N:=xN+yTk×N.Further they inherit a natural inner product from R3. This turns the normal spaces into hermitian lines. Note that the parallel transports are isometric orientation preserving maps. Thus they define unitary maps between these lines. For the normal field N defined as above, eiωN0=Pn(Nn1)=PnP1(N0).Hence eiω=tr(PnP1). In particular we see that eiω is independent of all choices – the choice of the start point k=0 and the choice of the first normal vector N0 – and thus can be assigned directly to the curve γ.

tangentimage_

Actually this phenomenon is well-known in the smooth world. The angle defect ω of a curve γ is related to the signed area A enclosed by the tangent T of γ on the sphere, Aωmod2πZ.

Though not each closed discrete curve γ can be equipped with a parallel normal field we still want a nice smooth looking framing along the curve. One obvious way to resolve this problem is to distribute the defect ω along the curve: If sk denotes the discrete arclength,sk=j=0k1j,k=ek and L=sn=j=0n1j the length of the curve, then the field is given byN~k=eiωLskNk.Here again N denotes the normal field produced by our algorithm. Note thatPk(N~k1)=Pk(eiωLsk1Nk1)=eiωLsk1Pk(Nk1)=eiωLsk1Nk=eiωLkN~kfor k=0,,n1. Similarly, for k=n we getPn(N~n1)=eiωLsn1Pn(Nn1)=eiωiωLsn1N0=eiωLn1N~0.I.e. compared to a parallel field the field N~ rotates by an angle proportional to the edge length.

parallelandconstanttorsionframe

Note that ω is only defined up to an integral multiple of 2π. The choice of ω determines how twisted the field is. Though there is a minimal choice.

twistings

Let us translate this to quaternionic frames. A quaternionic frame assigns to each edge ek a unit quaternion ψk which rotates the standard basis (i,j,k) such that i is mapped to Tk, Tk=ψkiψk,Nk=ψkjψk,Bk=ψkkψk.In Houdini’s this was called @orient.

Now suppose we have constructed a frame ψ as described in the previous tutorial. To obtain the modified frame ψ~ as described above we must perform for each edge ek an additional rotation around ek by the angle ωLsk. Note that also the (j,k)-plane is a complex line and ψk is complex linear. Thus, instead of rotating afterwards around ek, we can equivalently precompose ψk by a rotation around i by the same angle. This yieldsψ~k=ψk(cos(ω2Lsk)isin(ω2Lsk))=ψkeiω2Lsk=qkq1ψ0eiω2Lsk.Here Pk(X)=qkXqk. This modified frame is the discrete counterpart of a frame of constant torsion, which always exists.

Exercise: Modify your last homework so that it computes for a given closed discrete curve a frame of constant torsion. Make it possible to change the twisting of the frame.

tube_

One possible application of frames is to draw a tubular surface around a given curve: Let γ is a closed discrete curve and ψ a frame of γ. Then the ε-tube can be parametrized byf:Sn1×Sm1R3,(j,k)γj+εψjeπik/mjeπik/mψj. This we can use to create our own improved version of the polywire node.

Homework (due 17/19 May): Create a tubular surface node, i.e. write a network that computes for any given closed discrete curve a parametrized tube around it. To do so use a frame of minimal constant torsion to modify the point positions of a standard torus provided by Houdini’s torus node. In one direction the resolution of the torus has to be chosen to coincide with the number of points of the input curve. Make it possible to change the resolution in the other direction.

Hint: To set the number of columns of the torus one can use the Expression function npoints in the parameter field Columns of the Torus Node.

This entry was posted in Tutorial. Bookmark the permalink.