#*****************************************************************************80 # ## corkscrew_plot3d makes a plot of a 3D curve that looks like a corkscrew. # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 01 September 2020 # # Author: # # John Burkardt # library ( 'plot3D' ) cat ( "\n" ) cat ( "corkscrew_plot3d:\n" ) cat ( " ", version$version.string, "\n" ) cat ( " Display a curve defined by points on a 3D curve.\n" ) # # Read the data. # filename = 'corkscrew_data.txt' xyz <- read.table ( file = filename, header = FALSE ) # filename = 'corkscrew_plot3d.png' png ( filename ) lines3D ( xyz[,1], xyz[,2], xyz[,3], theta = 60, phi = 30, main = "A 3D corkscrew curve", xlab = "<-- X(t) -->", ylab = "<-- Y(t) -->", zlab = "<-- Z(t) -->", col = "green" ) cat ( "\n" ) cat ( " Graphics saved as '", filename, "'\n" ) # # Terminate. # cat ( "\n" ) cat ( "corkscrew_plot3d:\n" ) cat ( " Normal end of execution.\n" ) quit ( )