FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Java/7D_Data_Visualization.java at main · sksalahuddin2828/Java · GitHub
sksalahuddin2828
/
Java
Public
Notifications
You must be signed in to change notification settings
Fork
59
Star
178
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Java
/
7D_Data_Visualization.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
39 lines (31 loc) · 1.15 KB
Breadcrumbs
Java
/
7D_Data_Visualization.java
Copy path
File metadata and controls
39 lines (31 loc) · 1.15 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
import
org
.
jzy3d
.
chart
.
Chart
;
import
org
.
jzy3d
.
chart
.
ChartLauncher
;
import
org
.
jzy3d
.
colors
.
Color
;
import
org
.
jzy3d
.
maths
.
Coord3d
;
import
org
.
jzy3d
.
plot3d
.
primitives
.
Scatter
;
import
java
.
util
.
Random
;
public
class
Main
{
public
static
void
main
(
String
[]
args
) {
int
numSamples
=
100
;
Random
random
=
new
Random
(
42
);
Coord3d
[]
dataPoints
=
new
Coord3d
[
numSamples
];
Color
[]
dataColors
=
new
Color
[
numSamples
];
float
[]
dataSizes
=
new
float
[
numSamples
];
for
(
int
i
=
0
;
i
<
numSamples
;
i
++) {
float
x
=
random
.
nextFloat
();
float
y
=
random
.
nextFloat
();
float
z
=
random
.
nextFloat
();
dataPoints
[
i
] =
new
Coord3d
(
x
,
y
,
z
);
float
r
=
random
.
nextFloat
();
float
g
=
random
.
nextFloat
();
float
b
=
random
.
nextFloat
();
dataColors
[
i
] =
new
Color
(
r
,
g
,
b
);
float
size
=
x
+
y
+
z
;
dataSizes
[
i
] =
size
;
}
Scatter
scatter
=
new
Scatter
(
dataPoints
,
dataColors
,
dataSizes
);
Chart
chart
=
new
Chart
();
chart
.
getScene
().
add
(
scatter
);
ChartLauncher
.
openChart
(
chart
);
}
}
Back
|
FazBrowse Home
|
New Git URL