circle involute
As part of a project to make a nice gear mesh with logo, I wondered how to generate the involute of a circle.
And it turned out that with some geometric understanding the egocentric turtle control makes the task somewhat intuitive. The turtle can follow the circumference of a circle in steps and at each step it is easy to figure the heading of the tangent of the circle.
The initial shape of the involute close to the circle has properties advantagous for teeth of gears. I have a larger project in mind to construct a nice gear mechanism and so the first step was to figure out how to generate nice teeth. This practical article helped as well as wikipedia:
http://www.cartertools.com/involute.html
Here is the logo:
TO involute :rd :step :iter MAKE "start POS REPEAT :iter [ ;move along circle LT :step FD 2 * :rd * SIN(:step) ;find tangent RT 180-:step ;unroll string FD 2 * :step * 3.1415/180 * :rd * REPCOUNT MAKE "end POS ;connect end points SETPOS :start ;move back SETPOS :end MAKE "start :end BACK 2 * :step*3.1415/180 * :rd * REPCOUNT ;turn forward LT 180 NEXTCOLOR ] END ;involute (for gears) RESET CLEARSCREEN RU 90 PD ;involute radius step_angle iterations involute 1 5 18 PU SHOWALL
I found out that it is necessary to define a procedure first in the code before it can be called.
- aplesch's blog
- Login or register to post comments
- 4526 reads
Comments
Nice gear project?
Are you still working on the nice gear project? I am sure that Logo can do a good job.
I have blogged one prototype but found that was quite wrong... haha.. I think that I am lacking the engineering knowledge about gears but I found that I benefit from my own VRMath2 as I am learning not just maths but also engineering....
https://vrmath2.net/content/gear-2d-prototype
Interesting spiral
Just played with involute 1 10 72 and came up with an interesting sprial.
Syntax & syntax highlighting & polygon for gear
Logo does require all procedures to be parsed before they can be called. :-p
The syntax highlighting also has some problem. I used Geshi library to do the syntax highlighting in Blogs, can't work out how to separate variables from keywords.... Unlike the syntax highlighting in VRMath2 Editor, I seemed to have worked it out with CordMirror..All fixed. :-)Thanks for sharing the involute web article. I think that the egocentric movement does have some advantage into making gears. But that will requires some mathematics, and that it also one of my purpose of VRMath2 learning environment to engage students in applying/developing their STEM knowledge and skills. I think that there are probably some professional authoring tools that can create gears by just dragging (direct manipulation). But in doing so, there is no/less opportunity to learn the maths ideas in Nick Carter's article (http://www.cartertools.com/involute.html) for example.
I will actually start from a polygon formula for gears:
For enginnering, the nice teeth will be important. More maths and movements will be required. It will not be simply the forward and right turn in the spuare bracket, but some more movements to get a tooth. Once the 3D points of gears are collected, it should not be difficult to create faces and to make it 3D. Then to know the center of the gear may be needed, and I can find online some ways (and formula) to find the center of regular polygons.