Horje
fibonacci sphere python Code Example
fibonacci sphere python
from numpy import pi, cos, sin, arccos, arange
import mpl_toolkits.mplot3d
import matplotlib.pyplot as pp

num_pts = 1000
indices = arange(0, num_pts, dtype=float) + 0.5

phi = arccos(1 - 2*indices/num_pts)
theta = pi * (1 + 5**0.5) * indices

x, y, z = cos(theta) * sin(phi), sin(theta) * sin(phi), cos(phi);

pp.figure().add_subplot(111, projection='3d').scatter(x, y, z);
pp.show()




Whatever

Related
setting up appium locally Code Example setting up appium locally Code Example
remove duplicate item on a list Code Example remove duplicate item on a list Code Example
random.randint not working 'bool' object has no attribute 'randint' Code Example random.randint not working 'bool' object has no attribute 'randint' Code Example
onstoken oog pus Code Example onstoken oog pus Code Example
pizzaprice Code Example pizzaprice Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7