Skip to content

Involute spur gears generator and animation examples

License

Notifications You must be signed in to change notification settings

chromia/figgear

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

figgear

Involute spur gears generator and animation example written in Python. This library is for hobby use, and does not aim for correctness under ISO standard.

Prerequisites

  • Numpy
  • Pillow
  • Scipy

for gear_anim.py demo app

  • Pygame

for gear_3d.py demo app

  • PyOpenGL
  • GLFW
  • PyGLM

Usage

git clone https://github.com/chromia/figgear
cd figgear
python gear_anim.py
python gear.py outputfile module tooth_number [options]
python gear.py -h  # for more details

To run an Animation app

python gear_anim.py

To run 3D demo app(requires a graphics card which supports OpenGL 3.3 or later)

python gear_3d.py

To generate m=8, z=20 (m is module number, z is the number of teeth).

python gear.py sample.png 8 20

To specify the color of gear, add options thus

python gear.py sample.png 8 20 -r=255 -g=0 -b=255 -a=255  # RGBA=(255,0,0,255)

By default, outputted gear is quite rough. To improve quality add option "--ssaa" (antialias).

python gear.py sample.png 8 20 -r=255 -g=0 -b=255 -a=255 --ssaa=4

About

Involute spur gears generator and animation examples

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages