Skip to content

Instantly share code, notes, and snippets.

@raihanba13
Last active July 29, 2023 12:43
Show Gist options
  • Save raihanba13/bad1cc0064d7f4c0f75a2a0a3cb45ec4 to your computer and use it in GitHub Desktop.
Save raihanba13/bad1cc0064d7f4c0f75a2a0a3cb45ec4 to your computer and use it in GitHub Desktop.
phi = np.linspace(0, 1 / 2 * np.pi, 16)
fiber_bundle_trj = 200 * np.array([np.cos(phi), np.sin(phi), 0 * phi]).T
population = fastpli.model.sandbox.seeds.triangular_circle(20, 5)
fiber_radii = np.random.uniform(2.0, 10.0, population.shape[0])
fiber_bundle = fastpli.model.sandbox.build.bundle(fiber_bundle_trj, population, fiber_radii)
t = np.linspace(0, 4 * np.pi, 50, True)
traj = np.array((42 * np.cos(t), 42 * np.sin(t), 10 * t)).T
# Snake shape trajectory equation
freq_x = 2 # Frequency of oscillation along x-axis
freq_y = 4 # Frequency of oscillation along y-axis
amp_x = 42 # Amplitude along x-axis
amp_y = 20 # Amplitude along y-axis
amp_z = 10 # Amplitude along z-axis
traj = np.array((amp_x * np.cos(freq_x * t), amp_y * np.sin(freq_y * t), amp_z * t)).T
t = np.linspace(0, 4 * np.pi, 100, True)
# Snake shape trajectory equation (one-dimensional snake)
freq = 2 # Frequency of oscillation
amplitude = 10 # Amplitude of the snake shape
traj = np.array((amplitude * np.cos(freq * t), amplitude * np.sin(freq * t), t)).T
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment