Linked gears
6 posts • Page 1 of 1
Linked gears
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
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!
-

frogman786 - Posts: 71
- Joined: Fri Jan 07, 2011 8:32 am
- Location: Christchurch, New Zealand
Re: Linked gears
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.
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.
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.
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...
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.
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.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
Re: Linked gears
i was hoping to do it in thyme but that spring idea should work for what im trying to do
thanks
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!
-

frogman786 - Posts: 71
- Joined: Fri Jan 07, 2011 8:32 am
- Location: Christchurch, New Zealand
Re: Linked gears
Glad I could help. 
Matthias Wandel is epic, in my humble opinion.
I love my brain...
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.
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.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
Re: Linked gears
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.
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...
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.
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.
-

Someone Else - Posts: 1147
- Joined: Sun Nov 21, 2010 10:53 pm
- Location: The Milky Way Galaxy
Re: Linked gears
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!
-

frogman786 - Posts: 71
- Joined: Fri Jan 07, 2011 8:32 am
- Location: Christchurch, New Zealand
6 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests



