Code covered by the BSD License  

Highlights from
GEAR3D

4.57143

4.6 | 7 ratings Rate this file 7 Downloads (last 30 days) File Size: 3.97 KB File ID: #9890
image thumbnail

GEAR3D

by Jiro Doke

 

03 Feb 2006 (Updated 27 Feb 2006)

GUI example of 3D gear. Use mouse to roll the gear.

| Watch this File

File Information
Description

***This has no practical use. I made it as my own exercise for 3d animation. You have been warned.***

GEAR3D GUI example of 3D gear.

GEAR3D will pop up a GUI example of 3D gear. The gear rolls on a geared ground based on the mouse location. It uses the x-location of the mouse pointer for the gear location. Use the arrow keys to change the view. Press SPACEBAR to reset the view. This was inspired by Mike Agostini's 3D Clock submission in FEX:

http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=9671&objectType=file

The gear is made of 2 surface objects, and the ground is a single surface object. Since the moving part (gear) only contains 2 objects, the animation update is quite smooth. It uses OpenGL rendering.

GEAR3D accepts 3 optional arguments that specify the number of teeth on the gear, number of spokes, and the gear ratio between the ground and the gear.

Example:
 GEAR3D('teeth', 30) - default is 50.
 GEAR3D('spokes', 4) - default is 8.
 GEAR3D('ratio', 2) - default is 3. This also determines how big the ground radius is.

Only positive integers are allowed.

This was created in R13SP1, so nested function is not utilized. Nested function will improve how surface data are passed between functions.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
3d Clock with geartrain

MATLAB release MATLAB 6.5.1 (R13SP1)
Other requirements Also tested on R14SP3.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (7)
06 Feb 2006 John D'Errico

While i agree with the author that this has absolutely no practical use, I also see it as a nice learning tool. It is well enough commented internally so you can follow what was done. My choice of a rating was difficult. I chose to view this as a darn nice implementation of something totally useless, but still pretty.

06 Feb 2006 YOgesh Mehta

Simply superb and well commented. Thanks for sharing...

06 Feb 2006 Matt Fig

Very nice, well done.

07 Feb 2006 Terry Eldridge

Thanks! Gives me some really good ideas for my solar array deployment simulation...

25 Aug 2006 kushal khanal

a job i want to do too.

11 Mar 2008 Ali Khan

Nice Work Man. Anyway, I am doing some work in designing helical gears. Trying to find something related to this. If you have any idea please let me know.

07 Oct 2011 Mr Smart  
Please login to add a comment or rating.
Updates
27 Feb 2006

Changed code to pass parameters instead of using handles structure (for speed). Also inlined the stripped down version of the ROTATE function to speed up animation.

Tag Activity for this File
Tag Applied By Date/Time
gui tools Jiro Doke 22 Oct 2008 08:14:36
example Jiro Doke 22 Oct 2008 08:14:36
gui Jiro Doke 22 Oct 2008 08:14:36
animation Jiro Doke 22 Oct 2008 08:14:36
3d Jiro Doke 22 Oct 2008 08:14:36
surface Jiro Doke 22 Oct 2008 08:14:36
gear Jiro Doke 22 Oct 2008 08:14:36
rendering Jiro Doke 22 Oct 2008 08:14:36
3d Mani 03 Nov 2009 23:56:24
3d Andy 18 Oct 2011 17:39:06

Contact us at files@mathworks.com