本文整理汇总了Python中geometry.Geometry.circlesGrid方法的典型用法代码示例。如果您正苦于以下问题:Python Geometry.circlesGrid方法的具体用法?Python Geometry.circlesGrid怎么用?Python Geometry.circlesGrid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类geometry.Geometry
的用法示例。
在下文中一共展示了Geometry.circlesGrid方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: configAnimation
# 需要导入模块: from geometry import Geometry [as 别名]
# 或者: from geometry.Geometry import circlesGrid [as 别名]
#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)
###########################################################################
###########################################################################
#Initialize and select CUDA device
if usingAnimation:
pAnim.initGL()
pAnim.CUDA_initialized = True
configAnimation()
cudaDev = setCudaDevice( devN = devN, usingAnimation = usingAnimation )
#Read and compile CUDA code
print "\nCompiling CUDA code\n"
codeFiles = [ "vector2D.h", "circle.h", "line.h", "cudaBillar.cu"]
for fileName in codeFiles:
codeString = open(fileName, "r").read().replace("cudaP", cudaP)