In [ ]:
import k3d
import math
import numpy as np
In [ ]:
a = 1.5
b = -1.8
c = 1.6
d = 0.9 

N = int(1e4)

points = np.zeros(N * 3, dtype=np.float32)
opacities = np.zeros(N, dtype=np.float32)

x = 0
y = 0
z = 0

for i in range(N):
    xn = math.sin(a * y) + c * math.cos(a * x)
    yn = math.sin(b * x) + d * math.cos(b * y)
    zn = math.sin(1.4 * (x + z))

    points[i * 3] = xn
    points[i * 3 + 1] = yn
    points[i * 3 + 2] = zn
    opacities[i] = math.sqrt(xn**2 + yn **2 + zn**2) / 2.0

    x = xn
    y = yn
    z = zn
In [ ]:
plot = k3d.plot(grid_visible=False)

attractor = k3d.points(points, shader='flat', point_size=0.025, opacities=opacities, color=0xff0000)
plot += attractor

plot.display()
In [ ]:
plot.camera = [1.2087724338464674,
 -3.925551046947802,
 3.0224265367721834,
 4.839897155761719e-05,
 -0.0013092756271362305,
 5.960464477539063e-08,
 -0.2389032891647861,
 0.49697458858090343,
 0.8342310691475641]
In [ ]: