猪八戒APP
混沌吸引子等数学艺术品3D打印项目
深圳
手板制作
需求标题
混沌吸引子等数学艺术品3D打印项目
需求描述
主要需要是1给定一个方程和参数,实现混沌吸引子的3维可视化渲染美化算法软件平台;2 具体3D打印实现
关于混沌吸引子基本知识
实际上是一个三维的常微分方程
比如lorenz吸引子
The Lorenz attractor is generated by the differential equation written by
dx/dt=-10x+10y
dy/dt=28x -y-xz
dz/dt=-8/3z+xy.
画出轨迹的方法就是,选取一个初始值,对这个系统可以任意的 选比如(x0,y0,z0)=(1,1,1)
然后按照求解微分方程的Runge-Kutta方法,这个方法有很多现成的工具包
画出来轨迹就是这样的
实际上不同的初始值,就是另一根不同的轨迹,
轨迹出来后,轨迹的数据可以存下来,剩下的就是渲染和美化艺术化的事情了,这个是重点;
参考视频
[url=https://upload.wikimedia.org/*********/commons/transcoded/e/ea/A_Lorenz_system.ogv/A_Lorenz_system.ogv.360p.webm]https://upload.wikimedia.org/*********/commons/transcoded/e/ea/A_Lorenz_system.ogv/A_Lorenz_system.ogv.360p.webm[/url]
在某些特定的初始值下 可以出现这种周期解,这种更适合打印出来
在不同语言下的代码
ATLAB simulation[edit]
%Solution for the Lorenz equations in the time interval [0,100] with initial conditions [1,1,1].
sigma=10;beta=8/3;rho=28;f = @(t,a) [-sigma*a(1) + sigma*a(2); rho*a(1) - a(2) - a(1)*a(3); -beta*a(3) + a(1)*a(2)];
%'f' is the set of differential equations and 'a' is an array containing values of x,y, and z variables.%'t' is the time variable
[t,a] = ode45(f,[0 100],[1 1 1]);
%'ode45' uses adaptive Runge-Kutta method of 4th and 5th order to solve differential equations
plot3(a(:,1),a(:,2),a(:,3)) %'plot3' is the command to make 3D plot
Mathematica simulation[edit]
a = 10; b = 8/3; r = 28;x = 1; y = 1; z = 1;points = {{1,1,1}};i := AppendTo[points, {x = N[x + (a*y - a*x)/100], y = N[y + (-x*z + r*x - y)/100], z = N[z + (x*y - b*z)/100]}]
Do[i, {3000}]ListPointPlot3D[points, PlotStyle -> {Red, PointSize[Tiny]}]
Python simulation[edit]
import numpy as npimport matplotlib.pyplot as pltfrom scipy.integrate import odeintfrom mpl_toolkits.mplot3d import Axes3D
rho = 28.0sigma = 10.0beta = 8.0 / 3.0
def f(state, t):
x, y, z = state # unpack the state vector
return sigma * (y - x), x * (rho - z) - y, x * y - beta * z # derivatives
state0 = [1.0, 1.0, 1.0]t = np.arange(0.0, 40.0, 0.01)
states = odeint(f, state0, t)
fig = plt.figure()ax = fig.gca(projection='3d')ax.plot(states[:,0], states[:,1], states[:,2])plt.show()
这些网页都有画法,
[url=http://brain.cc.kogakuin.ac.jp/~kanamaru/Chaos/e/Lorenz/]http://brain.cc.kogakuin.ac.jp/~kanamaru/Chaos/e/Lorenz/[/url]
[url=http://paulbourke.net/fractals/lorenz/]http://paulbourke.net/fractals/lorenz/[/url]
轨迹出来后,轨迹的数据可以存下来,剩下的就是渲染和美化艺术化的事情了,这个是重点;
可以考虑着色,着色的方法也很多,比如根据那一点的速度着色,或者其他美化的方法这个轨迹的粗一点,立体感更强一点,这个珠子也是反映的速度,间隔大的地方就是速度快的,但是要打印就要串起来了吸引子本身是线,但是可以艺术化为这样方便打印出来,同时这种图片本身的生成也是很有趣的这是一个专门画[url=http://paulbourke.net/fractals/lorenz/]http://paulbourke.net/fractals/lorenz/[/url] 的网站。是用PovRay 3.5 做的
PovRay 3.5 macro by Marcus Fritzsch
// N = number iterations
// h, a, b, c: initial parameters
// x0, y0, z0: start-location
// rad = radius of the spheres that trace the attractor
#macro lorenz(h, a, b, c, x0, y0, z0, N, rad)
// use it like:
// lorenz(0.001099, 10, 28, 8/3, 0.0001, 0.0001, 0.0001, 350000, 0.04)
#local i = 0;
union {
#while (i < N)
#local x1 = x0 + h * a * (y0 - x0);
#local y1 = y0 + h * (x0 * (b - z0) - y0);
#local z1 = z0 + h * (x0 * y0 - c * z0);
#if (i > 100)
sphere {
, rad
pigment { color rgb }
}
#end
#local i = i + 1;
#local x0 = x1;
#local y0 = y1;
#local z0 = z1;
#end
}
#end
PovRay rendering by Marcus Fritzsch
另一些艺术化的效果,这是另一些吸引子了,也是有方程的
[url=http://***.chaos-math.org/nl/chaos-vii-vreemde-attractors]http://***.chaos-math.org/nl/chaos-vii-vreemde-attractors[/url] 这个网站上有很多很有趣的可视化
所以上面这个曲线有一堆是很**的,可以练出面了处理,其实是一根线反复缠绕靠的近请设计一个有个性的渲染美化效果,本质上数据就是一根曲线或一堆曲线,然后同时考虑2D出图,和3D出模型想投标的,请发模仿上述,将以下方程画出来,给出渲染效果
Chen attractor
dx=a*(y-x)
dy=(c-a)*x-x*z+c*y
dz=x*y-b*z
a=40.000000
b=3.000000
c=28.000000
这个比lorenz更多缠绕,看看能做成什么样的美化效果
2d图片+3d打印模型;各自美化艺术
请将方案发送邮箱@qq.com
预算金额
需人才报价
允许参与人才数量
--
人才所在地
--
人才类型
--
工作反馈要求
无要求
期望完成日期
--
开票类型要求
无要求