Skip to content

Instantly share code, notes, and snippets.

@jxltom
jxltom / lorenz.nb
Created December 5, 2015 01:48 — forked from MetroWind/lorenz.nb
Mathematica code that calculate the Lorenz attractor.
Clear[Evaluate[Context[] <> "*"]];
SetDirectory[NotebookDirectory[]];
sigma = 10;
rho = 28;
beta = 8/3;
tMax = 50;
s = NDSolve[{x'[t] == sigma*(y[t] - x[t]),
y'[t] == x[t]*(rho - z[t]) - y[t], z'[t] == x[t]*y[t] - beta*z[t],
x[0] == 1, y[0] == 1, z[0] == 1}, {x, y, z}, {t, 0, tMax},
AccuracyGoal -> 20, PrecisionGoal -> 20, WorkingPrecision -> 40,
@jxltom
jxltom / MakeCurve.py
Created December 5, 2015 01:47 — forked from MetroWind/MakeCurve.py
Create a curve in Blender.
import bpy
import math
import numpy
from mathutils import Vector
w = 1 # weight
Scale = 0.03
def readCoords(filename):
with open(filename, 'r') as File: