Surface Area and Volume
All  1-10  11-12

Previous
Next
 From:  bemfarmer
5549.11 
I've put together a planar 3d polygon face area measuring script, but it still has bugs.
The vector/point math is a bit confusing. Just need to properly code the remaining 10% incorrectness. :-)
I've been resisting asking for help. (The math is fairly simple...)

For a nurbs face area, and or volume, the complex nurbs Gaussian quadrature integration, like the Berkeley link, is
beyond my current ability.

EDITED: 5 Dec 2012 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  bemfarmer
5549.12 
Here is the PolygonFaceArea Script, as a slightly tested draft.
It does not work on circles, nor nurbs curves, just planar faces, with straight line edges.
It does work for such faces in 3D space, with x, y, and z coordinates.
There is a lot of switching between points and vectors, which seemed to be necessary.
Portions of several existing scripts were used, including "bisector line", "angle", and "switch from faces to edges".
The "duplicate borders" script was used to switch from edges, to the line segments, to get the vertexes = start points.
Do edges have start and end points?
The main reference is Allen Van Gelder, "Efficient computation of polygon area and polyhedron volume," which is chapter 11 in the
book "Graphic Gems V." This chapter can be downloaded. It is not necessary to compute the surface normal.
Also looked at a JAVA program which used surface normals. Also looked at a Fast Polygon method, which uses projection and Newell Normals,
and is computationally more efficient.
The script only does one face at a time. It needs to be tested more.
The script should probably clean up the extra edge lines generated, and have sequential selections improved.

An early draft worked at the origin. Subsequent drafts refused to work, for a long time, without using vectors, and generated the area as 1.#QNB which
may indicate trying to display points as area values...

EDITED: 6 Dec 2012 by BEMFARMER


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-10  11-12