torus.sketch 276 B

1234567891011
  1. def torus {
  2. def n_segs 40
  3. sweep [draw=black, fill=lightgray, fill opacity=0.75] {n_segs, rotate(360/n_segs, (0,0,0), [0,1,0])}
  4. sweep {n_segs, rotate(360/n_segs, (1.5,0,0), [0,0,1])}
  5. (2,0,0)
  6. }
  7. put { view((10,4,2)) } {{torus}}
  8. global { language tikz }