lib/frameworkCreation.py
def createChannel(widthChannel, lengthChannel, heightChannel, slopeChannel):
	"""Creates a channel and returns [idBottom, idLeftWall, idRightWall], the ids of the objects created in O.bodies
	
	Parameters:
	- widthChannel  -- width of the channel.
	- lengthChannel -- length of the channel.
	- heightChannel -- height of the channel.
	- slopeChannel  -- slope of the channel.
	
	"""
	# Create planes with boxes :
	
	## Create the bottom plane of the channel
	bottomPlane = box(center = (-lengthChannel * cos(slopeChannel)/2, widthChannel/2, lengthChannel/2 * sin(slopeChannel)), extents = (lengthChannel/2,widthChannel/2,0), orientation = ((0, 1, 0), slopeChannel), fixed = True, wire = False, color = (0.5,0.5,0.5), material = 'Mat')
	
	leftPlane = box(center = (-lengthChannel * cos(slopeChannel)/2 + heightChannel/2 * sin(slopeChannel), 0, lengthChannel/2 * sin(slopeChannel) + heightChannel/2 * cos(slopeChannel)), extents = (lengthChannel/2, 0, heightChannel/2), orientation = ((0, 1, 0), slopeChannel), fixed = True, wire = True, color = (0.3,0.3,0.3), material = 'Mat')
	
	rightPlane = box(center = (-lengthChannel * cos(slopeChannel)/2 + heightChannel/2 * sin(slopeChannel), widthChannel, lengthChannel/2 * sin(slopeChannel) + heightChannel/2 * cos(slopeChannel)), extents = (lengthChannel/2, 0, heightChannel/2), orientation = ((0, 1, 0), slopeChannel), fixed = True, wire = False, color = (0.3,0.3,0.3), material = 'Mat')
	
	## Add the planes to the simulation
	return O.bodies.append([bottomPlane, leftPlane, rightPlane])
Creates a channel and returns [idBottom, idLeftWall, idRightWall], the ids of the objects created in O.bodies
	
	Parameters:
	- widthChannel  -- width of the channel.
	- lengthChannel -- length of the channel.
	- heightChannel -- height of the channel.
	- slopeChannel  -- slope of the channel.
	
	
Creates a channel and returns [idBottom, idLeftWall, idRightWall], the ids of the objects created in O.bodies
Parameters:
widthChannel  -- width of the channel.
lengthChannel -- length of the channel.
heightChannel -- height of the channel.
slopeChannel  -- slope of the channel.
Creates a channel and returns [ idBottom idLeftWall idRightWall ] the ids of the objects created in O . bodies Parameters : widthChannel -- width of the channel . lengthChannel -- length of the channel . heightChannel -- height of the channel . slopeChannel -- slope of the channel .
def createChannel(widthChannel, lengthChannel, heightChannel, slopeChannel):
	bottomPlane = box(center = (-lengthChannel * cos(slopeChannel)/2, widthChannel/2, lengthChannel/2 * sin(slopeChannel)), extents = (lengthChannel/2,widthChannel/2,0), orientation = ((0, 1, 0), slopeChannel), fixed = True, wire = False, color = (0.5,0.5,0.5), material = 'Mat')
	leftPlane = box(center = (-lengthChannel * cos(slopeChannel)/2 + heightChannel/2 * sin(slopeChannel), 0, lengthChannel/2 * sin(slopeChannel) + heightChannel/2 * cos(slopeChannel)), extents = (lengthChannel/2, 0, heightChannel/2), orientation = ((0, 1, 0), slopeChannel), fixed = True, wire = True, color = (0.3,0.3,0.3), material = 'Mat')
	rightPlane = box(center = (-lengthChannel * cos(slopeChannel)/2 + heightChannel/2 * sin(slopeChannel), widthChannel, lengthChannel/2 * sin(slopeChannel) + heightChannel/2 * cos(slopeChannel)), extents = (lengthChannel/2, 0, heightChannel/2), orientation = ((0, 1, 0), slopeChannel), fixed = True, wire = False, color = (0.3,0.3,0.3), material = 'Mat')
	return O.bodies.append([bottomPlane, leftPlane, rightPlane])
def createChannel ( widthChannel , lengthChannel , heightChannel , slopeChannel ) : bottomPlane = box ( center = ( - lengthChannel * cos ( slopeChannel ) / 2 , widthChannel / 2 , lengthChannel / 2 * sin ( slopeChannel ) ) , extents = ( lengthChannel / 2 , widthChannel / 2 , 0 ) , orientation = ( ( 0 , 1 , 0 ) , slopeChannel ) , fixed = True , wire = False , color = ( 0.5 , 0.5 , 0.5 ) , material = 'Mat' ) leftPlane = box ( center = ( - lengthChannel * cos ( slopeChannel ) / 2 + heightChannel / 2 * sin ( slopeChannel ) , 0 , lengthChannel / 2 * sin ( slopeChannel ) + heightChannel / 2 * cos ( slopeChannel ) ) , extents = ( lengthChannel / 2 , 0 , heightChannel / 2 ) , orientation = ( ( 0 , 1 , 0 ) , slopeChannel ) , fixed = True , wire = True , color = ( 0.3 , 0.3 , 0.3 ) , material = 'Mat' ) rightPlane = box ( center = ( - lengthChannel * cos ( slopeChannel ) / 2 + heightChannel / 2 * sin ( slopeChannel ) , widthChannel , lengthChannel / 2 * sin ( slopeChannel ) + heightChannel / 2 * cos ( slopeChannel ) ) , extents = ( lengthChannel / 2 , 0 , heightChannel / 2 ) , orientation = ( ( 0 , 1 , 0 ) , slopeChannel ) , fixed = True , wire = False , color = ( 0.3 , 0.3 , 0.3 ) , material = 'Mat' ) return O . bodies . append ( [ bottomPlane , leftPlane , rightPlane ] )
Creates a channel and returns [idBottom, idLeftWall, idRightWall], the ids of the objects created in O.bodies
Parameters:
 widthChannel  -- width of the channel.
Creates a channel and returns [ idBottom idLeftWall idRightWall ] the ids of the objects created in O . bodies Parameters : widthChannel -- width of the channel .
"""Creates a channel and returns [idBottom, idLeftWall, idRightWall], the ids of the objects created in O.bodies
	
	Parameters:
	- widthChannel  -- width of the channel.
	- lengthChannel -- length of the channel.
	- heightChannel -- height of the channel.
	- slopeChannel  -- slope of the channel.
	
	""" # Create planes with boxes : ## Create the bottom plane of the channel ## Add the planes to the simulation
widthChannel
lengthChannel
heightChannel
slopeChannel