I made some of the 3D graphics, but I'm somewhat new to the theory of graphics. In particular, I looked and tried to solve my problem using (DFS), as described in the book "Mastering Algors with Perl" (Jarkko Hietaniemi). So far I have not been able to get it :-( but I am sure that DFS is what I want.
It doesn't have to be in Perl (just trying to learn the language), but Java or C ++ would be nice.
I have 53 position vectors, i.e. (x, y, z), which I represent as
(x1,y1,z1)
(x2,y2,z2)
.
.
.
(x53,y53,z53)
Then I run the Perl program that I wrote to create random links between nodes, assigning some max. hop, say 6. Thus, the topology may look like this: this
5 <-- node 1 has 5 links to
18 4 23 6 48, <-- node 18, node 4, node 23, node 6, node 48
2 <-- node 2 has 2 links to
14 5, <-- node 14, node 5
0 <-- node 3 is a leaf since it has no links
.
.
.
2 <-- node 18 has 2 links to
3 17 <-- node 3, node 17
.
.
.
4 <-- node 53 has 4 links to
10 46 49 22 <-- node 10, node 46, node 49, node 22
"run" , , .. 0.
node 1 node
18 node 3,...
.
,
,
.
, DFS; .
- , . , 51! , , : -)
q - (, :-( ""
:
5 & lt; - node 1 5 ;
18 4 23 6 48 < - node 18, node 4, node 23, node 6, node 48
2 < - node 2 2 ; 14 5, < - node 14, node 5
0 < - node 3 - ,
,
,
,
2 < - node 18 2 ;
3 17 < - node 3, node 17
,
,
,
4 < - node 53 4 ;
10 46 49 22 < - node 10, node 46, node 49, node 22
, - (Perl, Java, ++/C...)
.