I am trying to draw an interlocking tori like this one:
For this I have been looking for the web for similar images and then have tried to modify the code. So far I got to this:
def torus {
def n_segs 60
sweep [draw=none, fill=cyan, fill opacity=0.75] {n_segs, rotate(360/n_segs, (0,0,0), [0,1,0])}
sweep {n_segs, rotate(360/n_segs, (1.5,0,0), [0,0,1])}
(2,0,0)
}
def torus2 {
def n_segs 60
sweep [draw=none, fill=orange, fill opacity=0.75] {n_segs, rotate(360/n_segs, (1.5,0,0), [0,0,1]) }
sweep {n_segs, rotate(360/n_segs, (0,0,0), [0,1,0])}
(2,0,0)
}
put { view((10,4,2)) } {{torus2} {torus}}
global { language tikz }
Here torus
was the original piece of code, and I wrote torus2
mimicking the original code. However I got this ugly thing:
I would like to request assistance fixing torus2
so the complete image look like the first one. The orientation of the tori, their colors and those things are not meaningful at this moment.