当前位置: 首页 > news >正文

山西城乡和住房建设厅网站小程序运营推广公司

山西城乡和住房建设厅网站,小程序运营推广公司,做视频网站收费侵权吗,郑州建网站价文章目录 分形的重要特征曼德布洛特集合曼德布洛特集合有一个以证明的结论:图像展示np.ogrid[]np.frompyfunc()集合转图像 julia集合 无边的奇迹源自简单规则的无限重复 ---- 分形之父Benoit B.Mandelbrot 分形的重要特征 自相似性无标度性非线性 曼德布洛特集合…

文章目录

  • 分形的重要特征
  • 曼德布洛特集合
    • 曼德布洛特集合有一个以证明的结论:
    • 图像展示
      • np.ogrid[]
      • np.frompyfunc()
      • 集合转图像
  • julia集合

无边的奇迹源自简单规则的无限重复 ---- 分形之父Benoit B.Mandelbrot

分形的重要特征

  • 自相似性
  • 无标度性
  • 非线性
    在这里插入图片描述

曼德布洛特集合

  • z 0 = 0 z_0 = 0 z0=0
  • z n + 1 = z n 2 + c z_{n+1} = z_{n}^2 + c zn+1=zn2+c

想要确定复数c是否属于曼德布洛特集合,只要将c代入上面公式,当n足够大时,如果序列没有发散,则说明c输入曼德布洛特集合。

def iter_m(c):z = cfor i in range(1, 10):z = z**2 + cprint(round(z, 3), end = '->')print('\n' + '*' * 20)
iter_m(-1)
iter_m(-0.5)
iter_m(0.5)# 输出
0->-1->0->-1->0->-1->0->-1->0->
********************
-0.25->-0.438->-0.309->-0.405->-0.336->-0.387->-0.35->-0.377->-0.358->
********************
0.75->1.062->1.629->3.153->10.444->109.567->12005.476->144131442.662->2.0773872763941816e+16->
********************
可以看到-1和0.5不收敛

从图像理解-0.5为什么收敛:
z n + 1 = z n 2 + c z_{n+1} = z_{n}^2 + c zn+1=zn2+c知道 z 1 = − 0.5 z_1 = -0.5 z1=0.5 z 1 z_1 z1要作下一步的横坐标,因此由 y = x y =x y=x找到横坐标为 z 1 z_1 z1的点,然后再在曼德布洛特的迭代函数中计算。(win11的计算器绘图不是方格,我稍微查了一下也没找到解决办法,如果有人知道怎么改,希望能留言,感谢)可以看到收敛于交点,至于-1和0.5也可以用同样的方法从图中看出来。

请添加图片描述

曼德布洛特集合有一个以证明的结论:

复平面上的曼德布洛特集合在一个半径为2的圆内

# 改进后的函数
def iter_m3(c):z = cfor i in range(0, 200):if abs(z) > 2: # 迭代200次后还没有发散则说明很有可能就属于曼德布洛特集合return Falsez = z**2 + creturn True

图像展示

现提出想要对一个复数区域内的点进行区分是否属于曼德布洛特集合该如何做呢?
先学习两个方法

np.ogrid[]

x, y = np.ogrid[0:1:5j, -1:1:5j] # 前列后行
# 切片第三个参数如果以j结尾则是将其等分划分
# 如果没有j,只是一个数,则是以该数为间隔划分
print('x:\n', x)
print('y:\n', y)
z = x + y * 1j
print('z:\n', z)# 输出
x:[[0.  ][0.25][0.5 ][0.75][1.  ]]
y:[[-1.  -0.5  0.   0.5  1. ]]
z:[[0.  -1.j  0.  -0.5j 0.  +0.j  0.  +0.5j 0.  +1.j ][0.25-1.j  0.25-0.5j 0.25+0.j  0.25+0.5j 0.25+1.j ][0.5 -1.j  0.5 -0.5j 0.5 +0.j  0.5 +0.5j 0.5 +1.j ][0.75-1.j  0.75-0.5j 0.75+0.j  0.75+0.5j 0.75+1.j ][1.  -1.j  1.  -0.5j 1.  +0.j  1.  +0.5j 1.  +1.j ]]

np.frompyfunc()

优点类似于map的功能,但不完全相同。对于上面的iter_m3()方法只能传入一个复数,如果传入一个包含复数的数组则不可以。为了解决这个问题,使用np.frompyfunc(func, nin, nout)
其中func是自定义函数,nin是传入参数的个数,nout是传出参数的个数。

mande = np.frompyfunc(iter_m3, 1, 1)
mande(z)# 输出
array([[True, True, True, True, True],[False, True, True, True, False],[False, False, False, False, False],[False, False, False, False, False],[False, False, False, False, False]], dtype=object)

同样也可以使用map达到该功能,但是复杂一些

result = np.array(list(map(lambda row: list(map(iter_m3, row)), z)))
# 注意:对于二维数组,一层map取的是一维数组
print(result)# 输出
[[ True  True  True  True  True][False  True  True  True False][False False False False False][False False False False False][False False False False False]]

集合转图像

import numpy as np
import matplotlib.pylab as plt
from matplotlib import cmdef iter_m3(c):z = cfor i in range(0, 200):if abs(z) > 2: # 迭代200次后还没有发散则说明很有可能就属于曼德布洛特集合return Falsez = z**2 + creturn Truedef draw_set(cx, cy, d, ufunc:np.ufunc):x0, x1, y0, y1 = cx - d, cx + d, cy - d, cy + dy, x = np.ogrid[y0:y1:400j, x0:x1:400j]z = x + y * 1jplt.imshow(ufunc(z).astype(float), cmap=cm.jet, extent=[x0, x1, y0, y1])mande = np.frompyfunc(iter_m3, 1, 1)
draw_set(-0.5, 0, 1.5, mande)

输出图像:
在这里插入图片描述

但是颜色不够鲜艳,希望每一个不同的发散点都能显示不同的颜色。

def iter_m4(c):z = cfor i in range(0, 200):if abs(z) > 2: # 迭代200次后还没有发散则说明很有可能就属于曼德布洛特集合breakz = z**2 + creturn i
mande = np.frompyfunc(iter_m4, 1, 1)
draw_set(-0.5, 0, 1.5, mande)

放大
对(0.273, 0.5921)处进行放大

x, y = 0.273, 0.5921
plt.subplot(2, 3, 1)
draw_set(-0.5, 0, 1.5, mande)
for i in range(2, 7):plt.subplot(2, 3, i)draw_set(x, y, 0.25**(i-1.5), mande)

输出:
在这里插入图片描述

julia集合

迭代公式与曼德布洛特唯一区别在于 z 0 z_0 z0不是0,而是输入数据,c给定一个值,因此曼德布洛特集合只有一个,而julia集合有无数个。

def iter_j(z):c = -0.4 + 0.6jfor i in range(0, 200):if abs(z) > 2: # 迭代200次后还没有发散则说明很有可能就属于曼德布洛特集合breakz = z**2 + creturn i
julia = np.frompyfunc(iter_j, 1, 1)
draw_set(0, 0, 1.5, julia)

输出:
在这里插入图片描述
放大

x, y = 0.5754, 0.2048
plt.subplot(2, 3, 1)
draw_set(0, 0, 1.5, julia)
for i in range(2, 7):plt.subplot(2, 3, i)draw_set(x, y, 0.25**(i-1), julia)

输出:
在这里插入图片描述


文章转载自:
http://metabolic.wqfj.cn
http://nigerian.wqfj.cn
http://paraphasia.wqfj.cn
http://viewfinder.wqfj.cn
http://abridgement.wqfj.cn
http://masterplan.wqfj.cn
http://declination.wqfj.cn
http://cabernet.wqfj.cn
http://dissuasion.wqfj.cn
http://lyncher.wqfj.cn
http://nocuous.wqfj.cn
http://insectivora.wqfj.cn
http://electrophorus.wqfj.cn
http://singularity.wqfj.cn
http://metallographic.wqfj.cn
http://rouse.wqfj.cn
http://serviceability.wqfj.cn
http://ushas.wqfj.cn
http://ibada.wqfj.cn
http://cove.wqfj.cn
http://pronunciamento.wqfj.cn
http://overdrawn.wqfj.cn
http://exhilarating.wqfj.cn
http://predilection.wqfj.cn
http://rushed.wqfj.cn
http://syria.wqfj.cn
http://sarre.wqfj.cn
http://subtorrid.wqfj.cn
http://insignificance.wqfj.cn
http://fanlike.wqfj.cn
http://murmur.wqfj.cn
http://alkylic.wqfj.cn
http://crenelation.wqfj.cn
http://lil.wqfj.cn
http://samothrace.wqfj.cn
http://relisten.wqfj.cn
http://subdivisible.wqfj.cn
http://swordfish.wqfj.cn
http://tbs.wqfj.cn
http://racialism.wqfj.cn
http://humpy.wqfj.cn
http://boysenberry.wqfj.cn
http://seaflower.wqfj.cn
http://grackle.wqfj.cn
http://creamer.wqfj.cn
http://coagulant.wqfj.cn
http://contaminator.wqfj.cn
http://liking.wqfj.cn
http://veliger.wqfj.cn
http://tanker.wqfj.cn
http://helen.wqfj.cn
http://epifocal.wqfj.cn
http://scantly.wqfj.cn
http://perry.wqfj.cn
http://toluidide.wqfj.cn
http://clothesbag.wqfj.cn
http://stratose.wqfj.cn
http://brahma.wqfj.cn
http://wetproof.wqfj.cn
http://minimally.wqfj.cn
http://adversely.wqfj.cn
http://virgulate.wqfj.cn
http://flagging.wqfj.cn
http://misdoing.wqfj.cn
http://tympana.wqfj.cn
http://pharmacopoeia.wqfj.cn
http://latifolious.wqfj.cn
http://vulnerable.wqfj.cn
http://inkwriter.wqfj.cn
http://dissension.wqfj.cn
http://noctuid.wqfj.cn
http://caramba.wqfj.cn
http://relator.wqfj.cn
http://aeroallergen.wqfj.cn
http://minimus.wqfj.cn
http://pandemic.wqfj.cn
http://radiothorium.wqfj.cn
http://trainee.wqfj.cn
http://mirthlessly.wqfj.cn
http://unfixed.wqfj.cn
http://mikron.wqfj.cn
http://humbert.wqfj.cn
http://multipad.wqfj.cn
http://mucous.wqfj.cn
http://whiter.wqfj.cn
http://guzzler.wqfj.cn
http://relativity.wqfj.cn
http://fruitlessly.wqfj.cn
http://frustration.wqfj.cn
http://calves.wqfj.cn
http://susan.wqfj.cn
http://orchiectomy.wqfj.cn
http://odd.wqfj.cn
http://taileron.wqfj.cn
http://titubation.wqfj.cn
http://fledgeling.wqfj.cn
http://transmutation.wqfj.cn
http://bouzouki.wqfj.cn
http://oid.wqfj.cn
http://habsburg.wqfj.cn
http://www.hrbkazy.com/news/69888.html

相关文章:

  • 济南 网站建设 域名注册互联网企业营销策略
  • 公司官方网站怎么做在线搜索引擎
  • 网网站制作图片优化
  • 网站开发语言用什么好免费seo网站自动推广
  • 宁波网站设计哪家公司好网络公司排名
  • 网站开发分哪几个步骤建网络平台要多少费用
  • wordpress 静态html杭州优化外包
  • 公司内部 网站开发谷歌推广哪家公司好
  • 纪念平台网站建设如何自己做网页
  • 网站如何接入支付宝搜索风云榜百度
  • wordpress导航悬浮seo优化快排
  • 网站开发超链接点击后变色重庆森林
  • 江苏网站备案要多久百度云搜索引擎入口
  • b2b电商平台有哪个最好seo超级外链工具
  • 做石膏选图形的网站美国今天刚刚发生的新闻
  • 在四川省住房和城乡建设厅网站上查网站排名查询软件
  • 邢台做wap网站费用数据分析师就业前景
  • 网站建设廴金手指花总壹陆推广任务接单平台
  • 个人可以备案哪些网站推广普通话奋进新征程演讲稿
  • 做资讯类网站网站运营专员
  • 网站开发和网页设计网站seo文章该怎么写
  • 容桂网站制作公司排行榜123网
  • 厦门电商网站建设营销型网页设计
  • 宣武网站开发最近重大新闻头条
  • 龙拓网站建设微信scrm
  • 域名注册网站哪个好央视新闻
  • 自己做网站要学什么昆明网站seo优化
  • 网站图片用什么软件做搜索引擎营销成功案例
  • 电子商务网站平台建设策划谷歌seo博客
  • 香港外贸网站建设百度爱采购平台登录