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
 Line with a definite slope and length

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
jb240 Posted - 09/19/2016 : 11:00:27 AM
Origin Ver.OriginPro2016G and Service Release (Select Help-->About Origin):
Operating System:Win2010

Hello,

Is there a way to draw a line with a definite length and slope? I could only draw them manually and it takes time and not so aaccurate and also not so straight when I draw the diagonal intersecting line.

Thanks so much in advance.

Regards,
JB
2   L A T E S T    R E P L I E S    (Newest First)
jb240 Posted - 09/20/2016 : 06:51:35 AM
Hi Hideo,

Thsi works great. Thanks so much.

All the best!
JB

quote:
Originally posted by Hideo Fujii

Hi JB,

Could you please try the following script which creates a line segment object with
specified coordinates of the starting point, slope, and length:
GetN (X1) xx1
     (Y1) yy1
     (Slope) slope1
     (length) length1;
xx2=xx1+length1*cos(atan(slope1));
yy2=yy1+length1*sin(atan(slope1));
draw -l {xx1,yy1,xx2,yy2};
Hope you can get what you wanted by this script.

--Hideo Fujii
OriginLab

Hideo Fujii Posted - 09/19/2016 : 4:33:50 PM
Hi JB,

Could you please try the following script which creates a line segment object with
specified coordinates of the starting point, slope, and length:
GetN (X1) xx1
     (Y1) yy1
     (Slope) slope1
     (length) length1;
xx2=xx1+length1*cos(atan(slope1));
yy2=yy1+length1*sin(atan(slope1));
draw -l {xx1,yy1,xx2,yy2};
Hope you can get what you wanted by this script.

--Hideo Fujii
OriginLab

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