OpenSCAD general discussion

View all threads

Belt: Fascinating but not much use?

Fri, Jul 9, 2021 8:20 PM

Parkinbot wrote

Concerning the belt: You seem to spend one cycle on moving the belt one tooth.

Thanks for your comments.

That is correct. But stretching $t also stretches the distance moved. If it is increased 20x, the belt flies off the GUI. So, yes, one could raise the steps value (= number of teeth?) so that there are always teeth where they are supposed to be, but one would end up with a hellofa long belt that would have to be made to vanish at least in the region of the GUI/viewport using a "difference(){" function.

Parkinbot wrote

If you want to animate a gearing system e.g. with i=13:4. You need 13*4 cycles to correctly display the gears.

When that is exported to a .gif video, it would give a pretty big file, even if only every third frame is processed (I use VirtualDub2). This might be a problem for e-mails, forums and stuff that have limits.

Parkinbot wrote

Concerning the squares: Use multiplication instead instead of offseting the second golden square.

Perhaps I should not have used the word, ton. It's a hangover from the happy motorcycling days of my misspent youth and it means 100. That should have read "I would need each square in succession to slowly move up from 0 to 100 then jump back to zero and start again". I should also explain that the squares stand for teeth and need to keep the same distance apart. I'm not sure this would help, but i would want to try it out.

I have also been looking at loops, concatenation and recursion in the Users Manual but can't quite see how any of these might help. There are also no practical examples showing how to use them in a script to actually do something one might want to do - the maths seems to be an end in itself.

I have seen hints of another more flexible method of animation somewhere, but have regrettably lost the link. But This here looks interesting, it even does acceleration and deceleration of motion. Must pick my way through the script and do some experimentation - "monkey see, monkey do". Any help in speeding up that process would of course be appreciated.