3 ms·
And in (quick and dirty) Python, with matplotlib: import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D f
by Anon84 7y ago
And in (quick and dirty) Python, with matplotlib:
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.gca(projection='3d')
theta = np.linspace(-4 * np.pi, 4 * np.pi, 100)
r = 4*np.pi+theta
z = -r
x = r * np.cos(theta)
y = r * np.sin(theta)
ax.plot(x, y, z, 'g*')
r2 = 4*np.pi+theta+np.pi/2
z2 = -r2+np.pi
x2 = r * np.cos(theta+np.pi/2)
y2 = r * np.sin(theta+np.pi/2)
ax.plot(x2, y2, z2, 'r*')
ax.scatter3D(0, 0, 5, color='gold', s=200, marker="d")
ax.axis('off')
:)
- jshprentz 7y agoAdd this line at the bottom to show the tree: plt.show()