How do I attach a slider to a line to make it move?

Soggy Socks shared this question 4 years ago
Answered

I'm trying to illustrate the relationship between two points using a triangle, then normalizing the distance using animation. I just want to slide segment g left and right to show the values change in real time.


I don't know how to make a slider do this. The other problem is that points E and D are not a perpendicular line of vector b.


How can I do this?


rfYDtZ4

Comments (14)

photo
1

Thank you Noel Lambert!

Sorry, but I wasn't able to follow your instructions. I'm very new at this geogebra program.

photo
1

OK! That is pretty cool. I wish I knew how to do that. I appreciate this. I'll study what you sent me and see if I can figure it out.

photo
1

I am also new at Geogebra, and just attached a slider to a line, allowing it to move. I found this tutorial (and the previous 1 by the same author) were really useful. It runs at a good pace, and build ups, so I could work up to what I was trying to achieve.

https://www.youtube.com/wat...


The thing that was key was that the slider needed to be created before the line you are moving. Here's my very first attempt at making a slider.

Here's my ggb URL. I'm now off to figure out how to restrict the domains on my lines.

https://www.geogebra.org/m/E5HPD4hn

photo
1

Kim and Soggy Socks, here some additional comment on Noels answer in case you don't understand yet what's happening.

If you want to move a point from A to B you can create a vector u= Vector (A,B) and define the translation as A+u. Now if you want to do this dynamically, you could create a slider d from 0 to 1. If you define D as A+d * u it will be at A when the slider has got 0 as value (a+ 0* u). And it will end up its translation at point B, when the slider is arrived at 1: A+ 1*u. Between 0 and 1 you can see it moving to look dynamic. And instead of creating the vector u you can use Vector(A,B) instead. This procedure you can use to look all transformations dynamic (so rotations as well).


86973806f862d66cf95a75ac58bcfb6e

photo
photo
1

also 483dc602a91c9334d77756302c5189c5

photo
1

can you please show me how to apply this technique using a triangle .

I want to produce something like in this video . struggle to understand the programming behind it.

https://youtu.be/lvY6GLbbFzA Description states is animation. could this be sliders?

would really appreciate if someone can help understand the programming behind it.

just want to overlap the triangles on the exterior shape onto the middle shape. to show a visual proof of area using animation.


photo
1

i hope the attachement will help

photo
1

see file

photo
2

see also

photo
1

Thank you for the gift Alfabeta2, I can spot my first mistake in creating something similar, I was using a non-static quadrilateral. I have not used the conic option before . Will try to understand the programming behind it as I want to make one of my own.

Thank you Noel Lambert , I want to create something like that , just wanted to read how did you make that, what is behind the scenes . what were the steps to create it ? .

photo
1

YOU CAN VARY THE DIMENSIONS MOVING THE POINT IN THE VARIGNO FILE1

PUOI CANBIARE LE DIMENSIONI MUOVENDO IL PUNTO NEL FILE VARIGNO1

photo
1

Hi Alfabeta2 , I am struggling to understand the connection between the slider, ellipse and rotation. I have read the description in the VARIGNO FILE1, any chance you have a tutorial, on how to construct your project? as to many items are connected. I have notice that you created the slide with pi value, than the second slide is connected with the distance m between the 2 triangles. but the vectors in the ellipse are in condition with the m . and there I am lost. as I do not understand how you created the ellipse that changes with the vectors. vectors have the size m . there is a condition there probably that I am missing.

photo
1

try attached (sorry, i do not speak english)

photo
photo
1

Maybe this attachment is more easy to understand (less objects)

Each movement has his own slider with a value from 0 to 1 (a for red, b for blue).

This value is a multiplicator for the maximum-value of movement. So the moving go from 0 to the maximum.

The red movement is a rotation with the maximum 180°

The blue movement ist a translation with a vector between 2 points. The length can be between 0 and the distance between the 2 points when the vector is multiply with b (a value multiply with a vector change the length of vector but not the direction of vector).

The animation over all is following the slider "animation". This slider set the sliders a and b with the script onUpadate (in animation) to a value (depending on "animation"). For complex movements (many objects, many time dependencies/sequences) exists others principles/solutions.

© 2022 International GeoGebra Institute