my $ballend_xr = $thick/2;
-my @i_sections = qw(ball0 6
+my @i_sections = qw(ball0 -6
sine0 -10
lin0 2
circle 20
lin1 2
sine1 10
- lin2 2
+ lin2 -2
ball2 6
-
);
-
curveE 20
-
- curve2 10
+ curve2 -10
-
);
my $i_thickscale = 1.0;
if ($ip =~ m/^lin[01]$/) {
- $i_offset = V( -$lin_len * ($ip =~ m/1/ ? $it : 1-$it),
+ $i_offset = V( -$lin_len * $it,
0,
0 );
} elsif ($ip =~ m/^circle$/) {
$sine_height * ( 0.5 - 0.5*cos( $it*TAU/2 ) )
);
} elsif ($ip =~ m/^ball[02]$/) {
- my $angle = ($ip =~ m/0/ ? (1-$it) : $it) * TAU/4;
+ my $angle = $it * TAU/4;
$i_offset = V( -$lin_len -$sine_len
-($ip =~ m/2/ ? $lin2_len : 0)
-sin($angle) * $ballend_xr,
$j_x = $j_p_x + $i_thick/2 * cos($angle);
$j_y = $j_p_y + $i_thick/2 * sin($angle);
} elsif ($jp =~ m/^curve[12]$/) {
- my $angle = $slope_angle * ($jp =~ m/1/ ? $jt : (1-$jt));
+ my $angle = $slope_angle * $jt;
my $outwards = $jp =~ m/1/ ? -1 : +1;
$j_x = $j_qrc_x + cos($angle) * ($jcurverad + $outwards * $i_thick/2);
$j_y = $j_qrc_y - sin($angle) * ($jcurverad + $outwards * $i_thick/2);