开发者

How to find out the number of edges, faces, vertices in a polygon

开发者 https://www.devze.com 2023-01-25 06:25 出处:网络
Is the开发者_运维百科re an easy way to find the number of edges, faces and vertices in a polygon (say decagon or hendecagon). Is this data available as part of a java library or should it be manually

Is the开发者_运维百科re an easy way to find the number of edges, faces and vertices in a polygon (say decagon or hendecagon). Is this data available as part of a java library or should it be manually derived from the wiki data.


If you really do mean polygons rather than polyhedrons, then:

  • polygons don't have faces, and
  • the number of edges of a polygon is the same as the number of vertices.

If you want Java code to translate the name of a polygon to the number of edges or vertices, then a simple lookup table should cover all cases that you are likely to encounter. If that is not sufficient, then the problem is pretty much the same as the problem of translating ancient greek numbers (in anglicized form) into integers.

This page explains how to count in anglicized ancient greek and latin, but it fizzles out at around 20. At that point, you probably need to extemporize; i.e. make them up.

The page explain that usage beyond dodeca- is extremely rare (apart from icosahedron). However, I'm sure you could find a few loons out there who would love to waste hours of your timing debating the correct name for a 42 sided polygon.


Sounds like you may be fishing for Euler's result for connected graphs:

R + N = E + 2
i.e. regions + nodes = edges + 2

You can consider this a graph on the 2D plane.

However, you can also apply it equally to polyhedra: you could wrap your graph around a ball, and make the arcs straighten out, in which case you would want to think of 'faces' instead of 'regions'. Topologically it's the same thing.

I always need to do a quick check to see if I got that the right way round: A cube has 6 faces, 8 nodes, 12 edges. 6 + 8 = 12 + 2. Yep. Check. R + N = E + 2

0

精彩评论

暂无评论...
验证码 换一张
取 消