本文整理汇总了Python中geometry.Geometry.addCircle方法的典型用法代码示例。如果您正苦于以下问题:Python Geometry.addCircle方法的具体用法?Python Geometry.addCircle怎么用?Python Geometry.addCircle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类geometry.Geometry
的用法示例。
在下文中一共展示了Geometry.addCircle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: configAnimation
# 需要导入模块: from geometry import Geometry [as 别名]
# 或者: from geometry.Geometry import addCircle [as 别名]
deltaTime_anim = 3
def configAnimation():
global collisionsPerRun, deltaTime_radius, deltaTime_anim
collisionsPerRun = 20
deltaTime_anim = 3
###########################################################################
###########################################################################
#Initialize the frontier geometry
radius = 0.3
geometry = Geometry()
#geometry.addCircle( (-0.5, 0.5), 0.25 )
#geometry.addCircle( ( 0.5, 0.5), 0.25 )
#geometry.addCircle( ( 0.5, -0.5), 0.25 )
#geometry.addCircle( (-0.5, -0.5), 0.25 )
geometry.addCircle( ( 0., 0.), radius )
geometry.addLine( (-0.5, 0), (-1, 0), type=1 ) #type: 1->Periodic, 0->Real
geometry.addLine( ( 0, 0.5), ( 0, 1), type=1 )
geometry.addLine( ( 0.5, 0), ( 1, 0), type=1 )
geometry.addLine( ( 0, -0.5), ( 0,-1), type=1 )
nCircles, circlesCaract_h, nLines, linesCaract_h = geometry.prepareCUDA( cudaP=cudaP )
if usingAnimation:
pAnim.nPoints = nParticles
pAnim.viewXmin, pAnim.viewXmax = -2500., 2500.
pAnim.viewYmin, pAnim.viewYmax = -2500., 2500.
pAnim.viewZmin, pAnim.viewZmax = -1, 1
pAnim.showGrid = True
pAnim.nPointsPerCircle = 50
pAnim.cirPos, pAnim.cirCol, pAnim.nCirclesGrid = geometry.circlesGrid( radius, -30., 30., -20., 20., nPoints=pAnim.nPointsPerCircle)