cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

How to adjust the length of a line passing through a point?

Cornel
19-Tanzanite

How to adjust the length of a line passing through a point?

Hello,

Cornel_0-1696235979332.png

Default plot of the line passing through the point (1,1) in Mathcad Prime:

 

Cornel_0-1696237277028.png

 

My desire: 

Having a point, for example: (x, F(x)) = (1,1), I would like to be able to adjust the LENGTH of the line passing through that point (1,1), in order the length of the line to be smaller or larger as shown below. How could I do this?

Cornel_3-1696236116287.png

Cornel_4-1696236142898.png

Cornel_5-1696236177001.png

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:Cornel)

Or more elaborate

Werner_E_0-1696247726874.png

Werner_E_0-1696262981016.png

 

 

 

View solution in original post

6 REPLIES 6
Werner_E
25-Diamond I
(To:Cornel)


@Cornel wrote:

 

My desire: 

Having a point, for example: (x, F(x)) = (1,1), I would like to be able to adjust the LENGTH of the line passing through that point (1,1), in order the length of the line to be smaller or larger as shown below. How could I do this?

 


Simply plot the line segment by providing the coordinates of the two end points:

Werner_E_0-1696246023400.png

Of course you also could provide a range for the abscissa values to limit the line

Werner_E_0-1696248203343.png

 

 

Werner_E
25-Diamond I
(To:Cornel)

Or more elaborate

Werner_E_0-1696247726874.png

Werner_E_0-1696262981016.png

 

 

 

Werner_E
25-Diamond I
(To:Werner_E)

But of course there are so many different ways to achieve the same effect. If you prefer you may also use complex numbers

Werner_E_0-1696250041929.png

Werner_E_1-1696263035720.png

 

 

Cornel
19-Tanzanite
(To:Werner_E)

What does "both" parameter? 

LucMeekes
23-Emerald III
(To:Cornel)

The parameter both, if set to non-zero, makes the line go to both sides of the point P.

 

Success!

Luc

Werner_E
25-Diamond I
(To:LucMeekes)


@LucMeekes wrote:

The parameter both, if set to non-zero, makes the line go to both sides of the point P.

 

Success!

Luc


Of course correct. And this also means that the total length of the line segment is twice the length provided by the "dist" argument in that case. If thats not desired the function must be slightly modified.

Announcements

Top Tags