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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Set coordinates of vertices of polygons
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

bur2000

Germany
36 Posts

Posted - 01/08/2014 :  10:41:13 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.6

Is it possible to position a polygon (or at least a triangle) by setting the coordinates of the vertices? I could only find an option to position the object by setting the coordinates of the rectangle that contains the polygon.

I have three data points in a diagram from which I want to create a triangle. I know I can use lines, but then I cannot fill the triangle.

lkb0221

China
497 Posts

Posted - 01/08/2014 :  10:52:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, Bur

You can use "Fill Area Under Curves"->"Include broken by missing values" in Plot Details dialog, Lines tab to fill the triangle when create from worksheet by line (or line+symbol). See the example below:



Zheng
OriginLab

Edited by - lkb0221 on 01/08/2014 10:55:49 AM
Go to Top of Page

bur2000

Germany
36 Posts

Posted - 01/09/2014 :  05:54:26 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks, but I would rather use the object feature to include the triangle and not include it as data points from a workbook. Is it possible to move the polygon in that case?
Go to Top of Page

lkb0221

China
497 Posts

Posted - 01/09/2014 :  09:46:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
To both keep moving and accurate coordinates, I think you can try to plot this triangle in a separate layer with both X and Y scale linked. and use "Analysis: Data Manipulation: Vertical/Horizontal Translate" to move it.

Edited by - lkb0221 on 01/09/2014 09:46:20 AM
Go to Top of Page

lkb0221

China
497 Posts

Posted - 01/09/2014 :  12:23:35 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If you don't mind, you can also use script to control each point of your polygon object.
For a triangle, there will be 3 points.
After you created a polygon object, you can give it a name for programming use by right click the object and select "Programming Control", by default is "polygon".
Then in Script Window, type the following commands:

polygon.x1 = 2;
polygon.y1 = 2; // First point at (2,2)
polygon.x2 = 8;
polygon.y2 = 2; // Second point at (8,2)
polygon.x3 = 4;
polygon.y3 = 8; // Third point at (4,8)

"object.x#", "object.y#" means the axes position of the #th point of an object.
Then there is no need for worksheet data in this case.

Zheng
OriginLab
Go to Top of Page

bur2000

Germany
36 Posts

Posted - 01/10/2014 :  04:01:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks, that's exactly what I needed.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000