use Data::Dumper;
use constant tau => pi*2;
-print <<END;
-// -*- C -*-
-// *** AUTOGENERATED - DO NOT EDIT ***
-END
-
my $ellipse = 20;
my $circle = 6;
my $channel = 5;
my $M = 20; # around each circle
my @channeldistprops = (0, 1/3, 2/3);
+print <<END;
+// -*- C -*-
+// *** AUTOGENERATED - DO NOT EDIT ***
+END
+
+print "torusyup = ", ($circle / sqrt(2)), ";\n";
+
our @ellipse = map {
my $theta = tau * $_ / $N;
V( cos($theta) * $ellipse * $xscale, sin($theta) * $ellipse, 0 )
STDOUT->flush or die $!;
__DATA__
-Torusy();
-Channels();
+module Stand(){
+ difference(){
+ translate([0,0,torusyup])
+ Torusy();
+ Channels();
+ translate([-200,-200,-50])
+ cube([400,400,50]);
+ }
+}
+Stand();