#*****************************************************************************80 # ## cbezier_test tests cbezier. # # Licensing: # # Copyright 2016 James P. Howard, II # # The computer code and data files on this web page are distributed under # https://opensource.org/licenses/BSD-2-Clause, the BSD-2-Clause license. # # Modified: # # 24 February 2020 # # Author: # # John Burkardt # cat ( date ( ), "\n" ) cat ( "\n" ) cat ( "cbezier_test\n" ) cat ( " ", version$version.string, "\n" ) cat ( " cbezier computes a cubic Bezier curve." ) source ( "/home/burkardt/public_html/r_src/cbezier/cbezier.R" ) cat ( "\n" ) x <- c ( -1, 0, 1, -2 ) cat ( "\n" ) cat ( " x:\n" ) cat ( "\n" ); print ( x ) y <- c ( -2, -1, 2, -1 ) cat ( "\n" ) cat ( " y:\n" ) cat ( "\n" ); print ( y ) t = seq ( 0, 1, 1/5 ) cat ( "\n" ) cat ( " t:\n" ) cat ( "\n" ); print ( t ) xy <- cbezier ( x, y, t ) cat ( "\n" ) cat ( " xbezier\n" ) cat ( "\n" ) print ( xy$x ) cat ( "\n" ) cat ( " ybezier\n" ) cat ( "\n" ) print ( xy$y ) # # Terminate. # cat ( "\n" ) cat ( "cbezier_test\n" ) cat ( " Normal end of execution.\n" ) cat ( date ( ), "\n" ) quit ( )