Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 firstPoint = []
00032 firstPoint.append(int(raw_input("Enter starting (S) value ==> ")))
00033 firstPoint.append(int(raw_input("Enter starting (L) value ==> ")))
00034 firstPoint.append(int(raw_input("Enter starting (U) value ==> ")))
00035 firstPoint.append(int(raw_input("Enter starting (R) value ==> ")))
00036 firstPoint.append(int(raw_input("Enter starting (B) value ==> ")))
00037 firstPoint.append(int(raw_input("Enter starting (T) value ==> ")))
00038 firstPoint.append(int(raw_input("Enter starting (E) value ==> ")))
00039 firstPoint.append(int(raw_input("Enter starting (8th axis) value ==> ")))
00040
00041 inc = []
00042 inc.append(int(raw_input("Enter (S) increment ==> ")))
00043 inc.append(int(raw_input("Enter (L) increment ==> ")))
00044 inc.append(int(raw_input("Enter (U) increment ==> ")))
00045 inc.append(int(raw_input("Enter (R) increment ==> ")))
00046 inc.append(int(raw_input("Enter (B) increment ==> ")))
00047 inc.append(int(raw_input("Enter (T) increment ==> ")))
00048 inc.append(int(raw_input("Enter (E) increment ==> ")))
00049 inc.append(int(raw_input("Enter (8th axis) increment ==> ")))
00050
00051 numPoints = int(raw_input("Enter number of points ==> "))
00052
00053 filename = "trajectory.txt"
00054 f = open(filename, 'w')
00055
00056 for i in range(numPoints):
00057 line = ""
00058 line += "{"
00059 if i == 0:
00060 line += "{"
00061 for j in range(7):
00062 line += str(firstPoint[j]+inc[j]
00063 line += ", "
00064 line += str(firstPoint[7]+inc[7]
00065 if i == (numPoints-1):
00066 line += "}};"
00067 else:
00068 line += "},"
00069
00070 f.write(line)
00071 if i != (numPoints-1):
00072 f.write("\n")
00073 f.close()
00074 print "Trajectory written to",filename
00075
00076
00077
00078