I am trying to create the graph of some interlocking tori like these two
Since I am not an expert on tikz or sketch, I have been modifying some code I found on the web. So here's the code I have been running so far:
Code: Select all
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 }
So my question would be: how can I redefine torus2 so the whole image looks like the one I want?