logic-lab 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- logic_lab/__init__.py +16 -0
- logic_lab/audio_sync/__init__.py +5 -0
- logic_lab/audio_sync/audio_reactive_particles/README.md +11 -0
- logic_lab/audio_sync/audio_reactive_particles/__init__.py +17 -0
- logic_lab/audio_sync/audio_reactive_particles/audio_reactive_particles.py +407 -0
- logic_lab/audio_sync/audio_reactive_particles/example.py +86 -0
- logic_lab/biological/__init__.py +1 -0
- logic_lab/biological/ant_colony/README.md +11 -0
- logic_lab/biological/ant_colony/ant_colony.py +97 -0
- logic_lab/biological/dla/README.md +11 -0
- logic_lab/biological/dla/__init__.py +0 -0
- logic_lab/biological/dla/dla.py +201 -0
- logic_lab/biological/mycelium_growth/README.md +11 -0
- logic_lab/biological/mycelium_growth/mycelium_growth.py +74 -0
- logic_lab/biological/physarum/README.md +11 -0
- logic_lab/biological/physarum/physarum.py +141 -0
- logic_lab/biological/predator_prey_dynamics/__init__.py +0 -0
- logic_lab/biological/predator_prey_dynamics/predator_prey_dynamics.py +173 -0
- logic_lab/biological/space_colonization/README.md +11 -0
- logic_lab/biological/space_colonization/__init__.py +0 -0
- logic_lab/biological/space_colonization/space_colonization.py +228 -0
- logic_lab/cellular_automata/__init__.py +0 -0
- logic_lab/cellular_automata/brian_brain/README.md +11 -0
- logic_lab/cellular_automata/brian_brain/brian_brain.py +68 -0
- logic_lab/cellular_automata/ca_1dim/README.md +9 -0
- logic_lab/cellular_automata/ca_1dim/ca_1dim.py +67 -0
- logic_lab/cellular_automata/ca_2dim/README.md +9 -0
- logic_lab/cellular_automata/ca_2dim/ca_2dim.py +76 -0
- logic_lab/cellular_automata/cyclic_ca/README.md +11 -0
- logic_lab/cellular_automata/cyclic_ca/cyclic_ca.py +67 -0
- logic_lab/cellular_automata/elementary_ca/README.md +9 -0
- logic_lab/cellular_automata/elementary_ca/elementary_ca.py +70 -0
- logic_lab/cellular_automata/game_of_life/__init__.py +0 -0
- logic_lab/cellular_automata/game_of_life/game_of_life.py +171 -0
- logic_lab/cellular_automata/hex_lattice_ca/README.md +9 -0
- logic_lab/cellular_automata/hex_lattice_ca/hex_lattice_ca.py +99 -0
- logic_lab/cellular_automata/langtons_ant/README.md +11 -0
- logic_lab/cellular_automata/langtons_ant/__init__.py +0 -0
- logic_lab/cellular_automata/langtons_ant/langtons_ant.py +207 -0
- logic_lab/cellular_automata/mod_pascal/README.md +9 -0
- logic_lab/cellular_automata/mod_pascal/mod_pascal.py +60 -0
- logic_lab/cellular_automata/moss_colony_growth/README.md +15 -0
- logic_lab/cellular_automata/moss_colony_growth/moss_colony_growth.py +130 -0
- logic_lab/cellular_automata/pascal/README.md +9 -0
- logic_lab/cellular_automata/pascal/pascal.py +49 -0
- logic_lab/cellular_automata/rule_variations/README.md +11 -0
- logic_lab/cellular_automata/rule_variations/rule_variations.py +58 -0
- logic_lab/cellular_automata/smooth_life/README.md +11 -0
- logic_lab/cellular_automata/smooth_life/smooth_life.py +64 -0
- logic_lab/cellular_automata/stochastic_ca/README.md +9 -0
- logic_lab/cellular_automata/stochastic_ca/stochastic_ca.py +68 -0
- logic_lab/chaos_theory/__init__.py +0 -0
- logic_lab/chaos_theory/chua_circuit/__init__.py +0 -0
- logic_lab/chaos_theory/chua_circuit/chua_circuit.py +212 -0
- logic_lab/chaos_theory/double_pendulum/__init__.py +0 -0
- logic_lab/chaos_theory/double_pendulum/double_pendulum.py +218 -0
- logic_lab/chaos_theory/henon_map/__init__.py +0 -0
- logic_lab/chaos_theory/henon_map/henon_map.py +185 -0
- logic_lab/chaos_theory/logistic_map/__init__.py +0 -0
- logic_lab/chaos_theory/logistic_map/logistic_map.py +348 -0
- logic_lab/chaos_theory/lorenz_attractor/__init__.py +0 -0
- logic_lab/chaos_theory/lorenz_attractor/lorenz_attractor.py +211 -0
- logic_lab/chaos_theory/rossler_attractor/__init__.py +0 -0
- logic_lab/chaos_theory/rossler_attractor/rossler_attractor.py +211 -0
- logic_lab/crystal_growth/__init__.py +0 -0
- logic_lab/crystal_growth/crystal_solidification/__init__.py +0 -0
- logic_lab/crystal_growth/crystal_solidification/crystal_solidification.py +231 -0
- logic_lab/crystal_growth/dla_cluster/__init__.py +0 -0
- logic_lab/crystal_growth/dla_cluster/dla_cluster.py +200 -0
- logic_lab/crystal_growth/snowflake_growth/__init__.py +0 -0
- logic_lab/crystal_growth/snowflake_growth/snowflake_growth.py +203 -0
- logic_lab/fractals/botanical_l_system/README.md +22 -0
- logic_lab/fractals/botanical_l_system/botanical_l_system.py +186 -0
- logic_lab/fractals/branch_objects_animation/README.md +10 -0
- logic_lab/fractals/branch_objects_animation/__init__.py +0 -0
- logic_lab/fractals/branch_objects_animation/branch_objects_animation.py +105 -0
- logic_lab/fractals/branch_thickness/README.md +10 -0
- logic_lab/fractals/branch_thickness/__init__.py +0 -0
- logic_lab/fractals/branch_thickness/branch_thickness.py +57 -0
- logic_lab/fractals/burning_ship/README.md +11 -0
- logic_lab/fractals/burning_ship/burning_ship.py +46 -0
- logic_lab/fractals/cantor_set/README.md +11 -0
- logic_lab/fractals/cantor_set/__init__.py +0 -0
- logic_lab/fractals/cantor_set/cantor_set.py +40 -0
- logic_lab/fractals/differential_growth/README.md +15 -0
- logic_lab/fractals/differential_growth/differential_growth.py +143 -0
- logic_lab/fractals/dla/README.md +11 -0
- logic_lab/fractals/dla/dla.py +133 -0
- logic_lab/fractals/elementary_wolfram_ca/README.md +9 -0
- logic_lab/fractals/elementary_wolfram_ca/__init__.py +0 -0
- logic_lab/fractals/elementary_wolfram_ca/elementary_wolfram_ca.py +57 -0
- logic_lab/fractals/fractal_lines/README.md +9 -0
- logic_lab/fractals/fractal_lines/__init__.py +0 -0
- logic_lab/fractals/fractal_lines/fractal_lines.py +38 -0
- logic_lab/fractals/game_of_life/README.md +9 -0
- logic_lab/fractals/game_of_life/__init__.py +0 -0
- logic_lab/fractals/game_of_life/game_of_life.py +66 -0
- logic_lab/fractals/game_of_life_oop/README.md +9 -0
- logic_lab/fractals/game_of_life_oop/__init__.py +0 -0
- logic_lab/fractals/game_of_life_oop/game_of_life_oop.py +84 -0
- logic_lab/fractals/hexagon_ca/README.md +9 -0
- logic_lab/fractals/hexagon_ca/__init__.py +0 -0
- logic_lab/fractals/hexagon_ca/hexagon_ca.py +67 -0
- logic_lab/fractals/hilbert_curve/README.md +11 -0
- logic_lab/fractals/hilbert_curve/hilbert_curve.py +53 -0
- logic_lab/fractals/ifs_fractal/__init__.py +0 -0
- logic_lab/fractals/ifs_fractal/ifs_fractal.py +223 -0
- logic_lab/fractals/julia_set/README.md +11 -0
- logic_lab/fractals/julia_set/__init__.py +0 -0
- logic_lab/fractals/julia_set/julia_set.py +197 -0
- logic_lab/fractals/koch_curve/README.md +9 -0
- logic_lab/fractals/koch_curve/__init__.py +0 -0
- logic_lab/fractals/koch_curve/koch_curve.py +69 -0
- logic_lab/fractals/koch_deformation/README.md +9 -0
- logic_lab/fractals/koch_deformation/koch_deformation.py +43 -0
- logic_lab/fractals/koch_snowflake/README.md +10 -0
- logic_lab/fractals/koch_snowflake/__init__.py +0 -0
- logic_lab/fractals/koch_snowflake/koch_snowflake.py +112 -0
- logic_lab/fractals/l_system/README.md +9 -0
- logic_lab/fractals/l_system/__init__.py +0 -0
- logic_lab/fractals/l_system/l_system.py +71 -0
- logic_lab/fractals/l_system_string_only/README.md +9 -0
- logic_lab/fractals/l_system_string_only/__init__.py +0 -0
- logic_lab/fractals/l_system_string_only/l_system_string_only.py +45 -0
- logic_lab/fractals/leaf_venation/README.md +16 -0
- logic_lab/fractals/leaf_venation/leaf_venation.py +189 -0
- logic_lab/fractals/mandelbrot_set/README.md +11 -0
- logic_lab/fractals/mandelbrot_set/mandelbrot_set.py +45 -0
- logic_lab/fractals/newton_basins/__init__.py +0 -0
- logic_lab/fractals/newton_basins/newton_basins.py +226 -0
- logic_lab/fractals/quadtree_part_1/README.md +8 -0
- logic_lab/fractals/quadtree_part_1/__init__.py +0 -0
- logic_lab/fractals/quadtree_part_1/quadtree_part_1.py +143 -0
- logic_lab/fractals/recursion/README.md +9 -0
- logic_lab/fractals/recursion/__init__.py +0 -0
- logic_lab/fractals/recursion/recursion.py +32 -0
- logic_lab/fractals/recursion_2/README.md +9 -0
- logic_lab/fractals/recursion_2/__init__.py +0 -0
- logic_lab/fractals/recursion_2/recursion_2.py +34 -0
- logic_lab/fractals/recursion_circles/README.md +9 -0
- logic_lab/fractals/recursion_circles/__init__.py +0 -0
- logic_lab/fractals/recursion_circles/recursion_circles.py +35 -0
- logic_lab/fractals/space_colonization/README.md +40 -0
- logic_lab/fractals/space_colonization/space_colonization.py +202 -0
- logic_lab/fractals/stochastic_tree/README.md +9 -0
- logic_lab/fractals/stochastic_tree/__init__.py +0 -0
- logic_lab/fractals/stochastic_tree/stochastic_tree.py +44 -0
- logic_lab/fractals/substrate/README.md +11 -0
- logic_lab/fractals/substrate/substrate.py +109 -0
- logic_lab/fractals/tree/README.md +9 -0
- logic_lab/fractals/tree/__init__.py +0 -0
- logic_lab/fractals/tree/tree.py +46 -0
- logic_lab/genetic_algorithms/evolving_bloops/README.md +39 -0
- logic_lab/genetic_algorithms/evolving_bloops/evolving_bloops.py +183 -0
- logic_lab/genetic_algorithms/evolving_circles/__init__.py +0 -0
- logic_lab/genetic_algorithms/evolving_circles/evolving_circles.py +199 -0
- logic_lab/genetic_algorithms/ga_shakespeare/README.md +11 -0
- logic_lab/genetic_algorithms/ga_shakespeare/__init__.py +0 -0
- logic_lab/genetic_algorithms/ga_shakespeare/ga_shakespeare.py +120 -0
- logic_lab/genetic_algorithms/ga_shakespeare_annotated/README.md +33 -0
- logic_lab/genetic_algorithms/ga_shakespeare_annotated/ga_shakespeare_annotated.py +190 -0
- logic_lab/genetic_algorithms/interactive_selection/README.md +29 -0
- logic_lab/genetic_algorithms/interactive_selection/interactive_selection.py +245 -0
- logic_lab/genetic_algorithms/smart_rockets/README.md +12 -0
- logic_lab/genetic_algorithms/smart_rockets/__init__.py +0 -0
- logic_lab/genetic_algorithms/smart_rockets/smart_rockets.py +286 -0
- logic_lab/genetic_algorithms/smart_rockets_basic/README.md +12 -0
- logic_lab/genetic_algorithms/smart_rockets_basic/__init__.py +0 -0
- logic_lab/genetic_algorithms/smart_rockets_basic/smart_rockets_basic.py +204 -0
- logic_lab/mathematical/__init__.py +0 -0
- logic_lab/mathematical/apollonian_gasket/README.md +11 -0
- logic_lab/mathematical/apollonian_gasket/apollonian_gasket.py +50 -0
- logic_lab/mathematical/bark_growth_texture/README.md +14 -0
- logic_lab/mathematical/bark_growth_texture/bark_growth_texture.py +107 -0
- logic_lab/mathematical/barycentric_coordinates/README.md +38 -0
- logic_lab/mathematical/barycentric_coordinates/barycentric_coordinates.py +209 -0
- logic_lab/mathematical/blob_generator/README.md +11 -0
- logic_lab/mathematical/blob_generator/blob_generator.py +114 -0
- logic_lab/mathematical/chaikin_curve_smoothing/README.md +38 -0
- logic_lab/mathematical/chaikin_curve_smoothing/chaikin_curve_smoothing.py +185 -0
- logic_lab/mathematical/circle_packing/README.md +37 -0
- logic_lab/mathematical/circle_packing/circle_packing.py +212 -0
- logic_lab/mathematical/clifford_attractor/README.md +37 -0
- logic_lab/mathematical/clifford_attractor/clifford_attractor.py +148 -0
- logic_lab/mathematical/color_harmony/README.md +34 -0
- logic_lab/mathematical/color_harmony/color_harmony.py +80 -0
- logic_lab/mathematical/color_temperature_mixing/README.md +13 -0
- logic_lab/mathematical/color_temperature_mixing/__init__.py +1 -0
- logic_lab/mathematical/color_temperature_mixing/color_temperature_mixing.py +88 -0
- logic_lab/mathematical/complex_domain_coloring/README.md +38 -0
- logic_lab/mathematical/complex_domain_coloring/complex_domain_coloring.py +167 -0
- logic_lab/mathematical/conic_sections/README.md +11 -0
- logic_lab/mathematical/conic_sections/conic_sections.py +70 -0
- logic_lab/mathematical/continued_fraction_div_rect/README.md +9 -0
- logic_lab/mathematical/continued_fraction_div_rect/continued_fraction_div_rect.py +44 -0
- logic_lab/mathematical/continued_fraction_div_rect_zoom/README.md +9 -0
- logic_lab/mathematical/continued_fraction_div_rect_zoom/continued_fraction_div_rect_zoom.py +47 -0
- logic_lab/mathematical/continued_fraction_div_square/README.md +9 -0
- logic_lab/mathematical/continued_fraction_div_square/continued_fraction_div_square.py +50 -0
- logic_lab/mathematical/continued_fraction_gold_div_controls/README.md +15 -0
- logic_lab/mathematical/continued_fraction_gold_div_controls/continued_fraction_gold_div_controls.py +155 -0
- logic_lab/mathematical/continued_fraction_mondrian/README.md +9 -0
- logic_lab/mathematical/continued_fraction_mondrian/continued_fraction_mondrian.py +104 -0
- logic_lab/mathematical/continued_fraction_recur_div_square/README.md +9 -0
- logic_lab/mathematical/continued_fraction_recur_div_square/continued_fraction_recur_div_square.py +86 -0
- logic_lab/mathematical/convex_hull/README.md +37 -0
- logic_lab/mathematical/convex_hull/convex_hull.py +175 -0
- logic_lab/mathematical/cubic_bezier/README.md +9 -0
- logic_lab/mathematical/cubic_bezier/cubic_bezier.py +63 -0
- logic_lab/mathematical/de_casteljau_subdivision/README.md +36 -0
- logic_lab/mathematical/de_casteljau_subdivision/de_casteljau_subdivision.py +183 -0
- logic_lab/mathematical/delaunay_triangulation/README.md +38 -0
- logic_lab/mathematical/delaunay_triangulation/delaunay_triangulation.py +230 -0
- logic_lab/mathematical/diamond_square/README.md +37 -0
- logic_lab/mathematical/diamond_square/diamond_square.py +140 -0
- logic_lab/mathematical/differential_growth/README.md +11 -0
- logic_lab/mathematical/differential_growth/differential_growth.py +51 -0
- logic_lab/mathematical/easing_functions/README.md +42 -0
- logic_lab/mathematical/easing_functions/easing_functions.py +167 -0
- logic_lab/mathematical/envelope_art/README.md +11 -0
- logic_lab/mathematical/envelope_art/envelope_art.py +54 -0
- logic_lab/mathematical/euclid_div_rect/README.md +9 -0
- logic_lab/mathematical/euclid_div_rect/euclid_div_rect.py +50 -0
- logic_lab/mathematical/euclid_div_rect_color/README.md +9 -0
- logic_lab/mathematical/euclid_div_rect_color/euclid_div_rect_color.py +52 -0
- logic_lab/mathematical/euclid_div_square/README.md +9 -0
- logic_lab/mathematical/euclid_div_square/euclid_div_square.py +50 -0
- logic_lab/mathematical/euclid_div_square_recorder/README.md +9 -0
- logic_lab/mathematical/euclid_div_square_recorder/euclid_div_square_recorder.py +51 -0
- logic_lab/mathematical/euclid_numeric/README.md +7 -0
- logic_lab/mathematical/euclid_numeric/euclid_numeric.py +18 -0
- logic_lab/mathematical/euclid_rect_div_rect/README.md +9 -0
- logic_lab/mathematical/euclid_rect_div_rect/euclid_rect_div_rect.py +69 -0
- logic_lab/mathematical/euclid_recur_div_square/README.md +9 -0
- logic_lab/mathematical/euclid_recur_div_square/euclid_recur_div_square.py +86 -0
- logic_lab/mathematical/euclid_recur_div_square_controls/README.md +15 -0
- logic_lab/mathematical/euclid_recur_div_square_controls/euclid_recur_div_square_controls.py +129 -0
- logic_lab/mathematical/fermat_spiral/README.md +9 -0
- logic_lab/mathematical/fermat_spiral/fermat_spiral.py +40 -0
- logic_lab/mathematical/fermat_spiral_line/README.md +9 -0
- logic_lab/mathematical/fermat_spiral_line/fermat_spiral_line.py +72 -0
- logic_lab/mathematical/fermat_spiral_overlay/README.md +9 -0
- logic_lab/mathematical/fermat_spiral_overlay/fermat_spiral_overlay.py +47 -0
- logic_lab/mathematical/fibonacci_convergent/README.md +9 -0
- logic_lab/mathematical/fibonacci_convergent/fibonacci_convergent.py +43 -0
- logic_lab/mathematical/fibonacci_rect/README.md +9 -0
- logic_lab/mathematical/fibonacci_rect/fibonacci_rect.py +56 -0
- logic_lab/mathematical/fibonacci_recur_div/README.md +9 -0
- logic_lab/mathematical/fibonacci_recur_div/fibonacci_recur_div.py +79 -0
- logic_lab/mathematical/fibonacci_recur_div_controls/README.md +13 -0
- logic_lab/mathematical/fibonacci_recur_div_controls/fibonacci_recur_div_controls.py +98 -0
- logic_lab/mathematical/fibonacci_spiral/README.md +9 -0
- logic_lab/mathematical/fibonacci_spiral/fibonacci_spiral.py +66 -0
- logic_lab/mathematical/fibonacci_square/README.md +9 -0
- logic_lab/mathematical/fibonacci_square/fibonacci_square.py +49 -0
- logic_lab/mathematical/fibonacci_square_spiral/README.md +9 -0
- logic_lab/mathematical/fibonacci_square_spiral/fibonacci_square_spiral.py +56 -0
- logic_lab/mathematical/ford_circles/README.md +36 -0
- logic_lab/mathematical/ford_circles/ford_circles.py +146 -0
- logic_lab/mathematical/fourier_epicycles/README.md +38 -0
- logic_lab/mathematical/fourier_epicycles/fourier_epicycles.py +239 -0
- logic_lab/mathematical/fourier_wave_synthesis/README.md +15 -0
- logic_lab/mathematical/fourier_wave_synthesis/__init__.py +1 -0
- logic_lab/mathematical/fourier_wave_synthesis/fourier_wave_synthesis.py +91 -0
- logic_lab/mathematical/geometric_art/README.md +11 -0
- logic_lab/mathematical/geometric_art/geometric_art.py +111 -0
- logic_lab/mathematical/gold_fibo_spiral/README.md +9 -0
- logic_lab/mathematical/gold_fibo_spiral/gold_fibo_spiral.py +103 -0
- logic_lab/mathematical/grid_deformation/README.md +11 -0
- logic_lab/mathematical/grid_deformation/grid_deformation.py +85 -0
- logic_lab/mathematical/harmonograph/README.md +11 -0
- logic_lab/mathematical/harmonograph/harmonograph.py +39 -0
- logic_lab/mathematical/hatching_patterns/README.md +11 -0
- logic_lab/mathematical/hatching_patterns/hatching_patterns.py +79 -0
- logic_lab/mathematical/higher_bezier/README.md +9 -0
- logic_lab/mathematical/higher_bezier/higher_bezier.py +81 -0
- logic_lab/mathematical/hilbert_curve/README.md +36 -0
- logic_lab/mathematical/hilbert_curve/hilbert_curve.py +156 -0
- logic_lab/mathematical/isometric_grid/README.md +11 -0
- logic_lab/mathematical/isometric_grid/isometric_grid.py +50 -0
- logic_lab/mathematical/iterated_function_systems/README.md +11 -0
- logic_lab/mathematical/iterated_function_systems/iterated_function_systems.py +51 -0
- logic_lab/mathematical/light_interference/README.md +15 -0
- logic_lab/mathematical/light_interference/__init__.py +1 -0
- logic_lab/mathematical/light_interference/light_interference.py +92 -0
- logic_lab/mathematical/line_interference/README.md +11 -0
- logic_lab/mathematical/line_interference/line_interference.py +67 -0
- logic_lab/mathematical/lissajous_curves/README.md +38 -0
- logic_lab/mathematical/lissajous_curves/lissajous_curves.py +160 -0
- logic_lab/mathematical/lloyd_relaxation/README.md +38 -0
- logic_lab/mathematical/lloyd_relaxation/lloyd_relaxation.py +181 -0
- logic_lab/mathematical/log_spiral/README.md +9 -0
- logic_lab/mathematical/log_spiral/log_spiral.py +40 -0
- logic_lab/mathematical/log_spiral_zoom/README.md +9 -0
- logic_lab/mathematical/log_spiral_zoom/log_spiral_zoom.py +48 -0
- logic_lab/mathematical/logistic_bifurcation/README.md +36 -0
- logic_lab/mathematical/logistic_bifurcation/logistic_bifurcation.py +139 -0
- logic_lab/mathematical/lorenz_attractor/README.md +11 -0
- logic_lab/mathematical/lorenz_attractor/__init__.py +0 -0
- logic_lab/mathematical/lorenz_attractor/lorenz_attractor.py +118 -0
- logic_lab/mathematical/mandelbrot_julia/README.md +38 -0
- logic_lab/mathematical/mandelbrot_julia/mandelbrot_julia.py +162 -0
- logic_lab/mathematical/marching_squares/README.md +44 -0
- logic_lab/mathematical/marching_squares/marching_squares.py +241 -0
- logic_lab/mathematical/maurer_rose/README.md +42 -0
- logic_lab/mathematical/maurer_rose/maurer_rose.py +135 -0
- logic_lab/mathematical/metaball/README.md +38 -0
- logic_lab/mathematical/metaball/metaball.py +168 -0
- logic_lab/mathematical/mobius_transform_grid/README.md +37 -0
- logic_lab/mathematical/mobius_transform_grid/mobius_transform_grid.py +154 -0
- logic_lab/mathematical/modular_power/README.md +9 -0
- logic_lab/mathematical/modular_power/modular_power.py +39 -0
- logic_lab/mathematical/modular_power_visual/README.md +9 -0
- logic_lab/mathematical/modular_power_visual/modular_power_visual.py +39 -0
- logic_lab/mathematical/modular_table/README.md +9 -0
- logic_lab/mathematical/modular_table/modular_table.py +38 -0
- logic_lab/mathematical/modular_table_visual/README.md +9 -0
- logic_lab/mathematical/modular_table_visual/modular_table_visual.py +38 -0
- logic_lab/mathematical/newton_fractal/README.md +36 -0
- logic_lab/mathematical/newton_fractal/newton_fractal.py +177 -0
- logic_lab/mathematical/orbit_traps/README.md +11 -0
- logic_lab/mathematical/orbit_traps/orbit_traps.py +138 -0
- logic_lab/mathematical/pen_pressure_curve/README.md +11 -0
- logic_lab/mathematical/pen_pressure_curve/pen_pressure_curve.py +189 -0
- logic_lab/mathematical/petal_morphogenesis/README.md +14 -0
- logic_lab/mathematical/petal_morphogenesis/petal_morphogenesis.py +121 -0
- logic_lab/mathematical/phyllotaxis_flower/README.md +14 -0
- logic_lab/mathematical/phyllotaxis_flower/phyllotaxis_flower.py +86 -0
- logic_lab/mathematical/poisson_disk/README.md +35 -0
- logic_lab/mathematical/poisson_disk/poisson_disk.py +159 -0
- logic_lab/mathematical/polyhedra_wireframe/README.md +11 -0
- logic_lab/mathematical/polyhedra_wireframe/polyhedra_wireframe.py +146 -0
- logic_lab/mathematical/prime_spiral/README.md +11 -0
- logic_lab/mathematical/prime_spiral/prime_spiral.py +68 -0
- logic_lab/mathematical/quadratic_bezier/README.md +9 -0
- logic_lab/mathematical/quadratic_bezier/quadratic_bezier.py +66 -0
- logic_lab/mathematical/quasicrystal_interference/README.md +38 -0
- logic_lab/mathematical/quasicrystal_interference/quasicrystal_interference.py +132 -0
- logic_lab/mathematical/recaman_sequence/README.md +11 -0
- logic_lab/mathematical/recaman_sequence/recaman_sequence.py +49 -0
- logic_lab/mathematical/recur_polygon/README.md +9 -0
- logic_lab/mathematical/recur_polygon/recur_polygon.py +66 -0
- logic_lab/mathematical/recur_square/README.md +9 -0
- logic_lab/mathematical/recur_square/recur_square.py +63 -0
- logic_lab/mathematical/recur_square_spiral/README.md +9 -0
- logic_lab/mathematical/recur_square_spiral/recur_square_spiral.py +103 -0
- logic_lab/mathematical/reflection_billiards/README.md +15 -0
- logic_lab/mathematical/reflection_billiards/__init__.py +1 -0
- logic_lab/mathematical/reflection_billiards/reflection_billiards.py +166 -0
- logic_lab/mathematical/rose_curves/__init__.py +0 -0
- logic_lab/mathematical/rose_curves/rose_curves.py +229 -0
- logic_lab/mathematical/rossler_attractor/README.md +11 -0
- logic_lab/mathematical/rossler_attractor/__init__.py +0 -0
- logic_lab/mathematical/rossler_attractor/rossler_attractor.py +119 -0
- logic_lab/mathematical/shape_morphing/README.md +11 -0
- logic_lab/mathematical/shape_morphing/shape_morphing.py +83 -0
- logic_lab/mathematical/signed_distance_field/README.md +36 -0
- logic_lab/mathematical/signed_distance_field/signed_distance_field.py +202 -0
- logic_lab/mathematical/spirograph/__init__.py +0 -0
- logic_lab/mathematical/spirograph/spirograph.py +230 -0
- logic_lab/mathematical/spirograph_curves/README.md +36 -0
- logic_lab/mathematical/spirograph_curves/spirograph_curves.py +184 -0
- logic_lab/mathematical/spirolateral/README.md +11 -0
- logic_lab/mathematical/spirolateral/spirolateral.py +55 -0
- logic_lab/mathematical/strange_attractors/README.md +11 -0
- logic_lab/mathematical/strange_attractors/__init__.py +0 -0
- logic_lab/mathematical/strange_attractors/strange_attractors.py +233 -0
- logic_lab/mathematical/string_art/README.md +11 -0
- logic_lab/mathematical/string_art/string_art.py +66 -0
- logic_lab/mathematical/superellipse/README.md +11 -0
- logic_lab/mathematical/superellipse/superellipse.py +42 -0
- logic_lab/mathematical/superformula/README.md +36 -0
- logic_lab/mathematical/superformula/superformula.py +139 -0
- logic_lab/mathematical/tangent_art/README.md +11 -0
- logic_lab/mathematical/tangent_art/tangent_art.py +76 -0
- logic_lab/mathematical/thomas_attractor/README.md +11 -0
- logic_lab/mathematical/thomas_attractor/__init__.py +0 -0
- logic_lab/mathematical/thomas_attractor/thomas_attractor.py +120 -0
- logic_lab/mathematical/tree_ring_growth/README.md +15 -0
- logic_lab/mathematical/tree_ring_growth/tree_ring_growth.py +118 -0
- logic_lab/mathematical/typography_particles/README.md +11 -0
- logic_lab/mathematical/typography_particles/typography_particles.py +65 -0
- logic_lab/mathematical/ulam_spiral/README.md +35 -0
- logic_lab/mathematical/ulam_spiral/ulam_spiral.py +176 -0
- logic_lab/mathematical/voronoi/README.md +34 -0
- logic_lab/mathematical/voronoi/voronoi.py +184 -0
- logic_lab/mathematical/weighted_voronoi_stippling/README.md +11 -0
- logic_lab/mathematical/weighted_voronoi_stippling/weighted_voronoi_stippling.py +121 -0
- logic_lab/mathematical/worley_noise/README.md +35 -0
- logic_lab/mathematical/worley_noise/worley_noise.py +145 -0
- logic_lab/mcp/README.md +239 -0
- logic_lab/mcp/_data.py +277 -0
- logic_lab/mcp/data/art_manifest.json +7028 -0
- logic_lab/mcp/logic_lab_server.py +668 -0
- logic_lab/network_dynamics/__init__.py +0 -0
- logic_lab/network_dynamics/kuramoto_oscillators/__init__.py +0 -0
- logic_lab/network_dynamics/kuramoto_oscillators/kuramoto_oscillators.py +330 -0
- logic_lab/network_dynamics/scale_free_network/__init__.py +0 -0
- logic_lab/network_dynamics/scale_free_network/scale_free_network.py +215 -0
- logic_lab/network_dynamics/sir_epidemic/__init__.py +0 -0
- logic_lab/network_dynamics/sir_epidemic/sir_epidemic.py +228 -0
- logic_lab/network_dynamics/small_world_network/__init__.py +0 -0
- logic_lab/network_dynamics/small_world_network/small_world_network.py +184 -0
- logic_lab/neuro_evolution/flappy_bird/README.md +45 -0
- logic_lab/neuro_evolution/flappy_bird/flappy_bird.py +117 -0
- logic_lab/neuro_evolution/flappy_bird_neuro_evolution/README.md +53 -0
- logic_lab/neuro_evolution/flappy_bird_neuro_evolution/flappy_bird_neuro_evolution.py +294 -0
- logic_lab/neuro_evolution/smart_rockets_neuro_evolution/README.md +68 -0
- logic_lab/neuro_evolution/smart_rockets_neuro_evolution/smart_rockets_neuro_evolution.py +327 -0
- logic_lab/optical/__init__.py +0 -0
- logic_lab/optical/caustics/__init__.py +0 -0
- logic_lab/optical/caustics/caustics.py +219 -0
- logic_lab/optical/diffraction_pattern/__init__.py +0 -0
- logic_lab/optical/diffraction_pattern/diffraction_pattern.py +189 -0
- logic_lab/optical/thin_film/__init__.py +0 -0
- logic_lab/optical/thin_film/thin_film.py +246 -0
- logic_lab/oscillators/__init__.py +0 -0
- logic_lab/oscillators/chladni_figures/README.md +11 -0
- logic_lab/oscillators/chladni_figures/__init__.py +0 -0
- logic_lab/oscillators/chladni_figures/chladni_figures.py +222 -0
- logic_lab/oscillators/coupled_oscillators/README.md +11 -0
- logic_lab/oscillators/coupled_oscillators/__init__.py +0 -0
- logic_lab/oscillators/coupled_oscillators/coupled_oscillators.py +177 -0
- logic_lab/oscillators/harmonic_pantograph/README.md +11 -0
- logic_lab/oscillators/harmonic_pantograph/__init__.py +0 -0
- logic_lab/oscillators/harmonic_pantograph/harmonic_pantograph.py +161 -0
- logic_lab/oscillators/lissajous_curves/README.md +11 -0
- logic_lab/oscillators/lissajous_curves/__init__.py +0 -0
- logic_lab/oscillators/lissajous_curves/lissajous_curves.py +147 -0
- logic_lab/oscillators/van_der_pol/__init__.py +0 -0
- logic_lab/oscillators/van_der_pol/van_der_pol.py +280 -0
- logic_lab/physics/accelerate_and_decelerate/README.md +9 -0
- logic_lab/physics/accelerate_and_decelerate/__init__.py +0 -0
- logic_lab/physics/accelerate_and_decelerate/accelerate_and_decelerate.py +100 -0
- logic_lab/physics/accelerating_towards_the_mouse/README.md +7 -0
- logic_lab/physics/accelerating_towards_the_mouse/__init__.py +0 -0
- logic_lab/physics/accelerating_towards_the_mouse/accelerating_towards_the_mouse.py +61 -0
- logic_lab/physics/accept_reject_distribution/README.md +7 -0
- logic_lab/physics/accept_reject_distribution/__init__.py +1 -0
- logic_lab/physics/accept_reject_distribution/accept_reject_distribution.py +48 -0
- logic_lab/physics/additive_wave/README.md +8 -0
- logic_lab/physics/additive_wave/__init__.py +1 -0
- logic_lab/physics/additive_wave/additive_wave.py +70 -0
- logic_lab/physics/angle_between/README.md +8 -0
- logic_lab/physics/angle_between/__init__.py +0 -0
- logic_lab/physics/angle_between/angle_between.py +60 -0
- logic_lab/physics/angular_motion_using_rotate/README.md +8 -0
- logic_lab/physics/angular_motion_using_rotate/__init__.py +1 -0
- logic_lab/physics/angular_motion_using_rotate/angular_motion_using_rotate.py +41 -0
- logic_lab/physics/array_particles/README.md +8 -0
- logic_lab/physics/array_particles/__init__.py +1 -0
- logic_lab/physics/array_particles/array_particles.py +64 -0
- logic_lab/physics/asteroids_particle_system/README.md +8 -0
- logic_lab/physics/asteroids_particle_system/__init__.py +1 -0
- logic_lab/physics/asteroids_particle_system/asteroids_particle_system.py +174 -0
- logic_lab/physics/attraction/README.md +8 -0
- logic_lab/physics/attraction/__init__.py +0 -0
- logic_lab/physics/attraction/attraction.py +121 -0
- logic_lab/physics/attraction_magnitude/README.md +7 -0
- logic_lab/physics/attraction_magnitude/__init__.py +0 -0
- logic_lab/physics/attraction_magnitude/attraction_magnitude.py +57 -0
- logic_lab/physics/attraction_with_many_movers/README.md +8 -0
- logic_lab/physics/attraction_with_many_movers/__init__.py +0 -0
- logic_lab/physics/attraction_with_many_movers/attraction_with_many_movers.py +123 -0
- logic_lab/physics/bouncing_ball_3d/README.md +8 -0
- logic_lab/physics/bouncing_ball_3d/__init__.py +0 -0
- logic_lab/physics/bouncing_ball_3d/bouncing_ball_3d.py +80 -0
- logic_lab/physics/bouncing_ball_no_vectors/README.md +7 -0
- logic_lab/physics/bouncing_ball_no_vectors/__init__.py +0 -0
- logic_lab/physics/bouncing_ball_no_vectors/bouncing_ball_no_vectors.py +43 -0
- logic_lab/physics/bouncing_ball_with_vectors/README.md +7 -0
- logic_lab/physics/bouncing_ball_with_vectors/__init__.py +0 -0
- logic_lab/physics/bouncing_ball_with_vectors/bouncing_ball_with_vectors.py +41 -0
- logic_lab/physics/box_collision/README.md +11 -0
- logic_lab/physics/box_collision/__init__.py +1 -0
- logic_lab/physics/box_collision/box_collision.py +56 -0
- logic_lab/physics/buoyancy_balloon/README.md +8 -0
- logic_lab/physics/buoyancy_balloon/__init__.py +0 -0
- logic_lab/physics/buoyancy_balloon/buoyancy_balloon.py +98 -0
- logic_lab/physics/caustic_light_field/README.md +14 -0
- logic_lab/physics/caustic_light_field/__init__.py +1 -0
- logic_lab/physics/caustic_light_field/caustic_light_field.py +114 -0
- logic_lab/physics/chladni_plate/README.md +15 -0
- logic_lab/physics/chladni_plate/__init__.py +1 -0
- logic_lab/physics/chladni_plate/chladni_plate.py +94 -0
- logic_lab/physics/collision_events/README.md +11 -0
- logic_lab/physics/collision_events/__init__.py +1 -0
- logic_lab/physics/collision_events/collision_events.py +86 -0
- logic_lab/physics/contact_solver/README.md +11 -0
- logic_lab/physics/contact_solver/__init__.py +1 -0
- logic_lab/physics/contact_solver/contact_solver.py +89 -0
- logic_lab/physics/double_pendulum/README.md +11 -0
- logic_lab/physics/double_pendulum/__init__.py +1 -0
- logic_lab/physics/double_pendulum/double_pendulum.py +84 -0
- logic_lab/physics/dye_plume_field/README.md +17 -0
- logic_lab/physics/dye_plume_field/__init__.py +1 -0
- logic_lab/physics/dye_plume_field/dye_plume_field.py +187 -0
- logic_lab/physics/emitters_1/README.md +9 -0
- logic_lab/physics/emitters_1/__init__.py +1 -0
- logic_lab/physics/emitters_1/emitters_1.py +82 -0
- logic_lab/physics/emitters_2/README.md +9 -0
- logic_lab/physics/emitters_2/__init__.py +1 -0
- logic_lab/physics/emitters_2/emitters_2.py +85 -0
- logic_lab/physics/excitable_wavefronts/README.md +14 -0
- logic_lab/physics/excitable_wavefronts/__init__.py +1 -0
- logic_lab/physics/excitable_wavefronts/excitable_wavefronts.py +103 -0
- logic_lab/physics/flow_field_art/README.md +11 -0
- logic_lab/physics/flow_field_art/flow_field_art.py +70 -0
- logic_lab/physics/fluid_particles/README.md +12 -0
- logic_lab/physics/fluid_particles/__init__.py +1 -0
- logic_lab/physics/fluid_particles/fluid_particles.py +70 -0
- logic_lab/physics/fluid_resistance/README.md +8 -0
- logic_lab/physics/fluid_resistance/__init__.py +0 -0
- logic_lab/physics/fluid_resistance/fluid_resistance.py +102 -0
- logic_lab/physics/forces/README.md +10 -0
- logic_lab/physics/forces/__init__.py +0 -0
- logic_lab/physics/forces/forces.py +71 -0
- logic_lab/physics/forces_two_objects/README.md +10 -0
- logic_lab/physics/forces_two_objects/__init__.py +0 -0
- logic_lab/physics/forces_two_objects/forces_two_objects.py +79 -0
- logic_lab/physics/forces_with_arbitrary_angular_motion/README.md +8 -0
- logic_lab/physics/forces_with_arbitrary_angular_motion/__init__.py +1 -0
- logic_lab/physics/forces_with_arbitrary_angular_motion/forces_with_arbitrary_angular_motion.py +93 -0
- logic_lab/physics/fracture_dynamics/README.md +11 -0
- logic_lab/physics/fracture_dynamics/__init__.py +1 -0
- logic_lab/physics/fracture_dynamics/fracture_dynamics.py +72 -0
- logic_lab/physics/gaussian_distribution/README.md +7 -0
- logic_lab/physics/gaussian_distribution/__init__.py +1 -0
- logic_lab/physics/gaussian_distribution/gaussian_distribution.py +27 -0
- logic_lab/physics/gaussian_random_walker/README.md +7 -0
- logic_lab/physics/gaussian_random_walker/__init__.py +0 -0
- logic_lab/physics/gaussian_random_walker/gaussian_random_walker.py +45 -0
- logic_lab/physics/gravity_scaled_by_mass/README.md +8 -0
- logic_lab/physics/gravity_scaled_by_mass/__init__.py +0 -0
- logic_lab/physics/gravity_scaled_by_mass/gravity_scaled_by_mass.py +84 -0
- logic_lab/physics/including_friction/README.md +8 -0
- logic_lab/physics/including_friction/__init__.py +0 -0
- logic_lab/physics/including_friction/including_friction.py +81 -0
- logic_lab/physics/ink_smoke_advection/README.md +18 -0
- logic_lab/physics/ink_smoke_advection/__init__.py +1 -0
- logic_lab/physics/ink_smoke_advection/ink_smoke_advection.py +204 -0
- logic_lab/physics/joints_and_constraints/README.md +12 -0
- logic_lab/physics/joints_and_constraints/__init__.py +1 -0
- logic_lab/physics/joints_and_constraints/joints_and_constraints.py +52 -0
- logic_lab/physics/lenia/README.md +11 -0
- logic_lab/physics/lenia/lenia.py +77 -0
- logic_lab/physics/light_falloff_field/README.md +15 -0
- logic_lab/physics/light_falloff_field/__init__.py +1 -0
- logic_lab/physics/light_falloff_field/light_falloff_field.py +109 -0
- logic_lab/physics/light_ray_casting/README.md +16 -0
- logic_lab/physics/light_ray_casting/__init__.py +1 -0
- logic_lab/physics/light_ray_casting/light_ray_casting.py +152 -0
- logic_lab/physics/magnetic_pendulum/README.md +11 -0
- logic_lab/physics/magnetic_pendulum/magnetic_pendulum.py +67 -0
- logic_lab/physics/mass_spring_cloth/README.md +12 -0
- logic_lab/physics/mass_spring_cloth/__init__.py +1 -0
- logic_lab/physics/mass_spring_cloth/mass_spring_cloth.py +55 -0
- logic_lab/physics/motion_101_velocity/README.md +7 -0
- logic_lab/physics/motion_101_velocity/__init__.py +0 -0
- logic_lab/physics/motion_101_velocity/motion_101_velocity.py +57 -0
- logic_lab/physics/motion_101_velocity_and_constant_acceleration/README.md +7 -0
- logic_lab/physics/motion_101_velocity_and_constant_acceleration/__init__.py +0 -0
- logic_lab/physics/motion_101_velocity_and_constant_acceleration/motion_101_velocity_and_constant_acceleration.py +63 -0
- logic_lab/physics/motion_101_velocity_and_random_acceleration/README.md +7 -0
- logic_lab/physics/motion_101_velocity_and_random_acceleration/__init__.py +0 -0
- logic_lab/physics/motion_101_velocity_and_random_acceleration/motion_101_velocity_and_random_acceleration.py +66 -0
- logic_lab/physics/multiple_emitters/README.md +9 -0
- logic_lab/physics/multiple_emitters/__init__.py +1 -0
- logic_lab/physics/multiple_emitters/multiple_emitters.py +81 -0
- logic_lab/physics/multiple_emitters_0/README.md +9 -0
- logic_lab/physics/multiple_emitters_0/__init__.py +1 -0
- logic_lab/physics/multiple_emitters_0/multiple_emitters_0.py +81 -0
- logic_lab/physics/n_bodies/README.md +7 -0
- logic_lab/physics/n_bodies/__init__.py +0 -0
- logic_lab/physics/n_bodies/n_bodies.py +68 -0
- logic_lab/physics/n_body_orbital_simulation/README.md +8 -0
- logic_lab/physics/n_body_orbital_simulation/__init__.py +0 -0
- logic_lab/physics/n_body_orbital_simulation/n_body_orbital_simulation.py +76 -0
- logic_lab/physics/noise_2d_animated/README.md +8 -0
- logic_lab/physics/noise_2d_animated/__init__.py +0 -0
- logic_lab/physics/noise_2d_animated/noise_2d_animated.py +62 -0
- logic_lab/physics/noise_2d_parameterized/README.md +8 -0
- logic_lab/physics/noise_2d_parameterized/__init__.py +0 -0
- logic_lab/physics/noise_2d_parameterized/noise_2d_parameterized.py +57 -0
- logic_lab/physics/noise_terrain/README.md +7 -0
- logic_lab/physics/noise_terrain/__init__.py +0 -0
- logic_lab/physics/noise_terrain/noise_terrain.py +72 -0
- logic_lab/physics/oop_wave/README.md +8 -0
- logic_lab/physics/oop_wave/__init__.py +1 -0
- logic_lab/physics/oop_wave/oop_wave.py +65 -0
- logic_lab/physics/oscillator_objects/README.md +8 -0
- logic_lab/physics/oscillator_objects/__init__.py +1 -0
- logic_lab/physics/oscillator_objects/oscillator_objects.py +57 -0
- logic_lab/physics/paint_splatter/README.md +21 -0
- logic_lab/physics/paint_splatter/__init__.py +0 -0
- logic_lab/physics/paint_splatter/paint_splatter.py +134 -0
- logic_lab/physics/particle_emitter/README.md +8 -0
- logic_lab/physics/particle_emitter/__init__.py +1 -0
- logic_lab/physics/particle_emitter/particle_emitter.py +77 -0
- logic_lab/physics/particle_flow/README.md +47 -0
- logic_lab/physics/particle_flow/particle_flow.py +157 -0
- logic_lab/physics/particle_force_fields/README.md +12 -0
- logic_lab/physics/particle_force_fields/__init__.py +1 -0
- logic_lab/physics/particle_force_fields/particle_force_fields.py +54 -0
- logic_lab/physics/particle_shatter/README.md +8 -0
- logic_lab/physics/particle_shatter/__init__.py +1 -0
- logic_lab/physics/particle_shatter/particle_shatter.py +91 -0
- logic_lab/physics/particle_system_forces/README.md +9 -0
- logic_lab/physics/particle_system_forces/__init__.py +1 -0
- logic_lab/physics/particle_system_forces/particle_system_forces.py +84 -0
- logic_lab/physics/particle_system_inheritance_polymorphism/README.md +9 -0
- logic_lab/physics/particle_system_inheritance_polymorphism/__init__.py +1 -0
- logic_lab/physics/particle_system_inheritance_polymorphism/particle_system_inheritance_polymorphism.py +94 -0
- logic_lab/physics/particle_system_smoke_webgl/README.md +9 -0
- logic_lab/physics/particle_system_smoke_webgl/__init__.py +1 -0
- logic_lab/physics/particle_system_smoke_webgl/particle_system_smoke_webgl.py +123 -0
- logic_lab/physics/particle_system_with_repeller/README.md +8 -0
- logic_lab/physics/particle_system_with_repeller/__init__.py +1 -0
- logic_lab/physics/particle_system_with_repeller/particle_system_with_repeller.py +112 -0
- logic_lab/physics/particle_textures_array/README.md +9 -0
- logic_lab/physics/particle_textures_array/__init__.py +0 -0
- logic_lab/physics/particle_textures_array/particle_textures_array.py +115 -0
- logic_lab/physics/perlin_noise_walker/README.md +8 -0
- logic_lab/physics/perlin_noise_walker/__init__.py +0 -0
- logic_lab/physics/perlin_noise_walker/perlin_noise_walker.py +48 -0
- logic_lab/physics/perlin_noise_walker_lines/README.md +7 -0
- logic_lab/physics/perlin_noise_walker_lines/__init__.py +0 -0
- logic_lab/physics/perlin_noise_walker_lines/perlin_noise_walker_lines.py +51 -0
- logic_lab/physics/pointing_in_the_direction_of_motion/README.md +8 -0
- logic_lab/physics/pointing_in_the_direction_of_motion/__init__.py +1 -0
- logic_lab/physics/pointing_in_the_direction_of_motion/pointing_in_the_direction_of_motion.py +78 -0
- logic_lab/physics/polar_to_cartesian/README.md +8 -0
- logic_lab/physics/polar_to_cartesian/__init__.py +1 -0
- logic_lab/physics/polar_to_cartesian/polar_to_cartesian.py +41 -0
- logic_lab/physics/pollen_dispersal/README.md +15 -0
- logic_lab/physics/pollen_dispersal/pollen_dispersal.py +167 -0
- logic_lab/physics/quadratic_random_walker/README.md +7 -0
- logic_lab/physics/quadratic_random_walker/__init__.py +0 -0
- logic_lab/physics/quadratic_random_walker/quadratic_random_walker.py +59 -0
- logic_lab/physics/random_distribution/README.md +7 -0
- logic_lab/physics/random_distribution/__init__.py +1 -0
- logic_lab/physics/random_distribution/random_distribution.py +37 -0
- logic_lab/physics/random_walk/README.md +7 -0
- logic_lab/physics/random_walk/__init__.py +1 -0
- logic_lab/physics/random_walk/random_walk.py +51 -0
- logic_lab/physics/random_walk_right/README.md +7 -0
- logic_lab/physics/random_walk_right/__init__.py +1 -0
- logic_lab/physics/random_walk_right/random_walk_right.py +51 -0
- logic_lab/physics/random_walk_towards_mouse/README.md +7 -0
- logic_lab/physics/random_walk_towards_mouse/__init__.py +0 -0
- logic_lab/physics/random_walk_towards_mouse/random_walk_towards_mouse.py +63 -0
- logic_lab/physics/raycast_queries/README.md +11 -0
- logic_lab/physics/raycast_queries/__init__.py +1 -0
- logic_lab/physics/raycast_queries/raycast_queries.py +70 -0
- logic_lab/physics/reaction_diffusion/README.md +57 -0
- logic_lab/physics/reaction_diffusion/reaction_diffusion.py +216 -0
- logic_lab/physics/refraction_prism/README.md +14 -0
- logic_lab/physics/refraction_prism/__init__.py +1 -0
- logic_lab/physics/refraction_prism/refraction_prism.py +159 -0
- logic_lab/physics/rigid_body_collision/README.md +13 -0
- logic_lab/physics/rigid_body_collision/__init__.py +1 -0
- logic_lab/physics/rigid_body_collision/rigid_body_collision.py +79 -0
- logic_lab/physics/ripple_field/README.md +14 -0
- logic_lab/physics/ripple_field/__init__.py +1 -0
- logic_lab/physics/ripple_field/ripple_field.py +82 -0
- logic_lab/physics/rotate_baton/README.md +8 -0
- logic_lab/physics/rotate_baton/__init__.py +1 -0
- logic_lab/physics/rotate_baton/rotate_baton.py +39 -0
- logic_lab/physics/rotating_rigid_bodies/README.md +11 -0
- logic_lab/physics/rotating_rigid_bodies/__init__.py +1 -0
- logic_lab/physics/rotating_rigid_bodies/rotating_rigid_bodies.py +81 -0
- logic_lab/physics/sand_simulation/README.md +11 -0
- logic_lab/physics/sand_simulation/sand_simulation.py +53 -0
- logic_lab/physics/sat_polygon_collision/README.md +11 -0
- logic_lab/physics/sat_polygon_collision/__init__.py +1 -0
- logic_lab/physics/sat_polygon_collision/sat_polygon_collision.py +58 -0
- logic_lab/physics/seismic_wave_field/README.md +14 -0
- logic_lab/physics/seismic_wave_field/__init__.py +1 -0
- logic_lab/physics/seismic_wave_field/seismic_wave_field.py +90 -0
- logic_lab/physics/simple_harmonic_motion/README.md +8 -0
- logic_lab/physics/simple_harmonic_motion/__init__.py +1 -0
- logic_lab/physics/simple_harmonic_motion/simple_harmonic_motion.py +34 -0
- logic_lab/physics/simple_harmonic_motion_ii/README.md +8 -0
- logic_lab/physics/simple_harmonic_motion_ii/__init__.py +1 -0
- logic_lab/physics/simple_harmonic_motion_ii/simple_harmonic_motion_ii.py +39 -0
- logic_lab/physics/simple_spring_with_toxiclibs/README.md +9 -0
- logic_lab/physics/simple_spring_with_toxiclibs/__init__.py +0 -0
- logic_lab/physics/simple_spring_with_toxiclibs/simple_spring_with_toxiclibs.py +128 -0
- logic_lab/physics/sine_cosine_lookup_table/README.md +8 -0
- logic_lab/physics/sine_cosine_lookup_table/__init__.py +0 -0
- logic_lab/physics/sine_cosine_lookup_table/sine_cosine_lookup_table.py +47 -0
- logic_lab/physics/single_particle/README.md +8 -0
- logic_lab/physics/single_particle/__init__.py +1 -0
- logic_lab/physics/single_particle/single_particle.py +63 -0
- logic_lab/physics/skewed_random_walker/README.md +7 -0
- logic_lab/physics/skewed_random_walker/__init__.py +0 -0
- logic_lab/physics/skewed_random_walker/skewed_random_walker.py +45 -0
- logic_lab/physics/soft_body_lattice/README.md +11 -0
- logic_lab/physics/soft_body_lattice/__init__.py +1 -0
- logic_lab/physics/soft_body_lattice/soft_body_lattice.py +67 -0
- logic_lab/physics/spatial_hash_broad_phase/README.md +10 -0
- logic_lab/physics/spatial_hash_broad_phase/__init__.py +1 -0
- logic_lab/physics/spatial_hash_broad_phase/spatial_hash_broad_phase.py +68 -0
- logic_lab/physics/spiral/README.md +8 -0
- logic_lab/physics/spiral/__init__.py +1 -0
- logic_lab/physics/spiral/spiral.py +36 -0
- logic_lab/physics/spring_connection/README.md +9 -0
- logic_lab/physics/spring_connection/__init__.py +1 -0
- logic_lab/physics/spring_connection/spring_connection.py +130 -0
- logic_lab/physics/spring_mesh/README.md +35 -0
- logic_lab/physics/spring_mesh/spring_mesh.py +230 -0
- logic_lab/physics/stable_fluids/README.md +11 -0
- logic_lab/physics/stable_fluids/__init__.py +0 -0
- logic_lab/physics/stable_fluids/stable_fluids.py +263 -0
- logic_lab/physics/stable_fluids_2d/README.md +11 -0
- logic_lab/physics/stable_fluids_2d/__init__.py +1 -0
- logic_lab/physics/stable_fluids_2d/stable_fluids_2d.py +74 -0
- logic_lab/physics/standing_wave/README.md +15 -0
- logic_lab/physics/standing_wave/__init__.py +1 -0
- logic_lab/physics/standing_wave/standing_wave.py +71 -0
- logic_lab/physics/static_wave/README.md +8 -0
- logic_lab/physics/static_wave/__init__.py +1 -0
- logic_lab/physics/static_wave/static_wave.py +33 -0
- logic_lab/physics/swinging_pendulum/README.md +9 -0
- logic_lab/physics/swinging_pendulum/__init__.py +1 -0
- logic_lab/physics/swinging_pendulum/swinging_pendulum.py +89 -0
- logic_lab/physics/the_wave/README.md +8 -0
- logic_lab/physics/the_wave/__init__.py +1 -0
- logic_lab/physics/the_wave/the_wave.py +39 -0
- logic_lab/physics/the_wave_a/README.md +8 -0
- logic_lab/physics/the_wave_a/__init__.py +1 -0
- logic_lab/physics/the_wave_a/the_wave_a.py +32 -0
- logic_lab/physics/the_wave_b/README.md +8 -0
- logic_lab/physics/the_wave_b/__init__.py +1 -0
- logic_lab/physics/the_wave_b/the_wave_b.py +38 -0
- logic_lab/physics/the_wave_c/README.md +8 -0
- logic_lab/physics/the_wave_c/__init__.py +1 -0
- logic_lab/physics/the_wave_c/the_wave_c.py +32 -0
- logic_lab/physics/two_body_attraction/README.md +7 -0
- logic_lab/physics/two_body_attraction/__init__.py +0 -0
- logic_lab/physics/two_body_attraction/two_body_attraction.py +71 -0
- logic_lab/physics/vector_magnitude/README.md +7 -0
- logic_lab/physics/vector_magnitude/__init__.py +0 -0
- logic_lab/physics/vector_magnitude/vector_magnitude.py +33 -0
- logic_lab/physics/vector_multiplication/README.md +7 -0
- logic_lab/physics/vector_multiplication/__init__.py +0 -0
- logic_lab/physics/vector_multiplication/vector_multiplication.py +37 -0
- logic_lab/physics/vector_normalize/README.md +7 -0
- logic_lab/physics/vector_normalize/__init__.py +0 -0
- logic_lab/physics/vector_normalize/vector_normalize.py +38 -0
- logic_lab/physics/vector_subtraction/README.md +7 -0
- logic_lab/physics/vector_subtraction/__init__.py +0 -0
- logic_lab/physics/vector_subtraction/vector_subtraction.py +36 -0
- logic_lab/physics/verlet_constraints/README.md +12 -0
- logic_lab/physics/verlet_constraints/__init__.py +1 -0
- logic_lab/physics/verlet_constraints/verlet_constraints.py +59 -0
- logic_lab/physics/volumetric_light_beams/README.md +14 -0
- logic_lab/physics/volumetric_light_beams/__init__.py +1 -0
- logic_lab/physics/volumetric_light_beams/volumetric_light_beams.py +122 -0
- logic_lab/physics/watercolor_ink_diffusion/README.md +18 -0
- logic_lab/physics/watercolor_ink_diffusion/__init__.py +1 -0
- logic_lab/physics/watercolor_ink_diffusion/watercolor_ink_diffusion.py +166 -0
- logic_lab/physics/wave_equation_grid/README.md +14 -0
- logic_lab/physics/wave_equation_grid/__init__.py +1 -0
- logic_lab/physics/wave_equation_grid/wave_equation_grid.py +78 -0
- logic_lab/physics/wave_interference_field/README.md +16 -0
- logic_lab/physics/wave_interference_field/__init__.py +1 -0
- logic_lab/physics/wave_interference_field/wave_interference_field.py +85 -0
- logic_lab/physics/wave_packet/README.md +14 -0
- logic_lab/physics/wave_packet/__init__.py +1 -0
- logic_lab/physics/wave_packet/wave_packet.py +66 -0
- logic_lab/procedural_terrain/__init__.py +0 -0
- logic_lab/procedural_terrain/fault_terrain/__init__.py +0 -0
- logic_lab/procedural_terrain/fault_terrain/fault_terrain.py +218 -0
- logic_lab/procedural_terrain/hydraulic_erosion/__init__.py +0 -0
- logic_lab/procedural_terrain/hydraulic_erosion/hydraulic_erosion.py +275 -0
- logic_lab/procedural_terrain/voronoi_landscape/__init__.py +0 -0
- logic_lab/procedural_terrain/voronoi_landscape/voronoi_landscape.py +243 -0
- logic_lab/reaction_diffusion/__init__.py +3 -0
- logic_lab/reaction_diffusion/belousov_zhabotinsky/README.md +11 -0
- logic_lab/reaction_diffusion/belousov_zhabotinsky/__init__.py +0 -0
- logic_lab/reaction_diffusion/belousov_zhabotinsky/belousov_zhabotinsky.py +144 -0
- logic_lab/reaction_diffusion/gray_scott/README.md +11 -0
- logic_lab/reaction_diffusion/gray_scott/__init__.py +3 -0
- logic_lab/reaction_diffusion/gray_scott/gray_scott.py +258 -0
- logic_lab/reaction_diffusion/lenia/README.md +11 -0
- logic_lab/reaction_diffusion/lenia/__init__.py +0 -0
- logic_lab/reaction_diffusion/lenia/lenia.py +151 -0
- logic_lab/reaction_diffusion/turing_patterns/README.md +11 -0
- logic_lab/reaction_diffusion/turing_patterns/__init__.py +0 -0
- logic_lab/reaction_diffusion/turing_patterns/turing_patterns.py +163 -0
- logic_lab/research/acrylic_pour/README.md +52 -0
- logic_lab/research/acrylic_pour/__init__.py +1 -0
- logic_lab/research/acrylic_pour/acrylic_pour.py +210 -0
- logic_lab/research/asteroids/README.md +8 -0
- logic_lab/research/asteroids/__init__.py +1 -0
- logic_lab/research/asteroids/asteroids.py +121 -0
- logic_lab/research/audio_fft/README.md +43 -0
- logic_lab/research/audio_fft/audio_fft.py +194 -0
- logic_lab/research/audio_wave_scope/README.md +14 -0
- logic_lab/research/audio_wave_scope/__init__.py +1 -0
- logic_lab/research/audio_wave_scope/audio_wave_scope.py +88 -0
- logic_lab/research/bridge/README.md +9 -0
- logic_lab/research/bridge/__init__.py +0 -0
- logic_lab/research/bridge/bridge.py +115 -0
- logic_lab/research/compound_bodies/README.md +10 -0
- logic_lab/research/compound_bodies/__init__.py +0 -0
- logic_lab/research/compound_bodies/compound_bodies.py +123 -0
- logic_lab/research/dry_brush_texture/README.md +41 -0
- logic_lab/research/dry_brush_texture/__init__.py +1 -0
- logic_lab/research/dry_brush_texture/dry_brush_texture.py +168 -0
- logic_lab/research/force_directed_graph/README.md +9 -0
- logic_lab/research/force_directed_graph/__init__.py +0 -0
- logic_lab/research/force_directed_graph/force_directed_graph.py +137 -0
- logic_lab/research/force_directed_graph_6_13/README.md +9 -0
- logic_lab/research/force_directed_graph_6_13/__init__.py +0 -0
- logic_lab/research/force_directed_graph_6_13/force_directed_graph.py +187 -0
- logic_lab/research/image_texture_system_smoke/README.md +8 -0
- logic_lab/research/image_texture_system_smoke/__init__.py +1 -0
- logic_lab/research/image_texture_system_smoke/image_texture_system_smoke.py +116 -0
- logic_lab/research/impasto_rendering/README.md +41 -0
- logic_lab/research/impasto_rendering/__init__.py +1 -0
- logic_lab/research/impasto_rendering/impasto_rendering.py +177 -0
- logic_lab/research/layered_paint_mixing/README.md +50 -0
- logic_lab/research/layered_paint_mixing/__init__.py +1 -0
- logic_lab/research/layered_paint_mixing/layered_paint_mixing.py +209 -0
- logic_lab/research/matter_js_pendulum/README.md +8 -0
- logic_lab/research/matter_js_pendulum/__init__.py +0 -0
- logic_lab/research/matter_js_pendulum/matter_js_pendulum.py +101 -0
- logic_lab/research/mouse_constraint/README.md +9 -0
- logic_lab/research/mouse_constraint/__init__.py +0 -0
- logic_lab/research/mouse_constraint/mouse_constraint.py +143 -0
- logic_lab/research/oil_paint_swirl/README.md +43 -0
- logic_lab/research/oil_paint_swirl/__init__.py +1 -0
- logic_lab/research/oil_paint_swirl/oil_paint_swirl.py +193 -0
- logic_lab/research/pixel_sorting/pixel_sorting.py +202 -0
- logic_lab/research/polygon_shapes/README.md +9 -0
- logic_lab/research/polygon_shapes/__init__.py +0 -0
- logic_lab/research/polygon_shapes/polygon_shapes.py +106 -0
- logic_lab/research/soft_body_character_copy/README.md +9 -0
- logic_lab/research/soft_body_character_copy/__init__.py +0 -0
- logic_lab/research/soft_body_character_copy/soft_body_character_copy.py +132 -0
- logic_lab/research/soft_body_character_enhanced/README.md +10 -0
- logic_lab/research/soft_body_character_enhanced/__init__.py +0 -0
- logic_lab/research/soft_body_character_enhanced/soft_body_character_enhanced.py +197 -0
- logic_lab/research/windmill/README.md +9 -0
- logic_lab/research/windmill/__init__.py +0 -0
- logic_lab/research/windmill/windmill.py +118 -0
- logic_lab/research/windmill_motor/README.md +9 -0
- logic_lab/research/windmill_motor/__init__.py +0 -0
- logic_lab/research/windmill_motor/windmill_motor.py +115 -0
- logic_lab/self_organizing/__init__.py +0 -0
- logic_lab/self_organizing/boids/__init__.py +0 -0
- logic_lab/self_organizing/boids/boids.py +234 -0
- logic_lab/self_organizing/growing_neural_gas/__init__.py +0 -0
- logic_lab/self_organizing/growing_neural_gas/growing_neural_gas.py +232 -0
- logic_lab/self_organizing/kohonen_som/__init__.py +0 -0
- logic_lab/self_organizing/kohonen_som/kohonen_som.py +236 -0
- logic_lab/self_organizing/reaction_diffusion/__init__.py +0 -0
- logic_lab/self_organizing/reaction_diffusion/reaction_diffusion.py +196 -0
- logic_lab/shared/__init__.py +29 -0
- logic_lab/shared/batch_runner.py +236 -0
- logic_lab/shared/lfo.py +200 -0
- logic_lab/shared/libs/experiment_utils.py +28 -0
- logic_lab/shared/libs/mcc/__init__.py +5 -0
- logic_lab/shared/libs/mcc/config.py +102 -0
- logic_lab/shared/libs/mcc/population.py +90 -0
- logic_lab/shared/libs/mcc/reporting.py +163 -0
- logic_lab/shared/libs/mcc/reproduction.py +37 -0
- logic_lab/shared/libs/me_neat/__init__.py +7 -0
- logic_lab/shared/libs/me_neat/behavioral_descriptor.py +15 -0
- logic_lab/shared/libs/me_neat/config.py +92 -0
- logic_lab/shared/libs/me_neat/drawer.py +75 -0
- logic_lab/shared/libs/me_neat/population.py +91 -0
- logic_lab/shared/libs/me_neat/reporting.py +135 -0
- logic_lab/shared/libs/me_neat/reproduction.py +72 -0
- logic_lab/shared/libs/neat_cppn/__init__.py +11 -0
- logic_lab/shared/libs/neat_cppn/config.py +56 -0
- logic_lab/shared/libs/neat_cppn/cppn_decoder.py +68 -0
- logic_lab/shared/libs/neat_cppn/feedforward.py +69 -0
- logic_lab/shared/libs/neat_cppn/figure.py +121 -0
- logic_lab/shared/libs/neat_cppn/genome.py +37 -0
- logic_lab/shared/libs/neat_cppn/population.py +144 -0
- logic_lab/shared/libs/neat_cppn/reporting.py +70 -0
- logic_lab/shared/libs/neat_cppn/reproduction.py +146 -0
- logic_lab/shared/libs/ns_neat/__init__.py +5 -0
- logic_lab/shared/libs/ns_neat/config.py +138 -0
- logic_lab/shared/libs/ns_neat/metrices.py +17 -0
- logic_lab/shared/libs/ns_neat/population.py +164 -0
- logic_lab/shared/libs/ns_neat/reporting.py +127 -0
- logic_lab/shared/libs/parallel.py +241 -0
- logic_lab/shared/libs/poet/__init__.py +0 -0
- logic_lab/shared/libs/poet/environment_evogym.py +406 -0
- logic_lab/shared/libs/poet/environment_mujoco.py +162 -0
- logic_lab/shared/libs/poet/learner_ppo.py +263 -0
- logic_lab/shared/libs/poet/niche.py +228 -0
- logic_lab/shared/libs/poet/poet_algo.py +401 -0
- logic_lab/shared/libs/ppo/__init__.py +2 -0
- logic_lab/shared/libs/ppo/policy.py +87 -0
- logic_lab/shared/libs/ppo/ppo.py +159 -0
- logic_lab/shared/noise_field.py +128 -0
- logic_lab/shared/physics2d.py +646 -0
- logic_lab/shared/presets.py +223 -0
- logic_lab/shared/profiling.py +125 -0
- logic_lab/shared/rk4.py +48 -0
- logic_lab/signal_processing/__init__.py +0 -0
- logic_lab/signal_processing/chladni_patterns/__init__.py +0 -0
- logic_lab/signal_processing/chladni_patterns/chladni_patterns.py +201 -0
- logic_lab/signal_processing/fourier_epicycles/__init__.py +0 -0
- logic_lab/signal_processing/fourier_epicycles/fourier_epicycles.py +217 -0
- logic_lab/signal_processing/lissajous_figures/__init__.py +0 -0
- logic_lab/signal_processing/lissajous_figures/lissajous_figures.py +243 -0
- logic_lab/signal_processing/wave_interference/__init__.py +0 -0
- logic_lab/signal_processing/wave_interference/wave_interference.py +200 -0
- logic_lab/simulation/circuit_evolution/README.md +31 -0
- logic_lab/simulation/circuit_evolution/environment/circuit/evaluator.py +81 -0
- logic_lab/simulation/circuit_evolution/experiments/design/arguments/circuit_neat.py +81 -0
- logic_lab/simulation/circuit_evolution/experiments/design/arguments/evogym_cppn.py +201 -0
- logic_lab/simulation/circuit_evolution/experiments/design/arguments/evogym_hyper.py +181 -0
- logic_lab/simulation/circuit_evolution/experiments/design/arguments/evogym_neat.py +175 -0
- logic_lab/simulation/circuit_evolution/experiments/design/arguments/maze_hyper.py +54 -0
- logic_lab/simulation/circuit_evolution/experiments/design/arguments/maze_neat.py +48 -0
- logic_lab/simulation/circuit_evolution/experiments/design/draw_circuit_neat.py +240 -0
- logic_lab/simulation/circuit_evolution/experiments/design/run_circuit_neat.py +72 -0
- logic_lab/simulation/locomotion/README.md +147 -0
- logic_lab/simulation/locomotion/environment/gym_mujoco/__init__.py +0 -0
- logic_lab/simulation/locomotion/environment/gym_mujoco/evaluator.py +387 -0
- logic_lab/simulation/locomotion/environment/gym_mujoco/make_env.py +17 -0
- logic_lab/simulation/locomotion/environment/gym_mujoco/structural_bd.py +107 -0
- logic_lab/simulation/locomotion/experiments/me_neat_controller/arguments/locomotion_me_neat.py +68 -0
- logic_lab/simulation/locomotion/experiments/me_neat_controller/draw_locomotion_me_neat.py +242 -0
- logic_lab/simulation/locomotion/experiments/me_neat_controller/run_locomotion_me_neat.py +112 -0
- logic_lab/simulation/locomotion/experiments/neat_controller/arguments/locomotion_neat.py +32 -0
- logic_lab/simulation/locomotion/experiments/neat_controller/draw_locomotion_neat.py +181 -0
- logic_lab/simulation/locomotion/experiments/neat_controller/run_locomotion_neat.py +79 -0
- logic_lab/simulation/locomotion/experiments/ns_neat_controller/README.md +54 -0
- logic_lab/simulation/locomotion/experiments/ns_neat_controller/arguments/locomotion_ns_neat.py +52 -0
- logic_lab/simulation/locomotion/experiments/ns_neat_controller/draw_locomotion_ns_neat.py +187 -0
- logic_lab/simulation/locomotion/experiments/ns_neat_controller/run_locomotion_ns_neat.py +88 -0
- logic_lab/simulation/locomotion/experiments/poet_terrain/README.md +123 -0
- logic_lab/simulation/locomotion/experiments/poet_terrain/arguments/locomotion_poet.py +31 -0
- logic_lab/simulation/locomotion/experiments/poet_terrain/draw_locomotion_poet.py +246 -0
- logic_lab/simulation/locomotion/experiments/poet_terrain/run_locomotion_poet.py +298 -0
- logic_lab/simulation/maze_systems/README.md +48 -0
- logic_lab/simulation/maze_systems/environment/maze/cppn_decoder.py +17 -0
- logic_lab/simulation/maze_systems/environment/maze/evaluator.py +52 -0
- logic_lab/simulation/maze_systems/environment/maze/maze_drawer.py +239 -0
- logic_lab/simulation/maze_systems/environment/maze/maze_environment_numpy.py +252 -0
- logic_lab/simulation/maze_systems/environment/maze/maze_genome.py +416 -0
- logic_lab/simulation/maze_systems/environment/maze/maze_genome_decoder.py +463 -0
- logic_lab/simulation/maze_systems/environment/maze/substrate.py +204 -0
- logic_lab/simulation/maze_systems/experiments/coevolution/arguments/maze_mcc.py +213 -0
- logic_lab/simulation/maze_systems/experiments/coevolution/bootstrap_maze_mcc.py +163 -0
- logic_lab/simulation/maze_systems/experiments/coevolution/draw_maze_mcc.py +207 -0
- logic_lab/simulation/maze_systems/experiments/coevolution/run_maze_mcc.py +136 -0
- logic_lab/simulation/maze_systems/experiments/control/arguments/maze_neat.py +48 -0
- logic_lab/simulation/maze_systems/experiments/control/run_maze_neat.py +76 -0
- logic_lab/simulation/maze_systems/experiments/novelty_search/arguments/maze_ns_neat.py +66 -0
- logic_lab/simulation/maze_systems/experiments/novelty_search/run_maze_ns_neat.py +81 -0
- logic_lab/simulation/random_walk/README.md +7 -0
- logic_lab/simulation/random_walk/__init__.py +1 -0
- logic_lab/simulation/random_walk/random_walk.py +41 -0
- logic_lab/steering_behaviors/arrive/README.md +8 -0
- logic_lab/steering_behaviors/arrive/__init__.py +0 -0
- logic_lab/steering_behaviors/arrive/arrive.py +98 -0
- logic_lab/steering_behaviors/attraction_behaviors/README.md +9 -0
- logic_lab/steering_behaviors/attraction_behaviors/__init__.py +0 -0
- logic_lab/steering_behaviors/attraction_behaviors/attraction_behaviors.py +133 -0
- logic_lab/steering_behaviors/creature_sensors/README.md +58 -0
- logic_lab/steering_behaviors/creature_sensors/creature_sensors.py +117 -0
- logic_lab/steering_behaviors/crowd_path_following/README.md +10 -0
- logic_lab/steering_behaviors/crowd_path_following/__init__.py +0 -0
- logic_lab/steering_behaviors/crowd_path_following/crowd_path_following.py +215 -0
- logic_lab/steering_behaviors/curl_noise_vines/README.md +15 -0
- logic_lab/steering_behaviors/curl_noise_vines/curl_noise_vines.py +153 -0
- logic_lab/steering_behaviors/flocking/README.md +9 -0
- logic_lab/steering_behaviors/flocking/__init__.py +0 -0
- logic_lab/steering_behaviors/flocking/flocking.py +171 -0
- logic_lab/steering_behaviors/flocking_with_binning/README.md +10 -0
- logic_lab/steering_behaviors/flocking_with_binning/__init__.py +0 -0
- logic_lab/steering_behaviors/flocking_with_binning/flocking_with_binning.py +218 -0
- logic_lab/steering_behaviors/flow_field/README.md +10 -0
- logic_lab/steering_behaviors/flow_field/__init__.py +0 -0
- logic_lab/steering_behaviors/flow_field/flow_field.py +153 -0
- logic_lab/steering_behaviors/flowlines/README.md +32 -0
- logic_lab/steering_behaviors/flowlines/flowlines.py +104 -0
- logic_lab/steering_behaviors/gesture_classifier/README.md +40 -0
- logic_lab/steering_behaviors/gesture_classifier/gesture_classifier.py +194 -0
- logic_lab/steering_behaviors/ivy_wall_growth/README.md +15 -0
- logic_lab/steering_behaviors/ivy_wall_growth/ivy_wall_growth.py +208 -0
- logic_lab/steering_behaviors/neuro_evolution_steering_seek/README.md +71 -0
- logic_lab/steering_behaviors/neuro_evolution_steering_seek/neuro_evolution_steering_seek.py +300 -0
- logic_lab/steering_behaviors/neuroevolution_ecosystem/README.md +82 -0
- logic_lab/steering_behaviors/neuroevolution_ecosystem/neuroevolution_ecosystem.py +292 -0
- logic_lab/steering_behaviors/path_following/README.md +10 -0
- logic_lab/steering_behaviors/path_following/__init__.py +0 -0
- logic_lab/steering_behaviors/path_following/path_following.py +207 -0
- logic_lab/steering_behaviors/path_following_simple/README.md +9 -0
- logic_lab/steering_behaviors/path_following_simple/__init__.py +0 -0
- logic_lab/steering_behaviors/path_following_simple/path_following_simple.py +166 -0
- logic_lab/steering_behaviors/perceptron_with_normalization/README.md +40 -0
- logic_lab/steering_behaviors/perceptron_with_normalization/perceptron_with_normalization.py +105 -0
- logic_lab/steering_behaviors/pursuit_behavior/README.md +9 -0
- logic_lab/steering_behaviors/pursuit_behavior/__init__.py +0 -0
- logic_lab/steering_behaviors/pursuit_behavior/pursuit_behavior.py +123 -0
- logic_lab/steering_behaviors/seek/README.md +8 -0
- logic_lab/steering_behaviors/seek/__init__.py +0 -0
- logic_lab/steering_behaviors/seek/seek.py +86 -0
- logic_lab/steering_behaviors/separation/README.md +9 -0
- logic_lab/steering_behaviors/separation/__init__.py +0 -0
- logic_lab/steering_behaviors/separation/separation.py +98 -0
- logic_lab/steering_behaviors/separation_and_seek/README.md +8 -0
- logic_lab/steering_behaviors/separation_and_seek/__init__.py +0 -0
- logic_lab/steering_behaviors/separation_and_seek/separation_and_seek.py +114 -0
- logic_lab/steering_behaviors/stay_within_walls/README.md +9 -0
- logic_lab/steering_behaviors/stay_within_walls/__init__.py +0 -0
- logic_lab/steering_behaviors/stay_within_walls/stay_within_walls.py +102 -0
- logic_lab/steering_behaviors/wander_behavior/README.md +9 -0
- logic_lab/steering_behaviors/wander_behavior/__init__.py +0 -0
- logic_lab/steering_behaviors/wander_behavior/wander_behavior.py +137 -0
- logic_lab/swarm_intelligence/__init__.py +7 -0
- logic_lab/swarm_intelligence/ant_colony_pheromone/README.md +11 -0
- logic_lab/swarm_intelligence/ant_colony_pheromone/__init__.py +0 -0
- logic_lab/swarm_intelligence/ant_colony_pheromone/ant_colony_pheromone.py +213 -0
- logic_lab/swarm_intelligence/bee_foraging/README.md +11 -0
- logic_lab/swarm_intelligence/bee_foraging/__init__.py +9 -0
- logic_lab/swarm_intelligence/bee_foraging/bee_foraging.py +446 -0
- logic_lab/swarm_intelligence/particle_swarm_optimization/__init__.py +0 -0
- logic_lab/swarm_intelligence/particle_swarm_optimization/particle_swarm_optimization.py +242 -0
- logic_lab/swarm_intelligence/predator_prey_flocking/README.md +11 -0
- logic_lab/swarm_intelligence/predator_prey_flocking/__init__.py +0 -0
- logic_lab/swarm_intelligence/predator_prey_flocking/predator_prey_flocking.py +282 -0
- logic_lab/three_dimensional/__init__.py +4 -0
- logic_lab/three_dimensional/lorenz_strands/__init__.py +0 -0
- logic_lab/three_dimensional/lorenz_strands/lorenz_strands.py +221 -0
- logic_lab/three_dimensional/lsystem_3d/README.md +11 -0
- logic_lab/three_dimensional/lsystem_3d/__init__.py +0 -0
- logic_lab/three_dimensional/lsystem_3d/lsystem_3d.py +221 -0
- logic_lab/three_dimensional/metaballs/README.md +142 -0
- logic_lab/three_dimensional/metaballs/__init__.py +1 -0
- logic_lab/three_dimensional/metaballs/metaballs.py +220 -0
- logic_lab/three_dimensional/metaballs_3d/README.md +11 -0
- logic_lab/three_dimensional/metaballs_3d/__init__.py +5 -0
- logic_lab/three_dimensional/metaballs_3d/metaballs_3d.py +346 -0
- logic_lab/three_dimensional/point_cloud_morph/README.md +11 -0
- logic_lab/three_dimensional/point_cloud_morph/__init__.py +0 -0
- logic_lab/three_dimensional/point_cloud_morph/point_cloud_morph.py +195 -0
- logic_lab/three_dimensional/volumetric_fog/README.md +11 -0
- logic_lab/three_dimensional/volumetric_fog/__init__.py +0 -0
- logic_lab/three_dimensional/volumetric_fog/volumetric_fog.py +215 -0
- logic_lab/tiling_patterns/aperiodic_helpers.py +152 -0
- logic_lab/tiling_patterns/deformation_helpers.py +173 -0
- logic_lab/tiling_patterns/dihedral_group/README.md +14 -0
- logic_lab/tiling_patterns/dihedral_group/dihedral_group.py +68 -0
- logic_lab/tiling_patterns/fibonacci_word/README.md +8 -0
- logic_lab/tiling_patterns/fibonacci_word/fibonacci_word.py +56 -0
- logic_lab/tiling_patterns/fundamental_domain/README.md +14 -0
- logic_lab/tiling_patterns/fundamental_domain/fundamental_domain.py +53 -0
- logic_lab/tiling_patterns/hex_rhomb/README.md +8 -0
- logic_lab/tiling_patterns/hex_rhomb/hex_rhomb.py +69 -0
- logic_lab/tiling_patterns/hex_tiling/README.md +9 -0
- logic_lab/tiling_patterns/hex_tiling/hex_tiling.py +66 -0
- logic_lab/tiling_patterns/ih01_deformation/README.md +9 -0
- logic_lab/tiling_patterns/ih01_deformation/ih01_deformation.py +48 -0
- logic_lab/tiling_patterns/ih01_koch/README.md +9 -0
- logic_lab/tiling_patterns/ih01_koch/ih01_koch.py +59 -0
- logic_lab/tiling_patterns/ih02_deformation/README.md +9 -0
- logic_lab/tiling_patterns/ih02_deformation/ih02_deformation.py +50 -0
- logic_lab/tiling_patterns/ih02_tv08/README.md +9 -0
- logic_lab/tiling_patterns/ih02_tv08/ih02_tv08.py +76 -0
- logic_lab/tiling_patterns/ih02_tv08_koch/README.md +9 -0
- logic_lab/tiling_patterns/ih02_tv08_koch/ih02_tv08_koch.py +89 -0
- logic_lab/tiling_patterns/ih41_deformation/README.md +9 -0
- logic_lab/tiling_patterns/ih41_deformation/ih41_deformation.py +48 -0
- logic_lab/tiling_patterns/ih41_koch/README.md +9 -0
- logic_lab/tiling_patterns/ih41_koch/ih41_koch.py +59 -0
- logic_lab/tiling_patterns/islamic_geometric/README.md +11 -0
- logic_lab/tiling_patterns/islamic_geometric/islamic_geometric.py +50 -0
- logic_lab/tiling_patterns/matrix_calculator/README.md +7 -0
- logic_lab/tiling_patterns/matrix_calculator/matrix_calculator.py +31 -0
- logic_lab/tiling_patterns/p31m_pattern/README.md +8 -0
- logic_lab/tiling_patterns/p31m_pattern/p31m_pattern.py +115 -0
- logic_lab/tiling_patterns/p3_pattern/README.md +8 -0
- logic_lab/tiling_patterns/p3_pattern/p3_pattern.py +79 -0
- logic_lab/tiling_patterns/p3m1_pattern/README.md +8 -0
- logic_lab/tiling_patterns/p3m1_pattern/p3m1_pattern.py +92 -0
- logic_lab/tiling_patterns/p6_pattern/README.md +8 -0
- logic_lab/tiling_patterns/p6_pattern/p6_pattern.py +78 -0
- logic_lab/tiling_patterns/p6m_pattern/README.md +8 -0
- logic_lab/tiling_patterns/p6m_pattern/p6m_pattern.py +78 -0
- logic_lab/tiling_patterns/pattern_helpers.py +49 -0
- logic_lab/tiling_patterns/penrose_tiling/README.md +15 -0
- logic_lab/tiling_patterns/penrose_tiling/__init__.py +0 -0
- logic_lab/tiling_patterns/penrose_tiling/penrose_tiling.py +130 -0
- logic_lab/tiling_patterns/pinwheel_tiling/README.md +11 -0
- logic_lab/tiling_patterns/pinwheel_tiling/pinwheel_tiling.py +51 -0
- logic_lab/tiling_patterns/pythagoras_periodic/README.md +13 -0
- logic_lab/tiling_patterns/pythagoras_periodic/pythagoras_periodic.py +121 -0
- logic_lab/tiling_patterns/recur_pentagon/README.md +8 -0
- logic_lab/tiling_patterns/recur_pentagon/recur_pentagon.py +59 -0
- logic_lab/tiling_patterns/recur_triangle/README.md +8 -0
- logic_lab/tiling_patterns/recur_triangle/recur_triangle.py +67 -0
- logic_lab/tiling_patterns/rep_tiles/README.md +11 -0
- logic_lab/tiling_patterns/rep_tiles/rep_tiles.py +47 -0
- logic_lab/tiling_patterns/square_tiling/README.md +9 -0
- logic_lab/tiling_patterns/square_tiling/square_tiling.py +55 -0
- logic_lab/tiling_patterns/square_triangle_periodic/README.md +8 -0
- logic_lab/tiling_patterns/square_triangle_periodic/square_triangle_periodic.py +88 -0
- logic_lab/tiling_patterns/symmetric_shape/README.md +9 -0
- logic_lab/tiling_patterns/symmetric_shape/symmetric_shape.py +63 -0
- logic_lab/tiling_patterns/textile_generator/README.md +9 -0
- logic_lab/tiling_patterns/textile_generator/textile_generator.py +91 -0
- logic_lab/tiling_patterns/textile_repeater/README.md +13 -0
- logic_lab/tiling_patterns/textile_repeater/textile_repeater.py +125 -0
- logic_lab/tiling_patterns/triangle_tiling/README.md +9 -0
- logic_lab/tiling_patterns/triangle_tiling/triangle_tiling.py +75 -0
- logic_lab/tiling_patterns/triangular_spiral/README.md +8 -0
- logic_lab/tiling_patterns/triangular_spiral/triangular_spiral.py +46 -0
- logic_lab/tiling_patterns/truchet_tiling/README.md +11 -0
- logic_lab/tiling_patterns/truchet_tiling/truchet_tiling.py +81 -0
- logic_lab/tiling_patterns/tv08_deformation/README.md +9 -0
- logic_lab/tiling_patterns/tv08_deformation/tv08_deformation.py +75 -0
- logic_lab/tiling_patterns/wave_function_collapse/README.md +47 -0
- logic_lab/tiling_patterns/wave_function_collapse/__init__.py +0 -0
- logic_lab/tiling_patterns/wave_function_collapse/wave_function_collapse.py +221 -0
- logic_lab/topology/__init__.py +0 -0
- logic_lab/topology/hopf_fibration/__init__.py +0 -0
- logic_lab/topology/hopf_fibration/hopf_fibration.py +165 -0
- logic_lab/topology/klein_bottle/__init__.py +0 -0
- logic_lab/topology/klein_bottle/klein_bottle.py +211 -0
- logic_lab/topology/mobius_strip/__init__.py +0 -0
- logic_lab/topology/mobius_strip/mobius_strip.py +211 -0
- logic_lab/topology/torus_knot/__init__.py +0 -0
- logic_lab/topology/torus_knot/torus_knot.py +138 -0
- logic_lab-0.4.0.dist-info/METADATA +303 -0
- logic_lab-0.4.0.dist-info/RECORD +1139 -0
- logic_lab-0.4.0.dist-info/WHEEL +4 -0
- logic_lab-0.4.0.dist-info/entry_points.txt +2 -0
- logic_lab-0.4.0.dist-info/licenses/LICENSE +21 -0
logic_lab/__init__.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Logic Lab - Creative coding algorithms and simulations using py5.
|
|
3
|
+
|
|
4
|
+
A comprehensive collection of generative art algorithms organized by domain:
|
|
5
|
+
physics, steering behaviors, genetic algorithms, neural networks, fractals,
|
|
6
|
+
cellular automata, tiling patterns, and mathematical systems.
|
|
7
|
+
|
|
8
|
+
All simulations are interactive and can be run with py5. The MCP server
|
|
9
|
+
provides AI agent access to algorithm references and implementations.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
__version__ = "0.4.0"
|
|
13
|
+
__author__ = "Asami Kakuishi"
|
|
14
|
+
__email__ = "asami@asami.tokyo"
|
|
15
|
+
|
|
16
|
+
__all__ = ["version"]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Audio-Reactive Particles
|
|
2
|
+
|
|
3
|
+
Real-time visualization of audio frequencies through particles that spawn and animate in response to bass, mid, and high-frequency content from microphone input or simulated audio.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
uv run python src/logic_lab/audio_sync/audio_reactive_particles/audio_reactive_particles.py
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Press `m` to toggle between microphone input and demo mode, `s` to save a screenshot, `r` to reset, or `SPACE` to pause.
|
|
10
|
+
|
|
11
|
+
The system analyzes audio frequencies using FFT, mapping bass to explosion radius, mid-frequencies to spawn rate, and high frequencies to color shifts (blue → purple → pink).
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Audio-Reactive Particles - Frequency-driven particle visualization system."""
|
|
2
|
+
|
|
3
|
+
from .audio_reactive_particles import (
|
|
4
|
+
HAS_SOUNDDEVICE,
|
|
5
|
+
AudioCapture,
|
|
6
|
+
AudioParticle,
|
|
7
|
+
AudioReactiveField,
|
|
8
|
+
SpectrumBand,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"HAS_SOUNDDEVICE",
|
|
13
|
+
"AudioParticle",
|
|
14
|
+
"SpectrumBand",
|
|
15
|
+
"AudioCapture",
|
|
16
|
+
"AudioReactiveField",
|
|
17
|
+
]
|
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
"""Audio-reactive particles system with frequency-driven visualization.
|
|
2
|
+
|
|
3
|
+
This module provides real-time audio visualization through particle systems
|
|
4
|
+
that react to different frequency bands (bass, mid, high) from audio input.
|
|
5
|
+
When sounddevice is not available, it gracefully falls back to demo mode
|
|
6
|
+
with simulated audio signals.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import math
|
|
10
|
+
import threading
|
|
11
|
+
import time
|
|
12
|
+
from dataclasses import dataclass, field
|
|
13
|
+
from typing import Optional
|
|
14
|
+
|
|
15
|
+
import numpy as np
|
|
16
|
+
import py5
|
|
17
|
+
|
|
18
|
+
try:
|
|
19
|
+
import sounddevice as sd
|
|
20
|
+
|
|
21
|
+
HAS_SOUNDDEVICE = True
|
|
22
|
+
except ImportError:
|
|
23
|
+
HAS_SOUNDDEVICE = False
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@dataclass
|
|
27
|
+
class AudioParticle:
|
|
28
|
+
"""A single particle in the audio-reactive system.
|
|
29
|
+
|
|
30
|
+
Attributes:
|
|
31
|
+
x: Horizontal position (0-width)
|
|
32
|
+
y: Vertical position (0-height)
|
|
33
|
+
vx: Horizontal velocity
|
|
34
|
+
vy: Vertical velocity
|
|
35
|
+
life: Lifetime from 0 (dead) to 1 (newborn)
|
|
36
|
+
color: RGB color tuple (0-255)
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
x: float
|
|
40
|
+
y: float
|
|
41
|
+
vx: float
|
|
42
|
+
vy: float
|
|
43
|
+
life: float
|
|
44
|
+
color: tuple[int, int, int]
|
|
45
|
+
|
|
46
|
+
def update(self, gravity: float = 0.98) -> None:
|
|
47
|
+
"""Update particle position and apply physics.
|
|
48
|
+
|
|
49
|
+
Args:
|
|
50
|
+
gravity: Velocity damping factor per frame
|
|
51
|
+
"""
|
|
52
|
+
self.x += self.vx
|
|
53
|
+
self.y += self.vy
|
|
54
|
+
self.vx *= gravity
|
|
55
|
+
self.vy *= gravity
|
|
56
|
+
self.life -= 0.02
|
|
57
|
+
|
|
58
|
+
def is_alive(self) -> bool:
|
|
59
|
+
"""Check if particle is still active."""
|
|
60
|
+
return self.life > 0
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@dataclass
|
|
64
|
+
class SpectrumBand:
|
|
65
|
+
"""Normalized frequency spectrum bands.
|
|
66
|
+
|
|
67
|
+
Attributes:
|
|
68
|
+
bass: Energy in 0-300Hz range (0-1)
|
|
69
|
+
mid: Energy in 300-3000Hz range (0-1)
|
|
70
|
+
high: Energy in 3000Hz+ range (0-1)
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
bass: float = 0.0
|
|
74
|
+
mid: float = 0.0
|
|
75
|
+
high: float = 0.0
|
|
76
|
+
|
|
77
|
+
def normalize(self) -> None:
|
|
78
|
+
"""Normalize bands to sum to 1 (within tolerance)."""
|
|
79
|
+
total = self.bass + self.mid + self.high
|
|
80
|
+
if total > 1e-9:
|
|
81
|
+
self.bass /= total
|
|
82
|
+
self.mid /= total
|
|
83
|
+
self.high /= total
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class AudioCapture:
|
|
87
|
+
"""Captures audio from microphone and computes FFT spectrum.
|
|
88
|
+
|
|
89
|
+
This class manages audio input and frequency analysis. It runs
|
|
90
|
+
audio capture in a background thread and provides thread-safe
|
|
91
|
+
access to the current spectrum.
|
|
92
|
+
|
|
93
|
+
Attributes:
|
|
94
|
+
sample_rate: Sample rate in Hz (default 22050)
|
|
95
|
+
chunk_size: Audio chunk size (default 1024)
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
def __init__(self, sample_rate: int = 22050, chunk_size: int = 1024):
|
|
99
|
+
"""Initialize audio capture.
|
|
100
|
+
|
|
101
|
+
Args:
|
|
102
|
+
sample_rate: Audio sample rate in Hz
|
|
103
|
+
chunk_size: Number of samples per chunk
|
|
104
|
+
"""
|
|
105
|
+
self.sample_rate = sample_rate
|
|
106
|
+
self.chunk_size = chunk_size
|
|
107
|
+
self.is_active = False
|
|
108
|
+
self.stream: sd.InputStream | None = None
|
|
109
|
+
|
|
110
|
+
self._spectrum_lock = threading.Lock()
|
|
111
|
+
self._current_spectrum = SpectrumBand()
|
|
112
|
+
self._audio_buffer: list[np.ndarray] = []
|
|
113
|
+
|
|
114
|
+
def start(self) -> None:
|
|
115
|
+
"""Start capturing audio from microphone."""
|
|
116
|
+
if not HAS_SOUNDDEVICE:
|
|
117
|
+
return
|
|
118
|
+
|
|
119
|
+
if self.is_active:
|
|
120
|
+
return
|
|
121
|
+
|
|
122
|
+
self.is_active = True
|
|
123
|
+
self.stream = sd.InputStream(
|
|
124
|
+
channels=1,
|
|
125
|
+
samplerate=self.sample_rate,
|
|
126
|
+
blocksize=self.chunk_size,
|
|
127
|
+
callback=self._audio_callback,
|
|
128
|
+
dtype=np.float32,
|
|
129
|
+
)
|
|
130
|
+
self.stream.start()
|
|
131
|
+
|
|
132
|
+
def stop(self) -> None:
|
|
133
|
+
"""Stop capturing audio."""
|
|
134
|
+
self.is_active = False
|
|
135
|
+
if self.stream is not None:
|
|
136
|
+
self.stream.stop()
|
|
137
|
+
self.stream.close()
|
|
138
|
+
self.stream = None
|
|
139
|
+
|
|
140
|
+
def _audio_callback(self, indata: np.ndarray, frames: int, time_info, status) -> None:
|
|
141
|
+
"""Callback for audio stream processing."""
|
|
142
|
+
if status:
|
|
143
|
+
return
|
|
144
|
+
|
|
145
|
+
audio_data = indata[:, 0].copy().astype(np.float32)
|
|
146
|
+
self._process_spectrum(audio_data)
|
|
147
|
+
|
|
148
|
+
def _process_spectrum(self, audio_data: np.ndarray) -> None:
|
|
149
|
+
"""Compute FFT and extract frequency bands."""
|
|
150
|
+
# Compute FFT
|
|
151
|
+
spectrum = np.abs(np.fft.rfft(audio_data))
|
|
152
|
+
freqs = np.fft.rfftfreq(len(audio_data), 1 / self.sample_rate)
|
|
153
|
+
|
|
154
|
+
# Extract frequency bands
|
|
155
|
+
bass_mask = freqs < 300
|
|
156
|
+
mid_mask = (freqs >= 300) & (freqs < 3000)
|
|
157
|
+
high_mask = freqs >= 3000
|
|
158
|
+
|
|
159
|
+
bass_energy = spectrum[bass_mask].sum()
|
|
160
|
+
mid_energy = spectrum[mid_mask].sum()
|
|
161
|
+
high_energy = spectrum[high_mask].sum()
|
|
162
|
+
|
|
163
|
+
# Normalize
|
|
164
|
+
total = bass_energy + mid_energy + high_energy
|
|
165
|
+
if total > 1e-9:
|
|
166
|
+
bass = bass_energy / total
|
|
167
|
+
mid = mid_energy / total
|
|
168
|
+
high = high_energy / total
|
|
169
|
+
else:
|
|
170
|
+
bass = mid = high = 0.0
|
|
171
|
+
|
|
172
|
+
with self._spectrum_lock:
|
|
173
|
+
self._current_spectrum.bass = bass
|
|
174
|
+
self._current_spectrum.mid = mid
|
|
175
|
+
self._current_spectrum.high = high
|
|
176
|
+
|
|
177
|
+
def get_spectrum(self) -> SpectrumBand:
|
|
178
|
+
"""Get current spectrum bands (thread-safe).
|
|
179
|
+
|
|
180
|
+
Returns:
|
|
181
|
+
SpectrumBand with normalized frequency data
|
|
182
|
+
"""
|
|
183
|
+
with self._spectrum_lock:
|
|
184
|
+
return SpectrumBand(
|
|
185
|
+
bass=self._current_spectrum.bass,
|
|
186
|
+
mid=self._current_spectrum.mid,
|
|
187
|
+
high=self._current_spectrum.high,
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
class AudioReactiveField:
|
|
192
|
+
"""Main audio-reactive particle system.
|
|
193
|
+
|
|
194
|
+
This class manages particles and responds to audio input. It can run
|
|
195
|
+
in real-time mode (with microphone) or demo mode (with simulated audio).
|
|
196
|
+
|
|
197
|
+
Attributes:
|
|
198
|
+
particles: List of active particles
|
|
199
|
+
capture: AudioCapture instance (None if running in demo mode)
|
|
200
|
+
demo_mode: True if running without audio input
|
|
201
|
+
"""
|
|
202
|
+
|
|
203
|
+
def __init__(self, width: int = 800, height: int = 600):
|
|
204
|
+
"""Initialize the audio-reactive field.
|
|
205
|
+
|
|
206
|
+
Args:
|
|
207
|
+
width: Canvas width
|
|
208
|
+
height: Canvas height
|
|
209
|
+
"""
|
|
210
|
+
self.width = width
|
|
211
|
+
self.height = height
|
|
212
|
+
self.particles: list[AudioParticle] = []
|
|
213
|
+
|
|
214
|
+
# Initialize audio capture
|
|
215
|
+
self.capture: AudioCapture | None = None
|
|
216
|
+
self.demo_mode = not HAS_SOUNDDEVICE
|
|
217
|
+
|
|
218
|
+
if HAS_SOUNDDEVICE:
|
|
219
|
+
self.capture = AudioCapture()
|
|
220
|
+
self.capture.start()
|
|
221
|
+
else:
|
|
222
|
+
print("sounddeviceなし。デモモードで実行します")
|
|
223
|
+
|
|
224
|
+
# Demo mode simulation
|
|
225
|
+
self.demo_time = 0.0
|
|
226
|
+
self.paused = False
|
|
227
|
+
self.bg_color = 10
|
|
228
|
+
|
|
229
|
+
def get_spectrum(self) -> SpectrumBand:
|
|
230
|
+
"""Get current audio spectrum.
|
|
231
|
+
|
|
232
|
+
Returns:
|
|
233
|
+
SpectrumBand with frequency data (real or simulated)
|
|
234
|
+
"""
|
|
235
|
+
if not self.demo_mode and self.capture is not None:
|
|
236
|
+
return self.capture.get_spectrum()
|
|
237
|
+
|
|
238
|
+
# Demo mode: simulate periodic audio
|
|
239
|
+
self.demo_time += 0.016 # ~60fps
|
|
240
|
+
bass = (math.sin(self.demo_time * 2) * 0.5 + 0.5) * 0.8
|
|
241
|
+
mid = (math.sin(self.demo_time * 4) * 0.3 + 0.3) * 0.6
|
|
242
|
+
high = (math.sin(self.demo_time * 8) * 0.3 + 0.3) * 0.6
|
|
243
|
+
|
|
244
|
+
spectrum = SpectrumBand(bass=bass, mid=mid, high=high)
|
|
245
|
+
spectrum.normalize()
|
|
246
|
+
return spectrum
|
|
247
|
+
|
|
248
|
+
def update(self) -> None:
|
|
249
|
+
"""Update all particles and spawn new ones based on audio."""
|
|
250
|
+
if self.paused:
|
|
251
|
+
return
|
|
252
|
+
|
|
253
|
+
spectrum = self.get_spectrum()
|
|
254
|
+
|
|
255
|
+
# Update background based on bass
|
|
256
|
+
self.bg_color = int(10 + spectrum.bass * 40)
|
|
257
|
+
|
|
258
|
+
# Spawn new particles based on mid frequencies
|
|
259
|
+
spawn_count = 2 + int(spectrum.mid * 8)
|
|
260
|
+
self._spawn_particles(spawn_count, spectrum)
|
|
261
|
+
|
|
262
|
+
# Update existing particles
|
|
263
|
+
alive_particles = []
|
|
264
|
+
for particle in self.particles:
|
|
265
|
+
particle.update()
|
|
266
|
+
if particle.is_alive():
|
|
267
|
+
alive_particles.append(particle)
|
|
268
|
+
|
|
269
|
+
self.particles = alive_particles
|
|
270
|
+
|
|
271
|
+
def _spawn_particles(self, count: int, spectrum: SpectrumBand) -> None:
|
|
272
|
+
"""Spawn new particles at center.
|
|
273
|
+
|
|
274
|
+
Args:
|
|
275
|
+
count: Number of particles to spawn
|
|
276
|
+
spectrum: Current spectrum for color control
|
|
277
|
+
"""
|
|
278
|
+
center_x = self.width / 2
|
|
279
|
+
center_y = self.height / 2
|
|
280
|
+
|
|
281
|
+
# Explosion radius based on bass
|
|
282
|
+
radius = 100 + spectrum.bass * 200
|
|
283
|
+
|
|
284
|
+
for _ in range(count):
|
|
285
|
+
angle = np.random.uniform(0, 2 * math.pi)
|
|
286
|
+
speed = np.random.uniform(1, 4)
|
|
287
|
+
|
|
288
|
+
vx = math.cos(angle) * speed
|
|
289
|
+
vy = math.sin(angle) * speed
|
|
290
|
+
|
|
291
|
+
# Color shift based on high frequencies
|
|
292
|
+
# Blue -> Purple -> Pink
|
|
293
|
+
hue_shift = spectrum.high * 120
|
|
294
|
+
if hue_shift < 60:
|
|
295
|
+
# Blue to Purple
|
|
296
|
+
r = int(100 + hue_shift)
|
|
297
|
+
g = int(100 - hue_shift * 0.5)
|
|
298
|
+
b = 200
|
|
299
|
+
else:
|
|
300
|
+
# Purple to Pink
|
|
301
|
+
r = 200
|
|
302
|
+
g = int(100 - (hue_shift - 60) * 0.5)
|
|
303
|
+
b = int(200 - (hue_shift - 60))
|
|
304
|
+
|
|
305
|
+
particle = AudioParticle(
|
|
306
|
+
x=center_x,
|
|
307
|
+
y=center_y,
|
|
308
|
+
vx=vx,
|
|
309
|
+
vy=vy,
|
|
310
|
+
life=1.0,
|
|
311
|
+
color=(max(0, min(255, r)), max(0, min(255, g)), max(0, min(255, b))),
|
|
312
|
+
)
|
|
313
|
+
self.particles.append(particle)
|
|
314
|
+
|
|
315
|
+
def reset(self) -> None:
|
|
316
|
+
"""Clear all particles."""
|
|
317
|
+
self.particles.clear()
|
|
318
|
+
self.demo_time = 0.0
|
|
319
|
+
|
|
320
|
+
def toggle_demo_mode(self) -> None:
|
|
321
|
+
"""Toggle between demo and real audio mode."""
|
|
322
|
+
if not HAS_SOUNDDEVICE:
|
|
323
|
+
return
|
|
324
|
+
|
|
325
|
+
self.demo_mode = not self.demo_mode
|
|
326
|
+
if self.demo_mode:
|
|
327
|
+
if self.capture is not None:
|
|
328
|
+
self.capture.stop()
|
|
329
|
+
else:
|
|
330
|
+
if self.capture is not None:
|
|
331
|
+
self.capture.start()
|
|
332
|
+
|
|
333
|
+
def toggle_pause(self) -> None:
|
|
334
|
+
"""Toggle pause/resume."""
|
|
335
|
+
self.paused = not self.paused
|
|
336
|
+
|
|
337
|
+
def cleanup(self) -> None:
|
|
338
|
+
"""Clean up audio resources."""
|
|
339
|
+
if self.capture is not None:
|
|
340
|
+
self.capture.stop()
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
# Global field instance for py5 sketch
|
|
344
|
+
audio_field: AudioReactiveField | None = None
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
def setup() -> None:
|
|
348
|
+
"""Initialize the sketch."""
|
|
349
|
+
global audio_field
|
|
350
|
+
py5.size(1000, 800)
|
|
351
|
+
py5.smooth()
|
|
352
|
+
py5.background(0)
|
|
353
|
+
audio_field = AudioReactiveField(width=1000, height=800)
|
|
354
|
+
print(f"Demo mode: {audio_field.demo_mode}")
|
|
355
|
+
print("Controls: m=mode, s=screenshot, r=reset, SPACE=pause, q=quit")
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
def draw() -> None:
|
|
359
|
+
"""Main animation loop."""
|
|
360
|
+
if audio_field is None:
|
|
361
|
+
return
|
|
362
|
+
|
|
363
|
+
audio_field.update()
|
|
364
|
+
py5.background(audio_field.bg_color)
|
|
365
|
+
|
|
366
|
+
for particle in audio_field.particles:
|
|
367
|
+
alpha = int(particle.life * 255)
|
|
368
|
+
py5.fill(*particle.color, alpha)
|
|
369
|
+
py5.no_stroke()
|
|
370
|
+
py5.circle(particle.x, particle.y, 4)
|
|
371
|
+
|
|
372
|
+
py5.fill(200)
|
|
373
|
+
py5.text_size(11)
|
|
374
|
+
py5.text(f"FPS: {py5.get_frame_rate():.1f}", 10, 20)
|
|
375
|
+
py5.text(f"Particles: {len(audio_field.particles)}", 10, 35)
|
|
376
|
+
mode = "Demo" if audio_field.demo_mode else "Mic"
|
|
377
|
+
py5.text(f"Mode: {mode} (m to toggle)", 10, 50)
|
|
378
|
+
py5.text("s=screenshot, r=reset, SPACE=pause", 10, py5.height - 10)
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
def key_pressed() -> None:
|
|
382
|
+
"""Handle key presses."""
|
|
383
|
+
if audio_field is None:
|
|
384
|
+
return
|
|
385
|
+
|
|
386
|
+
key = py5.key
|
|
387
|
+
|
|
388
|
+
if key == "s":
|
|
389
|
+
filename = f"audio_reactive_{py5.frame_count:05d}.png"
|
|
390
|
+
py5.save_frame(filename)
|
|
391
|
+
print(f"Screenshot saved: {filename}")
|
|
392
|
+
|
|
393
|
+
elif key == "m":
|
|
394
|
+
audio_field.toggle_mode()
|
|
395
|
+
|
|
396
|
+
elif key == "r":
|
|
397
|
+
audio_field.particles.clear()
|
|
398
|
+
|
|
399
|
+
elif key == " ":
|
|
400
|
+
audio_field.toggle_pause()
|
|
401
|
+
|
|
402
|
+
elif key == "q":
|
|
403
|
+
py5.exit_sketch()
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
if __name__ == "__main__":
|
|
407
|
+
py5.run_sketch()
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"""Example visualization of audio-reactive particles.
|
|
2
|
+
|
|
3
|
+
This example demonstrates interactive audio-reactive visualization that responds
|
|
4
|
+
to microphone input (or simulated audio in demo mode).
|
|
5
|
+
|
|
6
|
+
Controls:
|
|
7
|
+
m - Toggle between microphone and demo mode
|
|
8
|
+
s - Save screenshot
|
|
9
|
+
r - Reset particles
|
|
10
|
+
SPACE - Pause/Resume
|
|
11
|
+
q - Quit
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
import py5
|
|
16
|
+
except ImportError:
|
|
17
|
+
print("py5 is required for this example. Install with: pip install py5")
|
|
18
|
+
exit(1)
|
|
19
|
+
|
|
20
|
+
from logic_lab.audio_sync.audio_reactive_particles import AudioReactiveField
|
|
21
|
+
|
|
22
|
+
field: AudioReactiveField
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def setup() -> None:
|
|
26
|
+
"""Initialize the sketch."""
|
|
27
|
+
global field
|
|
28
|
+
py5.size(1000, 800)
|
|
29
|
+
py5.smooth()
|
|
30
|
+
py5.background(0)
|
|
31
|
+
field = AudioReactiveField(width=1000, height=800)
|
|
32
|
+
print(f"Demo mode: {field.demo_mode}")
|
|
33
|
+
print("Controls: m=mode, s=screenshot, r=reset, SPACE=pause, q=quit")
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def draw() -> None:
|
|
37
|
+
"""Main animation loop."""
|
|
38
|
+
# Update field
|
|
39
|
+
field.update()
|
|
40
|
+
|
|
41
|
+
# Draw background
|
|
42
|
+
py5.background(field.bg_color)
|
|
43
|
+
|
|
44
|
+
# Draw particles
|
|
45
|
+
for particle in field.particles:
|
|
46
|
+
alpha = int(particle.life * 255)
|
|
47
|
+
py5.fill(*particle.color, alpha)
|
|
48
|
+
py5.no_stroke()
|
|
49
|
+
py5.circle(particle.x, particle.y, 4)
|
|
50
|
+
|
|
51
|
+
# Draw info text
|
|
52
|
+
spectrum = field.get_spectrum()
|
|
53
|
+
py5.fill(200, 200, 200)
|
|
54
|
+
py5.text_size(12)
|
|
55
|
+
py5.text(f"Particles: {len(field.particles)}", 10, 20)
|
|
56
|
+
py5.text(f"Demo: {field.demo_mode}", 10, 40)
|
|
57
|
+
py5.text(f"Bass: {spectrum.bass:.2f}", 10, 60)
|
|
58
|
+
py5.text(f"Mid: {spectrum.mid:.2f}", 10, 80)
|
|
59
|
+
py5.text(f"High: {spectrum.high:.2f}", 10, 100)
|
|
60
|
+
py5.text(f"FPS: {py5.frame_rate:.0f}", 10, 120)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def key_pressed() -> None:
|
|
64
|
+
"""Handle keyboard input."""
|
|
65
|
+
if py5.key == "m":
|
|
66
|
+
field.toggle_demo_mode()
|
|
67
|
+
print(f"Switched to {'demo' if field.demo_mode else 'audio'} mode")
|
|
68
|
+
elif py5.key == "r":
|
|
69
|
+
field.reset()
|
|
70
|
+
print("Particles reset")
|
|
71
|
+
elif py5.key == " ":
|
|
72
|
+
field.toggle_pause()
|
|
73
|
+
print(f"{'Paused' if field.paused else 'Resumed'}")
|
|
74
|
+
elif py5.key == "s":
|
|
75
|
+
import time
|
|
76
|
+
|
|
77
|
+
filename = f"audio_particles_{int(time.time())}.png"
|
|
78
|
+
py5.save_frame(filename)
|
|
79
|
+
print(f"Screenshot saved: {filename}")
|
|
80
|
+
elif py5.key == "q":
|
|
81
|
+
field.cleanup()
|
|
82
|
+
py5.exit()
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
if __name__ == "__main__":
|
|
86
|
+
py5.run_sketch()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . import physarum
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Ant Colony Optimization
|
|
2
|
+
|
|
3
|
+
Stigmergic ant navigation using pheromone deposition and evaporation.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
uv run python src/logic_lab/biological/ant_colony/ant_colony.py
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Press `s` to save a screenshot.
|
|
10
|
+
|
|
11
|
+
Ants autonomously explore leaving pheromone trails.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import math
|
|
2
|
+
import random
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
import py5
|
|
6
|
+
|
|
7
|
+
SCREENSHOT_DIR = Path(__file__).parent / "screenshots"
|
|
8
|
+
ants: list[dict] = []
|
|
9
|
+
pheromone_map: list[list[float]] = []
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def setup() -> None:
|
|
13
|
+
global ants, pheromone_map
|
|
14
|
+
py5.size(1000, 1000)
|
|
15
|
+
SCREENSHOT_DIR.mkdir(parents=True, exist_ok=True)
|
|
16
|
+
|
|
17
|
+
for _ in range(50):
|
|
18
|
+
ants.append(
|
|
19
|
+
{
|
|
20
|
+
"x": py5.width / 2,
|
|
21
|
+
"y": py5.height / 2,
|
|
22
|
+
"angle": random.uniform(0, 2 * math.pi),
|
|
23
|
+
"food": False,
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
grid_size = 50
|
|
28
|
+
pheromone_map = [[0.0] * grid_size for _ in range(grid_size)]
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def draw() -> None:
|
|
32
|
+
global pheromone_map
|
|
33
|
+
py5.background(20)
|
|
34
|
+
|
|
35
|
+
grid_x, grid_y = len(pheromone_map[0]), len(pheromone_map)
|
|
36
|
+
scale_x, scale_y = py5.width / grid_x, py5.height / grid_y
|
|
37
|
+
|
|
38
|
+
for ant in ants:
|
|
39
|
+
gx, gy = int(ant["x"] / scale_x), int(ant["y"] / scale_y)
|
|
40
|
+
|
|
41
|
+
if 0 <= gx < grid_x and 0 <= gy < grid_y:
|
|
42
|
+
pheromone_map[gy][gx] += 1
|
|
43
|
+
|
|
44
|
+
if pheromone_map[gy][gx] > 10:
|
|
45
|
+
ant["food"] = True
|
|
46
|
+
|
|
47
|
+
if ant["food"]:
|
|
48
|
+
ant["angle"] += random.uniform(-0.3, 0.3)
|
|
49
|
+
else:
|
|
50
|
+
best_angle = ant["angle"]
|
|
51
|
+
max_pheromone = 0
|
|
52
|
+
|
|
53
|
+
for test_angle in [ant["angle"] - 0.5, ant["angle"], ant["angle"] + 0.5]:
|
|
54
|
+
tx = int((ant["x"] + 20 * math.cos(test_angle)) / scale_x)
|
|
55
|
+
ty = int((ant["y"] + 20 * math.sin(test_angle)) / scale_y)
|
|
56
|
+
|
|
57
|
+
if 0 <= tx < grid_x and 0 <= ty < grid_y:
|
|
58
|
+
if pheromone_map[ty][tx] > max_pheromone:
|
|
59
|
+
max_pheromone = pheromone_map[ty][tx]
|
|
60
|
+
best_angle = test_angle
|
|
61
|
+
|
|
62
|
+
ant["angle"] = best_angle
|
|
63
|
+
|
|
64
|
+
ant["x"] += 3 * math.cos(ant["angle"])
|
|
65
|
+
ant["y"] += 3 * math.sin(ant["angle"])
|
|
66
|
+
|
|
67
|
+
if ant["x"] < 0:
|
|
68
|
+
ant["x"] = py5.width
|
|
69
|
+
if ant["x"] > py5.width:
|
|
70
|
+
ant["x"] = 0
|
|
71
|
+
if ant["y"] < 0:
|
|
72
|
+
ant["y"] = py5.height
|
|
73
|
+
if ant["y"] > py5.height:
|
|
74
|
+
ant["y"] = 0
|
|
75
|
+
|
|
76
|
+
py5.fill(255, 150, 100) if ant["food"] else py5.fill(100, 150, 255)
|
|
77
|
+
py5.stroke_weight(0)
|
|
78
|
+
py5.circle(ant["x"], ant["y"], 2)
|
|
79
|
+
|
|
80
|
+
for pheromone_map[y][x] in enumerate(pheromone_map):
|
|
81
|
+
pheromone_map[y][x] *= 0.95
|
|
82
|
+
|
|
83
|
+
for y in range(len(pheromone_map)):
|
|
84
|
+
for x in range(len(pheromone_map[0])):
|
|
85
|
+
val = int(pheromone_map[y][x] * 2)
|
|
86
|
+
if val > 0:
|
|
87
|
+
py5.fill(val, 100, 200, min(val, 255))
|
|
88
|
+
py5.stroke_weight(0)
|
|
89
|
+
py5.rect(x * scale_x, y * scale_y, scale_x, scale_y)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def key_pressed() -> None:
|
|
93
|
+
if py5.key == "s":
|
|
94
|
+
py5.save_frame(str(SCREENSHOT_DIR / "ant_colony_####.png"))
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
py5.run_sketch()
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Diffusion-Limited Aggregation (DLA)
|
|
2
|
+
|
|
3
|
+
Particles perform random walks until they contact a growing aggregate, where they permanently stick. The resulting fractal cluster has a characteristic branching, dendritic form resembling snowflakes, coral, lightning, or mineral deposits.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
uv run python src/logic_lab/biological/dla/dla.py
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Press `1/2/3` to switch growth modes (radial/linear/circular), `r` to reset, `Space` to pause, or `s` to save a screenshot.
|
|
10
|
+
|
|
11
|
+
Color encodes the order in which particles joined the aggregate: deep blue = early (old branches), white/cyan = recent growth. Radial mode grows a symmetric crystal from the center; linear grows a terrain-like boundary; circular fills inward from a ring seed.
|
|
File without changes
|