コード例 #1
0
 def random(corners=[-1,-1,1,1]):
     """Return a random material segment within the given corners."""
     return MaterialSegment([MaterialPoint.random(corners) for i in range(2)])
コード例 #2
0
 def random(corners=[-1,-1,1,1],number=5):
     """Create a random material form."""
     points=[MaterialPoint.random(min,max) for n in range(number)]
     return MaterialForm(points)