Keywords: Epicyclic Gearing Stationary Sun.gif de Umlaufrädergetriebe; Zähne z<sub>Sonne</sub> 24 z<sub>Planeten</sub> 16 z<sub>Hohl</sub> 56 <br /> Antrieb Hohlrad; Abtreib Steg <math>i 1+\frac z_ Sonne z_ Hohl 1+\frac 24 56 1 4286</math><br /> Antrieb Steg; Abtreib Hohlrad <math>i \frac z_ Hohl z_ Sonne +z_ Hohl \frac 56 24+56 0 7000 </math> en Epicyclic gearing; Teeth z<sub>sun</sub> 24 z<sub>planet</sub> 16 z<sub>ring</sub> 56 2016-12-09 own Jahobr other versions <gallery caption> File Epicyclic_Gearing_Stationary svg stationary File Epicyclic_Gearing_Stationary_Carrier gif stationary carrier File Epicyclic_Gearing_Stationary_Ring gif stationary ring </gallery> Jahobr fl function Epicyclic_Gearing source code for drawing epicyclic gearing the shape of the gears is not precise It is a hack job that produces a GIF and a SVG 2016-12-09 Jahobr teethSun 24; if divisible by 4 ploting is easyer teethPlan 16; if divisible by 4 ploting is easyer teethRing teethSun+teethPlan 2; modul 16; carrierCol 0 1 0 7 0 1; green sunCol 1 0 7 0 ; yellow obviously palnetCol 0 2 0 2 1 ; blue obviously ringCol 1 0 2 0 2; red 0 6 0 2 0 8; violet diameterSun modul teethSun; diameterPlan modul teethPlan; diameterCarr diameterSun+diameterPlan; diameterRing diameterSun+diameterPlan+diameterPlan; figHandle figure 15674455 ; clf axesHandle axes; hold axesHandle 'on' set figHandle 'Units' 'pixel' ; set figHandle 'position' 1 1 1000 1000 ; big start image for antialiasing later x y width hight set axesHandle 'position' -0 05 -0 05 1 1 1 1 ; stetch axis bigger as figure easy way to get rid of ticks x y width hight xlim -diameterRing 0 75 diameterRing 0 75 ; ylim -diameterRing 0 75 diameterRing 0 75 ; axis equal; drawnow; for currentCase 1 3 switch currentCase case 1 Stationary_Sun nFrames 170; angleCarrier -linspace 0 pi/2 nFrames+1 ; define gear position in frames angleCarrier angleCarrier 1 end-1 ; remove last frame it would be double anglePlan angleCarrier teethSun/teethPlan+1 ; gear ratio anglePlan anglePlan + pi/teethPlan ; ALLIGNMENT; THIS MAY NEED MANUAL ADJUSTMENT angleRing angleCarrier teethSun+teethRing / teethRing; gear ratio angleRing angleRing + 0; ALLIGNMENT; THIS MAY NEED MANUAL ADJUSTMENT angleSun zeros size anglePlan ; saveName 'Epicyclic_Gearing_Stationary_Sun'; case 2 Stationary_Ring nFrames 170; angleCarrier -linspace 0 pi/2 nFrames+1 ; define gear position in frames angleCarrier angleCarrier 1 end-1 ; remove last frame it would be double anglePlan angleCarrier teethSun/teethPlan+1 ; gear ratio anglePlan -anglePlan + pi/teethPlan ; ALLIGNMENT; THIS MAY NEED MANUAL ADJUSTMENT angleSun angleCarrier 1+teethRing/teethSun ; gear ratio angleSun angleSun + 0; ALLIGNMENT; THIS MAY NEED MANUAL ADJUSTMENT angleRing zeros size anglePlan ; saveName 'Epicyclic_Gearing_Stationary_Ring'; case 3 Stationary_Carrier nFrames 20; angleSun -linspace 0 pi 2/teethSun nFrames+1 ; define gear position in frames angleRing -angleSun teethSun/teethRing ; gear ratio angleRing angleRing + 0; ALLIGNMENT; THIS MAY NEED MANUAL ADJUSTMENT anglePlan angleSun teethSun/teethPlan ; gear ratio anglePlan -anglePlan + pi/teethPlan ; ALLIGNMENT; THIS MAY NEED MANUAL ADJUSTMENT angleCarrier zeros size anglePlan ; saveName 'Epicyclic_Gearing_Stationary_Carrier'; end for iFrame 1 nFrames cla axesHandle fresh frame ring drawRingGear axesHandle teethRing modul ringCol angleRing iFrame sun drawCogWheel axesHandle 0 0 teethSun modul sunCol angleSun iFrame ; planets for iPlan 0 pi/2 pi pi 1 5 X Y pol2cart iPlan+angleCarrier iFrame diameterCarr/2 ; drawCogWheel axesHandle X Y teethPlan modul palnetCol anglePlan iFrame ; plnatetary gear end carrier X Y pol2cart 0 0 25 2 2 -0 25 0 pi+angleCarrier iFrame ones 1 9 diameterCarr/2 05 ones 1 9 diameterCarr/1 75 ; patch X Y carrierCol 'EdgeColor' 0 0 0 'LineWidth' 1 0 full outer disc angleOffPoints 0 pi/20 2 pi ; X Y pol2cart angleOffPoints diameterPlan 0 25 ; X X+diameterCarr/2; angg radd cart2pol X Y ; for iPlan 0 pi/2 pi pi 1 5 X Y pol2cart angg+iPlan+angleCarrier iFrame radd ; patch X Y carrierCol 'EdgeColor' 0 0 0 'LineWidth' 1 0 full outer disc plot axesHandle X Y 'linewidth' 2 'color' 0 0 0 ; draw outer circle end angleOffPoints 0 pi/20 2 pi ; X Y pol2cart angleOffPoints diameterPlan 0 15 ; X X+diameterCarr/2; angg radd cart2pol X Y ; for iPlan 0 pi/2 pi pi 1 5 X Y pol2cart angg+iPlan+angleCarrier iFrame radd ; patch X Y palnetCol 'EdgeColor' 0 0 0 'LineWidth' 1 0 full outer disc plot axesHandle X Y 'linewidth' 2 'color' 0 0 0 ; draw outer circle end save animation drawnow pause 0 01 f getframe figHandle ; f cdata imresize f cdata 0 5 ; the size reduction adds antialiasing if iFrame 1 im map rgb2ind f cdata 16 'nodither' ; 64 colores create color map im imresize im 1 ; im 1 1 1 nFrames 0; allocate if currentCase 1 plot2svg 'Epicyclic_Gearing_Stationary svg' figHandle by Juerg Schwizer See http //www zhinst com/blogs/schwizer/ end else imtemp rgb2ind f cdata map 'nodither' ; im 1 iFrame imtemp; end end imwrite im map saveName ' gif' 'DelayTime' 1/25 'LoopCount' inf save gif end return function drawCogWheel axesHandle center toothNumber modul colFilling startOffset DRAWTOOTHEDWHEEL - draw a simple Toothed Wheel Input axesHandle center x y toothNumber scalar modul scalar tooth size col color of line r g b colFilling color of filling r g b startOffset start rotation scalar rad effectiveRadius modul toothNumber/2; effective effectiveRadius outsideRadius effectiveRadius+1 modul; +---+ +---+ upperRisingRadius effectiveRadius+0 5 modul; / \ / \ effective Radius / \ / \ lowerRisingRadius effectiveRadius-0 5 modul; I I I I rootRadius effectiveRadius-1 1 modul; + - - - + + - - - + + angleBetweenTeeth 2 pi/toothNumber; angle between 2 teeth angleOffPoints 0 angleBetweenTeeth/16 2 pi ; angleOffPoints angleOffPoints+startOffset; apply rotation offset angleOffPoints 7 16 end angleOffPoints 7 16 end + 1/toothNumber 1 2; hack to create smaller tooth tip angleOffPoints 11 16 end angleOffPoints 11 16 end - 1/toothNumber 1 2; hack to create smaller tooth tip angleOffPoints 8 16 end angleOffPoints 7 16 end + angleOffPoints 9 16 end /2; shift the neighbouring tip point in accordingly angleOffPoints 10 16 end angleOffPoints 11 16 end + angleOffPoints 9 16 end /2; shift the neighbouring tip point in accordingly angleOffPoints 6 16 end angleOffPoints 6 16 end + 1/toothNumber 1 7; hack to create slender tooth angleOffPoints 12 16 end angleOffPoints 12 16 end - 1/toothNumber 1 7; hack to create slender tooth radiusOffPoints angleOffPoints; allocate with correct site radiusOffPoints 1 16 end rootRadius; center bottom I radiusOffPoints 2 16 end rootRadius; left bottom I radiusOffPoints 3 16 end rootRadius; left bottom corner + radiusOffPoints 4 16 end lowerRisingRadius; lower rising bottom \ radiusOffPoints 5 16 end effectiveRadius; rising edge \ radiusOffPoints 6 16 end upperRisingRadius; upper rising edge \ radiusOffPoints 7 16 end outsideRadius; right top corner + radiusOffPoints 8 16 end outsideRadius; right top I radiusOffPoints 9 16 end outsideRadius; center top I radiusOffPoints 10 16 end outsideRadius; left top I radiusOffPoints 11 16 end outsideRadius; left top corner + radiusOffPoints 12 16 end upperRisingRadius; upper falling edge / radiusOffPoints 13 16 end effectiveRadius; falling edge / radiusOffPoints 14 16 end lowerRisingRadius; lower falling edge / radiusOffPoints 15 16 end rootRadius; right bottom corner + radiusOffPoints 16 16 end rootRadius; right bottom I X Y pol2cart angleOffPoints radiusOffPoints ; X X+center 1 ; center offset Y Y+center 2 ; center offset patch X Y colFilling 'EdgeColor' 0 0 0 'LineWidth' 1 0 plot axesHandle X Y '-x' 'linewidth' 2 'color' 0 0 0 ; effective Radius X Y pol2cart angleOffPoints effectiveRadius ; X X+center 1 ; center offset Y Y+center 2 ; center offset plot axesHandle X Y '- ' 'color' 0 0 0 ; subfunction for the outer static gear function drawRingGear axesHandle toothNumber modul colFilling startOffset effectiveRadius modul toothNumber/2; effective effectiveRadius outsideRadius effectiveRadius-1 modul; +---+ +---+ upperRisingRadius effectiveRadius-0 5 modul; / \ / \ effective Radius / \ / \ lowerRisingRadius effectiveRadius+0 5 modul; I I I I rootRadius effectiveRadius+1 1 modul; + - - - + + - - - + + angleBetweenTeeth 2 pi/toothNumber; angle between 2 teeth angleOffPoints 0 angleBetweenTeeth/16 2 pi ; angleOffPoints angleOffPoints+startOffset; apply rotation offset outerEdge maxRadius rootRadius 1 2; definition of outer line X Y pol2cart angleOffPoints maxRadius ; patch X Y colFilling 'EdgeColor' 0 0 0 'LineWidth' 1 0 full outer disc plot axesHandle X Y 'linewidth' 2 'color' 0 0 0 ; draw outer circle inner teeth radiusOffPoints angleOffPoints; init angleOffPoints 7 16 end angleOffPoints 7 16 end + 1/toothNumber 1 2; hack to create smaller tooth tip angleOffPoints 11 16 end angleOffPoints 11 16 end - 1/toothNumber 1 2; hack to create smaller tooth tip angleOffPoints 8 16 end angleOffPoints 7 16 end + angleOffPoints 9 16 end /2; shift the neighbouring tip point in accordingly angleOffPoints 10 16 end angleOffPoints 11 16 end + angleOffPoints 9 16 end /2; shift the neighbouring tip point in accordingly angleOffPoints 6 16 end angleOffPoints 6 16 end + 1/toothNumber 1 7; hack to create slender tooth angleOffPoints 12 16 end angleOffPoints 12 16 end - 1/toothNumber 1 7; hack to create slender tooth radiusOffPoints 1 16 end rootRadius; center bottom I radiusOffPoints 2 16 end rootRadius; left bottom I radiusOffPoints 3 16 end rootRadius; left bottom corner + radiusOffPoints 4 16 end lowerRisingRadius; lower rising bottom \ radiusOffPoints 5 16 end effectiveRadius; rising edge \ radiusOffPoints 6 16 end upperRisingRadius; upper rising edge \ radiusOffPoints 7 16 end outsideRadius; right top corner + radiusOffPoints 8 16 end outsideRadius; right top I radiusOffPoints 9 16 end outsideRadius; center top I radiusOffPoints 10 16 end outsideRadius; left top I radiusOffPoints 11 16 end outsideRadius; left top corner + radiusOffPoints 12 16 end upperRisingRadius; upper falling edge / radiusOffPoints 13 16 end effectiveRadius; falling edge / radiusOffPoints 14 16 end lowerRisingRadius; lower falling edge / radiusOffPoints 15 16 end rootRadius; right bottom corner + radiusOffPoints 16 16 end rootRadius; right bottom I X Y pol2cart angleOffPoints radiusOffPoints ; patch X Y 1 1 1 'EdgeColor' 0 0 0 'LineWidth' 1 0 overlay white area for inner teeth plot axesHandle X Y '-' 'linewidth' 2 'color' 0 0 0 ; teeth line cc-zero Epicyclic gears Animations of gears and gearboxes Animations on white background Blue green red yellow |