chiark / gitweb /
poster-tube-lid: wip parametric integration, rework
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 20 Oct 2017 19:43:22 +0000 (20:43 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 20 Oct 2017 22:39:39 +0000 (23:39 +0100)
poster-tube-lid-parametric.scad.pl

index 9fa0b2e..a2fd3a7 100755 (executable)
@@ -74,10 +74,10 @@ sub point ($$$$) {
                     );
     } elsif ($ip =~ m/^ball[02]$/) {
        my $angle = $it * TAU/4;
-       $i_offset = V( -$lin_len -$sine_len
-                      -sin($angle) * $ballend_xr,
+       my $dx = sin($angle) * $ballend_xr;
+       $i_offset = V( -$lin_len -$sine_len - $dx,
                       0,
-                      +$sine_height
+                      +$sine_height + $dx * tan($sine_angle)
                     );
        $i_thickscale = cos($angle);
     } else {