displayDipoles_170409 > v0.1 > display dipole coordinates in 3D
GeForce GTX 1070 (8GB)
ASRock Z170M Pro4S [Intel Z170chipset]
Ubuntu 14.04 LTS desktop amd64
TensorFlow v0.11
cuDNN v5.1 for Linux
CUDA v8.0
Python 2.7.6
IPython 5.1.0 -- An enhanced Interactive Python.
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
GNU bash, version 4.3.8(1)-release (x86_64-pc-linux-gnu)
This article is related to ADDA (light scattering simulator based on the discrete dipole approximation) .
Required
iterative.c
coord.0
was produced with the following:$ ./adda -grid 25 -chp_type normal -chpoint 1s > log
코드 v0.1
Jupyter code
displayDipoles_170409.ipynb
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
import sys
from UtilReadCoordinate import read_coordinate_file
'''
v0.1 display dipoles in 3D
'''
res = read_coordinate_file('coord.0')
local_nvoid_Ndip, coord = res
print(local_nvoid_Ndip)
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
xs = coord[::3]
ys = coord[1::3]
zs = coord[2::3]
print(xs[1],ys[1],zs[1])
#sys.exit()
for c, m, zlow, zhigh in [('r', 'o', -10, 10)]:
ax.scatter(xs, ys, zs, c=c, marker=m)
ax.set_xlabel('X Label')
ax.set_ylabel('Y Label')
ax.set_zlabel('Z label')
plt.tight_layout()
plt.show()
Acknowledgement: @shiracamus in this
Reference
이 문제에 관하여(displayDipoles_170409 > v0.1 > display dipole coordinates in 3D), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/7of9/items/b487b71f784434460f60텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)