Linked gears

About advanced scenes, and the Thyme scripting language used in Algodoo.

Linked gears

Postby frogman786 » Thu Jan 13, 2011 2:08 am

I need a simple script to make two gears move together so when i drag 1 the other one turns at the same speed i've tried but i can't seem to get it right
Thanks in advanced
DFTBA nerdfighters

TheWonkits wrote:As immature as some of the people on this forum can be, most of you are pretty cool.

TC42 wrote:Better than spell-check... ...TC42's instant grammar-correction posts! :lol:
User avatar
frogman786
 
Posts: 71
Joined: Fri Jan 07, 2011 8:32 am
Location: Christchurch, New Zealand

Re: Linked gears

Postby Someone Else » Thu Jan 13, 2011 4:29 am

You want to do that through Thyme?

All you need to do is make a drive shaft by connecting corresponding points with hinged noncolliding bars. That is, connect the point 1.5 meters above the hinge on one gear with the point 1.5 meters above the other gear. However, this will also prevent the gears from moving closer together or farther apart.

If you want to allow the center distance to change, you could try replacing the rigid bars with springs. In Phun, I found that minimal strength and a really big number for damping worked well. Basically, severely over-damped Slinkys. In Algodoo, not so much. :problem:

You also might be able to use lasers in some weirdly complicated way to figure out the speed of one gear, set scene.my.speed equal to that, and set the speed of a motor connected to the other gear equal to scene.my.speed. I have no clue what that code would be, but if it works then it would work quite well.

If that helps, I am glad I could be of assistance, if not, well, ignore this post.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.

ARE YA HAPPY NOW?????

Thymechanic/Phundamentalist

Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
User avatar
Someone Else
 
Posts: 1147
Joined: Sun Nov 21, 2010 10:53 pm
Location: The Milky Way Galaxy

Re: Linked gears

Postby frogman786 » Thu Jan 13, 2011 4:36 am

i was hoping to do it in thyme but that spring idea should work for what im trying to do
thanks
DFTBA nerdfighters

TheWonkits wrote:As immature as some of the people on this forum can be, most of you are pretty cool.

TC42 wrote:Better than spell-check... ...TC42's instant grammar-correction posts! :lol:
User avatar
frogman786
 
Posts: 71
Joined: Fri Jan 07, 2011 8:32 am
Location: Christchurch, New Zealand

Re: Linked gears

Postby Someone Else » Fri Jan 14, 2011 12:40 am

Glad I could help. :)
Matthias Wandel is epic, in my humble opinion.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.

ARE YA HAPPY NOW?????

Thymechanic/Phundamentalist

Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
User avatar
Someone Else
 
Posts: 1147
Joined: Sun Nov 21, 2010 10:53 pm
Location: The Milky Way Galaxy

Re: Linked gears

Postby Someone Else » Fri Jan 14, 2011 8:23 pm

After I posted the above comment, I realized that there is a better way to do it than springs. Take the hinged, noncolliding shaft idea and put an elbow sort of thing.
My attempt at an ASCII art for this concept:
O..........O
..\......./
...\..../
....\./
.....O

Bsaically, make a drive shaft connecting one circle to another circle off to the side somewhere, move that arbitrary circle to the front, and make another drive shaft connecting it to the other circle. It should work great, but beware that problems could arise when the distance between the original circles becomes zero, but I can't explain that here. The zero distance spot allows the shafts to swing out anywhere they want. Also, this thing has a finite distance it can stretch, which is probably much less than low strength, high damping springs.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.

ARE YA HAPPY NOW?????

Thymechanic/Phundamentalist

Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
User avatar
Someone Else
 
Posts: 1147
Joined: Sun Nov 21, 2010 10:53 pm
Location: The Milky Way Galaxy

Re: Linked gears

Postby frogman786 » Fri Jan 21, 2011 4:03 am

thanks that works pefectly
DFTBA nerdfighters

TheWonkits wrote:As immature as some of the people on this forum can be, most of you are pretty cool.

TC42 wrote:Better than spell-check... ...TC42's instant grammar-correction posts! :lol:
User avatar
frogman786
 
Posts: 71
Joined: Fri Jan 07, 2011 8:32 am
Location: Christchurch, New Zealand


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 3 guests