chiark / gitweb /
poster-tube-lid: new shape, fix balls
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 20 Oct 2017 21:36:13 +0000 (22:36 +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 a6ffaf2..be5f17b 100755 (executable)
@@ -81,18 +81,18 @@ sub point ($$$$) {
        $i_j_y_angle = $sine_angle;
        my $angle = $it * TAU/4;
        my $dx = sin($angle) * $ballend_xr;
-       $i_offset = V( -$lin_len -$sine_len - $dx,
+       $i_offset = V( -$lin_len -$sine_len - $dx * cos($sine_angle),
                       0,
-                      +$sine_height
+                      +$sine_height + $dx * sin($sine_angle)
                     );
        $i_thickscale = cos($angle);
     } else {
        die "$ip ?";
     }
 
-    $i_j_y_vect = V( sin($i_j_y_angle),
-                    0,
-                    cos($i_j_y_angle ));
+    my $i_j_y_vect = V( sin($i_j_y_angle),
+                       0,
+                       cos($i_j_y_angle ));
 
     my $j_plus_th = $jp =~ m/2$/ ? $thick : 0;