Attraktors [Generative equation]

science

(Gamel) #1



Hi everyone

I present a script that I developed on “blender” to generate attraktors.
All Attraktors:
http://www.gael-labousse.com/images/temp/Attraktor/Final_Aizawa.jpg
http://www.gael-labousse.com/images/temp/Attraktor/Final_DequanLi.jpg
http://www.gael-labousse.com/images/temp/Attraktor/Final_Hadley.jpg
http://www.gael-labousse.com/images/temp/Attraktor/Final_Halvorsen.jpg
http://www.gael-labousse.com/images/temp/Attraktor/Final_QiChen.jpg
http://www.gael-labousse.com/images/temp/Attraktor/Final_SprottLinzL.jpg
http://www.gael-labousse.com/images/temp/Attraktor/Final_Thomas.jpg

Here is my reference [Chaotic Atmospheres]. (made with cinema 4D plugin)
http://chaoticatmospheres.com/125671/workflows

and this site where I found the mathematical equations. [Jürgen Meier]
http://www.3d-meier.de/index.html


(jjjuho) #2

So beautiful, loving the shapes especially with that wooden material on white bg :slight_smile: Everything is just perfect!


(Kemmler) #3

An excellent way to present code :smiley:


(Gamel) #4

Thank you! :slight_smile:
I like to combine art and programming, aesthetic and technical in my compositions


(Dennis Pixel) #5

Nicely done indeed. The shapes are very harmonious.


(imagecorp) #6

great !

there a few months ago:



(alan.zirpoli) #7

very nice, I assume you got the idea from him. https://www.behance.net/gallery/7618879/MathRules-Strange-Attractors


(Gamel) #8

imagecorp:
Nice! This is done with a script?

alan.zirpoli:
Yes of course, it’s ma référence. I love the work of this Digital Artist. I tried to pay tribute to him with blender :slight_smile:


(meschoyez) #9

really beautiful. Maybe it would be great to have this as an add-on. I have no idea of how to do it, but i was just thinking on it :wink:
Again: great idea and great art.


(Mikel007) #10

Hello Gamel, that looks very beautiful. I have tried your script. But the script has problems under Blender 2.72b. It looks that are problems with the convertion from cube to nurbs. But i haven`t enough knowledge about python to change the script. Can anyone try to change the script so it runs under 7.72b. Thanks.


(RickyBlender) #11

looking nice
but where is the link for the script ?

happy bl


(Mikel007) #12

There is no link, the script is on the pictures. You have to write it in the blender text editor and press the button “run script”.


(Gamel) #13

Hi

Mikel007:
" Can anyone try to change the script so it runs under 7.72b. Thanks."

…7.72??? hahaha ^^ I create this project with blender 2.72b, and I have not had a problem: /

I will spend my scene to test :wink: >>> LabousseGael_AttraktorsScript.blend (513 KB)



(Remade) #14

beautiful fluid forms


(elZancudo) #15

Great work!! love it


(tofuman) #16

These are amazing! The results are almost like furniture that can be 3d printed.


(Mikel007) #17

Many thanks for that. It runs on my PC, too. And Blender 7.72b - it will come, guarantee :slight_smile: I hope i find the problem that i have with the other script (it was the Thomas-Attraktor).


(elZancudo) #18

Ey, I’m really glad you share this, I’m having lots of fun with them.
I was trying to make a very sutil adjustment in the initial parameters and then apply it as a shape key, but I can’t get a fluid transition.
Am I missing something? or is just the nature of this attractors?

import bpy
import math

# Equations ///////////////////////////////// The Aizawa Attractor
# dx/dt = (z-β)*x-δ*y
# dy/dt = δ*x+(z-β)*y
# dz/dt = ɣ+α*z-(z**3/3)-(x**2+y**2)*(1+ε*z)+ζ*z*x**3

x0 = 0.1
y0 = 0
z0 = 0
i = 0
j = 0
w = 0

# Parametres
ε = 0.3
α = 0.95
ɣ = 0.6
δ = 3.5
β = 0.7
ζ = 0.1
Facteur = 10
Delta = 0.01

# Compteurs
t = 15000
Step = 25

# Listes
PointX = []
PointY = []
PointZ = []
VertexX = []
VertexY = []
VertexZ = []

def CalcPoints():
    
    x=x0
    y=y0
    z=z0
    for i in range (1,t):
        dx = (z-β)*x-δ*y
        dy = δ*x+(z-β)*y
        dz = ɣ+α*z-(z**3/3)-(x**2+y**2)*(1+ε*z)+ζ*z*x**3
        x=  x + Delta * dx
        y=  y + Delta * dy
        z=  z + Delta * dz
        PointX.append(x)
        PointY.append(y)
        PointZ.append(z)
    
    subslistlen = int(len(PointX) / Step)
    for i in range (subslistlen):
        VertexX.append (PointX[ i * Step ])
        VertexY.append (PointY[ i * Step ])
        VertexZ.append (PointZ[ i * Step ])
    
def Aizawa():
    
    CalcPoints()

    bpy.ops.mesh.primitive_cube_add()
    bpy.data.objects["Cube"].name = "Aizawa"
    bpy.ops.object.editmode_toggle()
    bpy.ops.transform.resize(value=(0, 0, 0))
    bpy.ops.mesh.remove_doubles()
    obj  = bpy.data.objects['Aizawa']
    mesh = obj.data
    
    for j in range (len(VertexX)):
        bpy.ops.mesh.extrude_region_move(TRANSFORM_OT_translate={"value":(0,0,0)})
    
    bpy.ops.object.editmode_toggle()
    
    for j in range (len(VertexX)):    
        vert = mesh.vertices[j] 
        vert.co[0] = VertexX[j]*Facteur
        vert.co[1] = VertexY[j]*Facteur
        vert.co[2] = VertexZ[j]*Facteur
        
    bpy.ops.object.convert(target='CURVE')
    bpy.ops.object.editmode_toggle()
    bpy.ops.curve.spline_type_set(type='NURBS')
    bpy.data.curves['Aizawa'].resolution_u = 3       
    bpy.ops.object.editmode_toggle()

def shKey():
    
    bpy.ops.object.shape_key_add(from_mix=False)
    bpy.ops.object.shape_key_add(from_mix=False)
    
    CalcPoints()
    
    for w in range (len(VertexX)) :
        shKDATA=bpy.data.objects['Aizawa'].data.shape_keys.key_blocks['Key 1'].data[w]
        shKDATA.co[0] = VertexX[w]*Facteur
        shKDATA.co[1] = VertexY[w]*Facteur
        shKDATA.co[2] = VertexZ[w]*Facteur

Aizawa()

x0 = 0.101
y0 = 0.001
z0 = 0.001
ε = 0.3
α = 0.95
ɣ = 0.6
δ = 3.5
β = 0.7
ζ = 0.1
Facteur = 10
Delta = 0.01

del PointX[:]
del PointY[:]
del PointZ[:] 
del VertexX[:] 
del VertexY[:]
del VertexZ[:]

shKey()

(KarelZe) #19

It was a cool coincidence the day you posted this on blendernation I finished doing some test renders. I continued my work today this is what I came up with using a blender addon called strange attractors… By the way I really like your renders! :smiley: Cheers Markus



(Gamel) #20

elZancudo:
I do not know, I’m not very good at programming. I am always surprised to have managed this script ^^ But I’ll see that during the holidays

LarelZe:
I did not know there was an addon to do. I knew that a “plugin” existed in C ++ on Cinema 4D but that’s all.

Thank you all! I think making a movie for the holidays if I have time ^^