
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
PyTorch 核心机制:损失函数与反向传播如何驱动模型进化 在深度学习的世界里,模型从 “一无所知” 到 “精准预测” 的蜕变,离 ...
2025-07-252025 年 CDA 数据分析师考纲焕新,引领行业人才新标准 在数字化浪潮奔涌向前的当下,数据已成为驱动各行业发展的核心要素。作为 ...
2025-07-25从数据到决策:CDA 数据分析师如何重塑职场竞争力与行业价值 在数字经济席卷全球的今天,数据已从 “辅助工具” 升级为 “核心资 ...
2025-07-25用 Power BI 制作地图热力图:基于经纬度数据的实践指南 在数据可视化领域,地图热力图凭借直观呈现地理数据分布密度的优势,成 ...
2025-07-24解析 insert into select 是否会锁表:原理、场景与应对策略 在数据库操作中,insert into select 是一种常用的批量数据插入语句 ...
2025-07-24CDA 数据分析师的工作范围解析 在数字化时代的浪潮下,数据已成为企业发展的核心资产之一。CDA(Certified Data Analyst)数据分 ...
2025-07-24从 CDA LEVEL II 考试题型看 Python 数据分析要点 在数据科学领域蓬勃发展的当下,CDA(Certified Data Analyst)认证成为众多从 ...
2025-07-23用 Python 开启数据分析之旅:从基础到实践的完整指南 在数据驱动决策的时代,数据分析已成为各行业不可或缺的核心能力。而 Pyt ...
2025-07-23鸢尾花判别分析:机器学习中的经典实践案例 在机器学习的世界里,有一个经典的数据集如同引路明灯,为无数初学者打开了模式识别 ...
2025-07-23解析 response.text 与 response.content 的核心区别 在网络数据请求与处理的场景中,开发者经常需要从服务器返回的响应中提取数 ...
2025-07-22解析神经网络中 Softmax 函数的核心作用 在神经网络的发展历程中,激活函数扮演着至关重要的角色,它们为网络赋予了非线性能力, ...
2025-07-22CDA数据分析师证书考取全攻略 一、了解 CDA 数据分析师认证 CDA 数据分析师认证是一套科学化、专业化、国际化的人才考核标准, ...
2025-07-22左偏态分布转正态分布:方法、原理与实践 左偏态分布转正态分布:方法、原理与实践 在统计分析、数据建模和科学研究中,正态分 ...
2025-07-22你是不是也经常刷到别人涨粉百万、带货千万,心里痒痒的,想着“我也试试”,结果三个月过去,粉丝不到1000,播放量惨不忍睹? ...
2025-07-21我是陈辉,一个创业十多年的企业主,前半段人生和“文字”紧紧绑在一起。从广告公司文案到品牌策划,再到自己开策划机构,我靠 ...
2025-07-21CDA 数据分析师的职业生涯规划:从入门到卓越的成长之路 在数字经济蓬勃发展的当下,数据已成为企业核心竞争力的重要来源,而 CD ...
2025-07-21MySQL执行计划中rows的计算逻辑:从原理到实践 MySQL 执行计划中 rows 的计算逻辑:从原理到实践 在 MySQL 数据库的查询优化中 ...
2025-07-21在AI渗透率超85%的2025年,企业生存之战就是数据之战,CDA认证已成为决定企业存续的生死线!据麦肯锡全球研究院数据显示,AI驱 ...
2025-07-2035岁焦虑像一把高悬的利刃,裁员潮、晋升无望、技能过时……当职场中年危机与数字化浪潮正面交锋,你是否发现: 简历投了10 ...
2025-07-20CDA 数据分析师报考条件详解与准备指南 在数据驱动决策的时代浪潮下,CDA 数据分析师认证愈发受到瞩目,成为众多有志投身数 ...
2025-07-18