프로그래밍/미분류
electrons on sphere
daewonyoon
2015. 11. 18. 14:19
반응형
E denoted by (theta, phi). rho is fixed as R. E in cartesian coord is R ( sin(theta) cos(phi), sin(theta) sin(phi), cos(theta) )
F on E[i] is SUM_(k!=i) X(E[i]-E[k])
----
class X3:
x, y, z
def __init__(self, x, y, z):
self.x, self.y, self.z = x, y, z
def plus(self, Y):
return X3(self.x + Y.x, self.y + Y.y, self.z + Y.z)
...
----
class E :
r = R
th = 0
ph = 0
v = X3(0, 0, 0)
def __init__(self, theta, phi):
self.th, self.ph = theta, phi
self.x, self.y, self.z = R*sin(self.th)*cos(self.ph), R*sin(self.th)*sin(self.ph), R*cos(self.th)
def update(self, t):
self = self + t * v
----
How to represent the N-gram in 2D.
Find outermost encloser of the points.
4면체로 나누기.
728x90