The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 area of a polygon

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000