how to copy and rotate a 2D graph around a circle ?

Dear Friends,
The graph I have;
There is a tooth on a circle which is red. I want to copy and increase the number of piece of this tooth around the circle. Is there any way to do this operation and how may I do?
Thanks to contributers.

 Accepted Answer

MATLAB isn’t intended to be an engineering design graphics language, but there is a possible way to do what you want. I have very little experience with this, and no experience remotely similar to what you want to do, so unlike your previous Questions, I’ll be of very limited help.
One possible method is to Create Object Groups from your gear tooth, then use hggroup, makehgtform, and hgtransform to position (translate) it and rotate it. You will have to do this around the entire circumference of your gear, so you will have to choose where to place it and how much to rotate it.
You can translate it using essentially the same sin and cos calls I used to draw the circles in my previous code. You might consider tan to do the rotations, but that is simply a suggestion.
Once you get the code for this working, submit it to the File Exchange with appropriate documentation. I was not able to find anything remotely similar. If you have access to SimMechanics (a Simulink Toolbox), see if it has anything about specifying, designing, and drawing gears.
Good luck!

8 Comments

Firstly, thank you for your explanation. I can reach my purpose by starting from your suggestion. If I can do that, I will submit.
Sir, I got the shape I want. However, I did it by rotating coordinate of points of tooth around circle which is creating the tooth profile ,not copying the graph. Probably this way is known well.
That certainly works! I didn’t know what you were starting with, so I suggested one option.
Consider writing your gear design and drawing routines together in one or more functions, document them thoroughly, and submit them together to the MATLAB File Exchange. (I searched there before I submitted my Answer, and did not find anything remotely similar.)
You have the opportunity to make a significant contribution to the MATLAB community.
I undestand. I will definetly do what you said sir.However, I need to learn how I should organize and submit this program there (whole program or just this section). I will be glad to contribute something, of course with your helps.
I will be happy to help with the MATLAB programming, but I am not a mechanical engineer. Talk with your engineering professor as well, since your professor will likely have some ideas on how best to proceed, what to include, and ways to make it easy for other mechanical engineers to use. You could also get academic credit for it, and you will be able to include your having written and submitted it in your curriculum vitae.
It will probably take a bit of time to get your program running the way you want, because you will want to include error traps and other checks to be sure people use it correctly and don’t enter bad information into it. When you are ready to submit it, include documentation showing its correct use, including how to enter data into it, what acceptable values are, and what it produces as output.
Contact MathWorks as well and see what they recommend.

Sign in to comment.

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!