code for knowing what kind of polyhedron it is

Asked 2 years ago, Updated 2 years ago, 119 views

How to build a polyhedron

Whether it's Python, C, or Matlab, it doesn't matter what language it is.

For example, suppose you have the following data on a regular dodecahedron:
This data shows at which three points for each vertex 0 to 11 of a regular 20 square, one triangle, or one plane of a regular 20 square.
You can connect vertices like this image.
Enter a description of the image here
Data1

640 
4 9 0 
9 3 0 
3 11 0 
11 6 0
4 6 1 
6 8 1 
8 2 1 
2 10 1 
10 4 1 
8 7 2 
7 5 2 
5 10 2 
10 9 4 
9 10 5 
7 11 3 
5 7 3 
9 5 3 
11 8 6 
8 11 7

I'm looking for a code that shows what a polyhedron looks like from this type of data.
The above data may be obvious, but if the data is complicated like the one below, you won't know right away.
Data 2

14012 
13 14 12 
13 6 14 
12 4 13 
12 0 15 
16 12 15 
16 4 12 
15 9 16 
15 0 17 
18 15 17 
18 9 15 
17 3 18 
17 0 19 
20 17 19
20 3 17 
19 11 20 
19 0 14 
21 19 14 
21 11 19 
14 6 21 
23 1 22 
13 23 22 
13 4 23 
22 6 13 
22 1 24 
25 22 24 
25 6 22 
24 8 25 
24 1 26 
27 24 26 
27 8 24 
26 2 27 
26 1 28 
29 26 28 
29 2 26 
28 10 29 
28 1 23 
30 28 23 
30 10 28 
23 4 30
27 2 31 
32 27 31 
32 8 27 
31 7 32 
31 2 33 
34 31 33 
34 7 31 
33 5 34 
33 2 29 
35 33 29 
35 5 33 
29 10 35 
30 4 16 
36 30 16 
36 10 30 
16 9 36 
37 5 35 
36 37 35 
36 9 37 
35 10 36 
39 3 20 
38 39 20 
38 7 39 
20 11 38 
40 3 39 
34 40 39 
34 5 40 
39 7 34 
18 3 40 
37 18 40 
37 9 18 
40 5 37 
21 6 25 
41 21 25 
41 11 21 
25 8 41 
32 7 38 
41 32 38 
41 8 32 
38 11 41 

Please let me know if anyone knows the code to achieve what I want to achieve.

algorithm graph-theory

2022-09-30 14:55

1 Answers

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.