# Slope-triangle

lejos shared this idea 8 years ago

The command "slope(line)" gives not only the value of slope but draws a slope triangle in EV, too.

It would be very helpful to use this command in connection with abitrary functions.

Example:

f(x):=sin(x)

A=Point[f]

Slope[f,A] -> should give the value of slope in point A (in AV) of function f and should draw a slope-triangle at point A (in EV).

Best regards,

Josef.

P.S.: i know this could be done using a tangent in point A, nevertheless a straight method getting a slope triangle is really helpful in various contexts.

1

Have you tried making a custom Tool to do this?

1

Till now: no, i haven't.

Best regards,

Josef.

1

Slope[Tangent[A, f]]

?

I've tried a custom tool but the slope seems to be created from the point intersect with the tangent and the y-axis, and not the point in the curve. (move A)

https://ggbm.at/566695

1

Thanks, that's nice.

Best regards,

Josef.

1

Hi Joseph,

It contains two tools:

Slope Triangle that only draws the Slope Triangle (!!)

and

Slope with text that draws the Slope Triangle and creates a text with value of the slope.

A function must exist.

You must (in this order) select a function, a point on the function and a number.

If no point is already set, it will be set on the second click.

The number specifies the horizontal width of the triangle (normally 1).

If you enter an existing variable, you can change the width afterwards wihout modifying the definition.

Slope with text adds a text at about the middle height of the triangle containing the value of the slope.

Gerhard