0

I am writing my thesis on the toric code with Overleaf, and for that I would like to draw:

  1. a figure of the lattice with an example of the plaquette and vertice operators
  2. a figure of the lattice with an example of the string operators
  3. a figure of the torus with the grid drawn on the surface of the torus

I've been doing some research and this How to plot a lattice of points on the surface of a torus? question has been very helpful for figure 3), yet I don't know how to change the arrows on the surface for lines to create the grid. I copy the code and the difference I would like to make:

\documentclass[twocolumn]{revtex4}
\usepackage[inline]{asymptote}
\begin{document}
\begin{figure}[h]
\centering
\begin{asy}[width=5cm,height=5cm]
size(200);
import graph3;

pen surfPen=rgb(1,0.7,0); pen xarcPen=deepblue+0.7bp; pen yarcPen=deepred+0.7bp;

currentprojection=perspective(5,4,4);

real R=2; real a=1;

triple fs(pair t) { return ((R+aCos(t.y))Cos(t.x),(R+aCos(t.y))Sin(t.x),a*Sin(t.y)); }

surface s=surface(fs,(0,0),(360,360),8,8,Spline); draw(s,surfPen,render(compression=Low,merge=true));

int m=20; int n=10; real arcFactor=0.85;

pair p,q;

for(int i=1;i<=n;++i){ for(int j=0;j<m;++j){ p=(j360/m,(i%n)360/n); q=(((j+arcFactor)%m)360/m,i360/n); draw(fs(p)..fs((p+q)/2)..fs(q),xarcPen,Arrow3(size=4)); q=(j360/m,((i%n)-arcFactor)360/n); draw(fs(p)..fs((p+q)/2)..fs(q),yarcPen,Arrow3(size=3)); dot(fs(p)); } } \end{asy} \end{figure} \end{document}

So really I just want to change "Arrow3" by some command that changes the arrows for lines.

Regarding figure 1) and 2), and for those not familiar with the toric code, this picture from article https://www.physics.rutgers.edu/grad/602/Lectures/JC_Presentations/0419/Intro_Toric_Code.pdf is a perfect example:enter image description here

So a figure like this would be great (although obviously I don't want to copy it).

I don't mind if it's done with tikz, asymptote or any other application that might be useful. Any help or documentation that could be helpful? Thanks a lot.

MarcPN
  • 1
  • Welcome :) // I suggest having a look at https://www.ctan.org/pkg/pgf , the Minimal introduction to TikZ , which will give your the basics. After that use the bigger document to go for details. // I suggest that you add your trials here, using the Edit button, which will make it easier for us to give better guidance. // Also have a look at the links to the right, under Related. – MS-SPO May 09 '22 at 14:10
  • Welcome to TeX.SX. Questions of the form "please do this for me" are rarely answered on this site. Show us what you've done do far and then make your request more specific. Be sure to provide a "Minimal Working Example" (MWE) that starts with \documentclass, includes all relevant \usepackage commands, ends with \end{document} and compiles without errors, even if it does not produce your desired output. – Sandy G May 09 '22 at 14:10
  • @SandyG Thanks for the advise. I've updated the question and added the code I have for figure 3). Would appreciate if someone can take a look :) Will update with code of fig 1) and 2) when I have something more developed. – MarcPN May 10 '22 at 12:28

0 Answers0