our @path;
sub reset_path { @path = () }
-sub curve {
-
- push @path, lading_points( $path[-2], $path[-1] ) if $#path > 1;
+sub curve_catmull_rom {
if ( $#path < ( 4 * 2 - 1 ) ) { # less than 4 points
warn "path too short ", dump @path;
reset_path;
}
+sub curve {
+ # add landing path points
+ push @path, lading_points( $path[-2], $path[-1] ) if $#path > 1;
+
+ if ( 1 ) {
+ curve_catmull_rom;
+ } else {
+
+ }
+
+}
+
sub clear_screen {
my ( $mask ) = @_;
reset_path;
} elsif ( $type == SDL_MOUSEBUTTONUP() ) {
debug 'mouse up', $event->button_x, $event->button_y;
$mouse_down = 0;
-
curve;
} elsif ( $type == SDL_QUIT() ) {
exit;