From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- graphics/sketch/Data/2tori.sk | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 graphics/sketch/Data/2tori.sk (limited to 'graphics/sketch/Data/2tori.sk') diff --git a/graphics/sketch/Data/2tori.sk b/graphics/sketch/Data/2tori.sk new file mode 100644 index 0000000000..d5ca168163 --- /dev/null +++ b/graphics/sketch/Data/2tori.sk @@ -0,0 +1,35 @@ +# origin +def O (0,0,0) +def s1 [fillcolor=red] +def s2 [linewidth=.2pt,linestyle=dotted] + +def sweeptorus { + def N 80 + put { translate([1,0,0]) } { + sweep[s1,s2]{N, rotate(360/N, (-1,0,0), [0,1,0]) } { + line(0,-1,0)(1,-1,0)(1,1,0)(0,1,0)(0,-1,0) + } + } +} + +def tori { + put { translate([-2.2,0,0]) } {sweeptorus} + put { rotate(-30, (O), [0,0,1]) then translate([2.2,.5,0]) } {sweeptorus} +} + +def sceneProjection { + + put { rotate(20, (O), [0,0,1]) then + rotate(30, (O), [1,0,0]) then + translate([0,0,-10]) then + perspective(7) } {tori} +} + +{sceneProjection} + +global { + language tikz,context + set [linewidth=.1pt] + picturebox (-2,-2)(2,2) + frame +} -- cgit v1.2.3