T O P I C R E V I E W |
georockpat |
Posted - 01/03/2006 : 07:05:20 AM Origin Version (Select Help-->About Origin): 7.0 Operating System:Windows
How do you use origin to calculate the area of a polygon created witht the polygon tool? |
3 L A T E S T R E P L I E S (Newest First) |
Mike Buess |
Posted - 01/06/2006 : 08:45:36 AM The only additional information available for the polygon are the coordinates of its corners...
polygon.x1=; polygon.y1=; // 1st corner polygon.x2=; polygon.y2=; // 2nd corner polygon.x$(n)=; polygon.y$(n)=; // nth corner
It's up to you to use those coordinates to obtain the area.
Mike Buess Origin WebRing Member |
georockpat |
Posted - 01/06/2006 : 02:14:45 AM What about randomly shaped polygons? Shapes without formulas. Is there a known way to count pixels bound within the polygon? I am attempting to compare the areas of regions bound by a curve. The shapes of the areas can be outlined with the polygon tool, but I do not know how to calculate the area of the region inside the polygon.
|
Laurie |
Posted - 01/03/2006 : 4:07:14 PM You'll have to do this with a script.
Search on "User-created Visual Objects" in the Programming Help, opened by selecting Help:Programming. You can use the width and height (in axes units) properties: dx and dy
For example, to find the area of a triangle, whose name is polygon:
area=1/2*polygon.dx*polygon.dy; area=; AREA=2.591236
Note: To open the Script Window, select Window:Script Window. And then enter the above first two lines; the third line will be returned as a result.
OriginLab Technical Support |