# [kde-edu]: kig: "locking" a line

Noel Bush noel at x-31.com
Sun Jul 3 03:49:09 CEST 2005

```I have a simple scenario I want to demonstrate using kig, yet I'm not
sure how:

I want to set up a right triangle, with legs on the positive x and y
axes, and then I want to move the rightmost vertex horizontally.  I want
to show how the angle between the hypotenuse and the bottom leg changes
as I move this vertex.  And I want to show how the sine, cosine and
tangent change as this vertex moves.

I can create the triangle.  I can create the label for the angle.  What
I don't understand how to do are:

1) how to constrain the movement of the vertex to horizontal.  Ideally,
I could just press the left and right arrow keys to move it.  But this
doesn't seem to work.

2) how to show the computed ratios of sides in order to demonstrate the
changes in the trig functions.  I can make a label that includes the
individual lengths, but I don't know how to make these be calculated.

I would also love to know how to do something similar, but with an angle
in standard position: rotate a fixed-length ray (the terminal side of
the angle) around the origin.  Is there any way of doing this?  Both of
these possibilities would be wonderful ways of demonstrating the basic
trigonometic relationships to students.

Thanks,
Noel
```