I'm working on a Monte Carlo simulation of a two-dimensional nematic system (XY-like model with even-order Legendre polynomial interactions, such that the director angle $\theta$ obeys $\theta \equiv \theta \pm 2 \pi$ -- I use $\theta \le \theta \lt \pi$), and one of the things I want to do is find topological defects. For $\pm \pi$ defects, this is as simple as computing the winding angle in a 4-cell loop, i.e. going around the loop in a fixed direction and computing the difference in director angle $\theta$ between each pair of cells, adding/subtracting $\pi$ where necessary to ensure $\lvert \Delta \theta \rvert \le \frac{\pi}{2}$ for each pair.

Obviously, this algorithm does not find defects where the winding angle is $\pm 2 \pi$ (e.g. vortices) unless each pair has a relative angle of exactly $\frac{\pi}{2}$ or $\frac{-\pi}{2}$. So my question is, can anyone help me find a reliable algorithm to find these $\pm 2 \pi$ defects? (Most of the literature I've found relates to the 3D case, where $\pm 2 \pi$ defects are rarely even considered because they are unstable in 3-D anyway.)

  • $\begingroup$ There is a body of literature for this problem in finding the topological charge of optical vortices from measured interferograms and various algorithms for dealing with noisy interferograms. The optical vortex interferogram is, as far as I can see, isomorphic to your problem. Google "phase singularity interferogram" "optical vortex interferogram" and I'm sure you'll find something. $\endgroup$ Jun 19, 2016 at 12:18

1 Answer 1


The director (living on $\mathbb{R}P^1$ )is given only only modulo the interval$ [-\frac{\pi}{2}, \frac{\pi}{2} ]$ , however the winding number has to be computed on the universal covering space $\mathbb{R}$.

The same situation happens for $S^1$ parametrized by $[-\pi, \pi]$ but the winding angles can be arbitrary integer multiples of $2 \pi$. Thus in order to compute the winding numbers, we need use a smooth section in the universal covering bundle.

For $S^1$, this section is called "The unwrapping function"which is also the name of the algorithm. The atached file shows how to apply this function with Matlab examples.

A simple modification of the unwrapping algorithm can be used for $\mathbb{R}P^1$, one only needs to multiply the director by $2$, (in order to obtain a seemingly $S^1$ parameter), unwrap the results, then divide by $2$.

  • $\begingroup$ That looks pretty similar to what I'm already doing, as far as I can tell; ultimately it boils down to counting the number of $\pi$ jumps in the director phase (my method counts the accumulated phase factor, whereas the unpacking method is meant to eliminate the phase factor). Unfortunately in a 2x2 loop that only finds $\pm\pi$ defects. After some more thought, I suspect finding vortices is as easy as finding the phase jump on a 4x4 loop and making sure there are no $\pi$ defects in the loop's interior. Would that work? $\endgroup$ Jun 20, 2016 at 16:46
  • 1
    $\begingroup$ @Zombie Feynman Yes, this algorithm is equivalent to counting the $\pi$ jumps. I think that to be able to measure large winding numbers, the size of the loop should be increased in order to avoid undersampling which happens when the director' s angle jumps several times along a single edge of a plaquette. $\endgroup$ Jun 22, 2016 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.