Skip to content

Instantly share code, notes, and snippets.

View bened-h's full-sized avatar

Benedikt bened-h

  • Vienna, Austria
View GitHub Profile
# blender 2.8
"""
This script implements Convey's "Game of Life" in Blender 2.8
It relies on the blender file containing a mesh called "Cube"
(sidelength = 1) and an empty collection called "Grid".
# original code: https://gist.github.com/bened-h/9d56a03e9a14b917980c1d4039bf1687
# inspired by this comment https://www.reddit.com/r/generative/comments/ghuvlg/i_made_a_25dimensional_version_of_conways_game_of/fqb5nlu/
"""
import bpy
@bened-h
bened-h / blender_game_of_life.py
Last active November 20, 2023 19:10
This script implements Convey's "Game of Life" in Blender 2.8.
# blender 2.8
"""
This script implements Convey's "Game of Life" in Blender 2.8
It relies on the blender file containing a mesh called "Cube"
(sidelength = 1) and an empty collection called "Grid".
"""
import bpy
from random import random
@bened-h
bened-h / genetic_algo_find_circle.pyde
Last active November 9, 2021 19:16
Simple "genetic" algorithm for Processing (Python mode) showing a random point polpulation evolving to become a circle
"""
This demonstration evolves a random point
population (parent) to order its points into a
circular arrangement (target).
The fitness is computed by measuring each point's
distance to its destination.
Read an introduction to genetic algorithms with python here:
https://www.codeproject.com/articles/1104747/introduction-to-genetic-algorithms-with-python-hel
"""