
Hilbert空间递归演示_数据分析师
Hilbert空间填充曲线在图像采样等方面十分有用关于什么希尔伯特
空间填充曲线看这里:http://en.wikipedia.org/wiki/Hilbert_curve
程序效果:
模拟Hilbert空间填充曲线效果,点击鼠标自动叠加!运行效果截图
Hilbert源程序代码:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
package com.gloomyfish.image.hilbert;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;
public class Hilbert {
public static final int WHEELSIZE = 1024;
// four edges
public static final int NORTH = 0;
public static final int EAST = 90;
public static final int SOUTH = 180;
public static final int WEST = 270;
// four corners
public static final int NE = 45;
public static final int SE = 135;
public static final int SW = 225;
public static final int NW = 315;
// attributes
private Point location;
private Color[] colorWheel;
private int colorIdx;
public Hilbert() {
// build color lookup table
this.colorWheel = new Color[1024];
for (int i = 0; i < 128; ++i)
this.colorWheel[i] = new Color(0, 255 - i, i);
for (int j = 128; j < 256; ++j)
this.colorWheel[j] = new Color(0, j, j);
for (int k = 0; k < 256; ++k)
this.colorWheel[(k + 256)] = new Color(0, 255 - k, 255);
for (int l = 0; l < 128; ++l)
this.colorWheel[(l + 512)] = new Color(0, l, 255 - l);
for (int i1 = 0; i1 < 128; ++i1)
this.colorWheel[(i1 + 640)] = new Color(0, 127 - i1, 127 - i1);
for (int i2 = 0; i2 < 256; ++i2)
this.colorWheel[(i2 + 768)] = new Color(0, i2, 0);
this.colorIdx = 0;
}
public void process(Graphics graphic, int level, int width, int height) {
this.location = null;
if(level > 32 )
{
graphic.drawString("could get max depth is 32!", 40, 40);
return;
}
hilbert(graphic, level, 0, 0, width, height, 0, 225);
}
public void hilbert(Graphics g, int depth, int startx, int starty, int width, int height, int startgray, int endgray) {
int centerX = width / 2;
int centerY = height / 2;
if (depth == 0) {
if (this.location != null) {
g.setColor(this.colorWheel[this.colorIdx]);
g.drawLine(this.location.x, this.location.y,
startx + centerX, starty + centerY);
if (++this.colorIdx >= 1024)
this.colorIdx = 0;
}
this.location = new Point(startx + centerX, starty + centerY);
return;
}
switch (startgray) {
|
数据分析咨询请扫描二维码
若不方便扫码,搜微信号:CDAshujufenxi
“纲举目张,执本末从。”若想在数据分析领域有所收获,一套合适的学习教材至关重要。一套优质且契合需求的学习教材无疑是那关键 ...
2025-06-092025 年,数据如同数字时代的 DNA,编码着人类社会的未来图景,驱动着商业时代的运转。从全球互联网用户每天产生的2.5亿TB数据, ...
2025-05-27CDA数据分析师证书考试体系(更新于2025年05月22日)
2025-05-26解码数据基因:从数字敏感度到逻辑思维 每当看到超市货架上商品的排列变化,你是否会联想到背后的销售数据波动?三年前在零售行 ...
2025-05-23在本文中,我们将探讨 AI 为何能够加速数据分析、如何在每个步骤中实现数据分析自动化以及使用哪些工具。 数据分析中的AI是什么 ...
2025-05-20当数据遇见人生:我的第一个分析项目 记得三年前接手第一个数据分析项目时,我面对Excel里密密麻麻的销售数据手足无措。那些跳动 ...
2025-05-20在数字化运营的时代,企业每天都在产生海量数据:用户点击行为、商品销售记录、广告投放反馈…… 这些数据就像散落的拼图,而相 ...
2025-05-19在当今数字化营销时代,小红书作为国内领先的社交电商平台,其销售数据蕴含着巨大的商业价值。通过对小红书销售数据的深入分析, ...
2025-05-16Excel作为最常用的数据分析工具,有没有什么工具可以帮助我们快速地使用excel表格,只要轻松几步甚至输入几项指令就能搞定呢? ...
2025-05-15数据,如同无形的燃料,驱动着现代社会的运转。从全球互联网用户每天产生的2.5亿TB数据,到制造业的传感器、金融交易 ...
2025-05-15大数据是什么_数据分析师培训 其实,现在的大数据指的并不仅仅是海量数据,更准确而言是对大数据分析的方法。传统的数 ...
2025-05-14CDA持证人简介: 万木,CDA L1持证人,某电商中厂BI工程师 ,5年数据经验1年BI内训师,高级数据分析师,拥有丰富的行业经验。 ...
2025-05-13CDA持证人简介: 王明月 ,CDA 数据分析师二级持证人,2年数据产品工作经验,管理学博士在读。 学习入口:https://edu.cda.cn/g ...
2025-05-12CDA持证人简介: 杨贞玺 ,CDA一级持证人,郑州大学情报学硕士研究生,某上市公司数据分析师。 学习入口:https://edu.cda.cn/g ...
2025-05-09CDA持证人简介 程靖 CDA会员大咖,畅销书《小白学产品》作者,13年顶级互联网公司产品经理相关经验,曾在百度、美团、阿里等 ...
2025-05-07相信很多做数据分析的小伙伴,都接到过一些高阶的数据分析需求,实现的过程需要用到一些数据获取,数据清洗转换,建模方法等,这 ...
2025-05-06以下的文章内容来源于刘静老师的专栏,如果您想阅读专栏《10大业务分析模型突破业务瓶颈》,点击下方链接 https://edu.cda.cn/g ...
2025-04-30CDA持证人简介: 邱立峰 CDA 数据分析师二级持证人,数字化转型专家,数据治理专家,高级数据分析师,拥有丰富的行业经验。 ...
2025-04-29CDA持证人简介: 程靖 CDA会员大咖,畅销书《小白学产品》作者,13年顶级互联网公司产品经理相关经验,曾在百度,美团,阿里等 ...
2025-04-28CDA持证人简介: 居瑜 ,CDA一级持证人国企财务经理,13年财务管理运营经验,在数据分析就业和实践经验方面有着丰富的积累和经 ...
2025-04-27