-1

How can I calculate the area of a complex object (cylinder for example) with an FEA algorithm with C#?

I have data of Elements stored in ".dat" file (cylinder.dat) I can read coordinates of all elements but I don't have any idea how can I calculate the area. Does anyone know what kind of algorithm can solve this problem?

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
  • 2
    Algorithms are code independent by definition, so what are you actually asking is "Can somebody do my homework for me?". My answer is "no". Read up on the algorithm, make an effort and post your actual problems with the code. – hyp Apr 08 '11 at 09:14
  • I'm not asking for solution from A-Z , i just asked if someone know what kind of algorithm can i use , thank you – Alexandre Mselmi Apr 08 '11 at 09:21

2 Answers2

1

You can take a look at these threads:

Calculating Area of Irregular Polygon in C#

PolygonArea @ mathworld

Community
  • 1
  • 1
Winfred
  • 875
  • 6
  • 12
1

For the specific case of a cylinder:

First, rotate your coordinate system so that the cylinder's height is aligned with the long axis, if it isn't already. Now take just the x,y coordinates of each point. This is the projection of the circumference onto a plane. Measure the diameter. If the object is a true cylinder, it should be (Xmax-Xmin) which should also equal (Ymax-Ymin). Also measure the height: Zmax-Zmin. Then area = PI D * h.

AShelly
  • 34,686
  • 15
  • 91
  • 152