# Note about visualization: The axes are color-coded
# blue = x
# cyan = x'
# white = x"
import visual # We include this module to display the ribbons with curve() and to draw axes ( arrow(), sphere() )
import math # We include this module on the chance that the differential equation expression will need its functions,
# but nothing in the main code needs "math"
# The discreteInterval class is a vestigial class: it serves no purpose whatsoever.
# This is basically an "improved" range() function. It holds a list of floats on an interval.
# resolution is the number of spaces between floats, so the number of floats in the list is usually resolution + 1
class discreteInterval:
def __init__(self,minimum,upperBound,resolution):
if upperBound= 2:
strandwidth = tupleDistance(startPositions[1],startPositions[0])
else:
strandwidth = 1
ribbon.append(strand(p,x3,strandwidth*STRAND_WIDTH_FRACTION,RIBBON_COLOR))
oldp = p
for p in startPositions[1:]:
strandwidth = tupleDistance(oldp,p)
ribbon.append(strand(p,x3,strandwidth*STRAND_WIDTH_FRACTION,RIBBON_COLOR))
oldp = p
## Main Loop
t = 0
dt = TIME_CHANGE
while t