POV-Ray : Newsgroups : povray.binaries.utilities : Looking for gears Server Time
23 Dec 2024 03:54:40 EST (-0500)
  Looking for gears (Message 1 to 9 of 9)  
From: xsqr
Subject: Looking for gears
Date: 20 Jul 1999 15:21:05
Message: <3794c090.43567033@news.povray.org>
Are there any utilities (programs, .inc's, plugins) for automating the
creation of gears?

Also, how could I create an object (specifically gears) using involute
curves. I can see creating a curved surface, but what about a solid?
Is there a way of using polar coordinates in POV-Ray?


Post a reply to this message

From: Ken
Subject: Re: Looking for gears
Date: 20 Jul 1999 16:07:39
Message: <3794D691.3B81D030@pacbell.net>
xsqr wrote:
> 
> Are there any utilities (programs, .inc's, plugins) for automating the
> creation of gears?

Cog include file:
http://www.barmy.demon.co.uk/index.htm

Gear include file:
http://www.ica.uni-stuttgart.de/~marc/gearinc.htm

-- 
Ken Tyler
  
mailto://tylereng@pacbell.net
http://home.pacbell.net/tylereng/links.htm


Post a reply to this message

From: TonyB
Subject: Re: Looking for gears
Date: 20 Jul 1999 22:49:55
Message: <37952718.CBD30115@panama.phoenix.net>
> Also, how could I create an object (specifically gears) using involute
> curves. I can see creating a curved surface, but what about a solid?
> Is there a way of using polar coordinates in POV-Ray?

I think the new version of the isosurface patch in the superpatch will
have support for this. Just wait for Ron Parker to announce the new
version of the superpatch, which should include that, AFAIK.

--
Anthony L. Bennett
http://welcome.to/TonyB

Graphics rendered
by the Dreamachine.


Post a reply to this message

From: David Wilkinson
Subject: Re: Looking for gears
Date: 21 Jul 1999 15:55:32
Message: <37972354.30518106@news.povray.org>
On Tue, 20 Jul 1999 19:17:21 GMT, dar### [at] engusfedu (xsqr) wrote:

>Are there any utilities (programs, .inc's, plugins) for automating the
>creation of gears?
>
>Also, how could I create an object (specifically gears) using involute
>curves. I can see creating a curved surface, but what about a solid?
>Is there a way of using polar coordinates in POV-Ray?

I've wanted an excuse to do some gears, so here is my re-invention of the gear wheel.
It's different to Mr Schimmler's gear.inc file in as much as it's based more on
British/US
practice which uses Diametral Pitch rather than Modul.
It's also in macro form and may be a bit easier to understand. 
BTW as POV has a pretty full range of trig functions, as well as rotations,
translations,
scaling, shearing, and a full matrix transformation it's easy to from polar to
cartesian.

//---------------------------------------------------------------------------
// Persistence of Vision Ray Tracer Scene Description File
// Involute Gear Example
// Date: 21 July 1999
// Auth: D.G.Wilkinson
//
#version 3.1;
#include "colors.inc"
global_settings
{
  assumed_gamma 1.0
}

camera
{
  location  <25/8, 0, -4.0>
  direction 1.5*z
  right     4/3*x
  look_at   <25/8 0,  0.0>
}

sky_sphere
{
  pigment
  {
    gradient y
    color_map { [0.0 color blue 0.6] [1.0 color rgb 1] }
  }
}

light_source
{
  <-30, 30, -30> 
  color rgb 1
}

// The gear macro. DP is the Diametral Pitch

#macro Gear(NumTeeth,DP,FaceWidth)
#declare PitchRad = NumTeeth/(2*DP); // this can be accessed outside the macro
#local BaseRad = PitchRad*cos(radians(20)); // from which the involute is generated
#local AngulPitch = 2*pi/NumTeeth;  // in radians
#declare PitchAngle = degrees(AngulPitch); // needed outside the macro
#local InvPoint = array[22]  // array for points on the involute curve
#local Inv20=tan(radians(20))-radians(20); // assumes a pressure angle of 20 degrees
#local Incr=2/(DP*10);  // 10 increments on the involute
#local R1=PitchRad-1/DP; // the radius at which the co-ords are calculated
#local Counter = 1;

  #while (Counter<10.5)
        #local Psi = acos(BaseRad/R1);
        #local T1 = BaseRad*tan(Psi);
        #local Inv = T1/BaseRad-Psi; // the involute function as used in gear design

        #local InvPoint[Counter] = <R1*sin(Inv),R1*cos(Inv)>; // left flank
        #local InvPoint[21-Counter] = <R1*sin(-Inv+2*Inv20+AngulPitch/2),  // right
flank
                                       R1*cos(-Inv+2*Inv20+AngulPitch/2)>;
        #local Counter = Counter + 1;
        #local R1 = R1 + Incr;
        #end
 #local InvPoint[0] = <0,PitchRad-1.26/DP>; // points on the root (off the involute)
 #local InvPoint[21] = <(PitchRad-1.26/DP)*sin(2*Inv20+AngulPitch/2),
                        (PitchRad-1.26/DP)*cos(2*Inv20+AngulPitch/2)>;
        
#local Count=0;
#local Tooth =   // the whole tooth and nothing but the tooth
     prism { -FaceWidth,0, 23
            #while (Count < 21.5)
                InvPoint[Count]
               #local  Count=Count+1;
            #end
            InvPoint[0] // repeat the first point to close the prism
     }
     
   union{  // this is the gear with a tooth centred on the +y axis
        #local N1 = 0;
        #while (N1<NumTeeth) // place the teeth
           object {Tooth rotate -x*90 rotate z*N1*360/NumTeeth }
        #local N1=N1+1;
        #end      
        cylinder { <0,0,FaceWidth>,<0,0,0>,PitchRad-1.25/DP } // add the disc
        rotate <0,0,degrees(Inv20+AngulPitch/4)>  // rotate it so a tooth is centered
   }
#end

#declare N1=25;  // number of teeth in the gear
#declare N2=15;  // number of teeth in the pinion
#declare DP=4;   // Diametral Pitch
#declare Centres=(N1+N2)/(2*DP);
 
// the gears are rotated so that they will correctly mesh.
// animated using the clock variable
object { Gear(N2,DP,1) rotate <0,0,(clock*PitchAngle)+90-PitchAngle/2>
                                                    translate <Centres,0,0> pigment
{Red}}
object { Gear(N1,DP,1.1) rotate <0,0,-(clock*PitchAngle)-90> pigment {White}}
//--------------- End of program --------------------------

David
------------
dav### [at] cwcomnet
http://www.hamiltonite.mcmail.com
------------


Post a reply to this message

From: Marc Schimmler
Subject: Re: Looking for gears
Date: 22 Jul 1999 03:30:12
Message: <3796C87E.2088B3F7@ica.uni-stuttgart.de>
David Wilkinson wrote:
> 
> On Tue, 20 Jul 1999 19:17:21 GMT, dar### [at] engusfedu (xsqr) wrote:
> 
> >Are there any utilities (programs, .inc's, plugins) for automating the
> >creation of gears?
> >
> >Also, how could I create an object (specifically gears) using involute
> >curves. I can see creating a curved surface, but what about a solid?
> >Is there a way of using polar coordinates in POV-Ray?
> 
> I've wanted an excuse to do some gears, so here is my re-invention of the gear
wheel.
> It's different to Mr Schimmler's gear.inc file in as much as it's based more on
British/US
> practice which uses Diametral Pitch rather than Modul.
> It's also in macro form and may be a bit easier to understand.
> BTW as POV has a pretty full range of trig functions, as well as rotations,
translations,
> scaling, shearing, and a full matrix transformation it's easy to from polar to
cartesian.
> 

Thanks David! 

I will have a look at it. About two weeks ago the Loial Raven sent me
his version of a gear macro. He hasn't decided yet to publish it but I
would strongly encourage him to do so. It's much faster than mine when
it comes to csg because of the bounding he uses and it's a macro and not
an include file like mine (at time I was writing this no 3.1 version for
linux existed). Maybe I find some to improve my file and change it to a
macro.
I would also like to learn about the diametral pitch. If you have a
pointer for me I would be quite happy. My long term plan is to create a
library of technical parts for povray to have the possibility to
visualize mechanical constructions.


Have a nice day,

Marc

-- 
Marc Schimmler


Post a reply to this message

From: David Wilkinson
Subject: Re: Looking for gears
Date: 22 Jul 1999 07:57:43
Message: <37970333.1859673@news.povray.org>
On Thu, 22 Jul 1999 09:30:06 +0200, Marc Schimmler <sch### [at] icauni-stuttgartde>
wrote:

>
>Thanks David! 
>
>I will have a look at it. About two weeks ago the Loial Raven sent me
>his version of a gear macro. He hasn't decided yet to publish it but I
>would strongly encourage him to do so. It's much faster than mine when
>it comes to csg because of the bounding he uses and it's a macro and not
>an include file like mine (at time I was writing this no 3.1 version for
>linux existed). Maybe I find some to improve my file and change it to a
>macro.
>I would also like to learn about the diametral pitch. If you have a
>pointer for me I would be quite happy. My long term plan is to create a
>library of technical parts for povray to have the possibility to
>visualize mechanical constructions.
>
>
Hi Marc,

I added semicolons to the ends of your #declare statements and ran your example under
3.1g.  I then changed my example to match yours as nearly as possible (same texture
and
numbers of teeth).  The times came out as 166 secs for yours and 34 secs for mine in
rendering one frame at 800x600.  I didn't set out to make it speedy so I find this
quite
surprising.  This is on a 350P2 with 64Mb.
Diametral pitch (DP) is just the number of teeth per unit diameter (usually inches). 
The
addendum of the gear tooth is normally 1/DP and the dedendum 1.25/DP or slightly less.

Cheers,
David
------------
dav### [at] cwcomnet
http://www.hamiltonite.mcmail.com
------------


Post a reply to this message

From: Marc Schimmler
Subject: Re: Looking for gears
Date: 22 Jul 1999 15:34:49
Message: <3797731D.C2CC996D@ica.uni-stuttgart.de>
David Wilkinson wrote:
> 
> On Thu, 22 Jul 1999 09:30:06 +0200, Marc Schimmler <sch### [at] icauni-stuttgartde>
wrote:
> 
> >
> >Thanks David!
> >
> >I will have a look at it. About two weeks ago the Loial Raven sent me
> >his version of a gear macro. He hasn't decided yet to publish it but I
> >would strongly encourage him to do so. It's much faster than mine when
> >it comes to csg because of the bounding he uses and it's a macro and not
> >an include file like mine (at time I was writing this no 3.1 version for
> >linux existed). Maybe I find some to improve my file and change it to a
> >macro.
> >I would also like to learn about the diametral pitch. If you have a
> >pointer for me I would be quite happy. My long term plan is to create a
> >library of technical parts for povray to have the possibility to
> >visualize mechanical constructions.
> >
> >
> Hi Marc,
> 
> I added semicolons to the ends of your #declare statements and ran your example
under
> 3.1g.  I then changed my example to match yours as nearly as possible (same texture
and
> numbers of teeth).  The times came out as 166 secs for yours and 34 secs for mine in
> rendering one frame at 800x600.  I didn't set out to make it speedy so I find this
quite
> surprising.  This is on a 350P2 with 64Mb.
> Diametral pitch (DP) is just the number of teeth per unit diameter (usually inches).
 The
> addendum of the gear tooth is normally 1/DP and the dedendum 1.25/DP or slightly
less.
> 
> Cheers,
> David

Thank you for the information!

The times are very different. Have ever tried to bound the gear? I guess
this could speed it up a bit more. 
When I wrote the include file I only tried to avoid the worst cases of
speed loss but when I hear your results I have to take a closer look.
Anyway, if I ever make a newer version of it, it will be in the macro
form and maybe my increased understanding of POV (if there's any of
that) will help me to make it better. Anyway thank you David.

All the Best,

Marc


Post a reply to this message

From: David Wilkinson
Subject: Re: Looking for gears
Date: 22 Jul 1999 17:17:24
Message: <37978431.9518915@news.povray.org>
On Thu, 22 Jul 1999 21:38:05 +0200, Marc Schimmler <mar### [at] icauni-stuttgartde> wrote:
>
>The times are very different. Have ever tried to bound the gear? I guess
>this could speed it up a bit more. 
>When I wrote the include file I only tried to avoid the worst cases of
>speed loss but when I hear your results I have to take a closer look.

Marc,
I had a look at the code in your gear.inc file and the major difference between your
method and mine seems to be that you create the gear tooth with a union of 11 prisms,
each
of 5 points, whereas I calculate 22 points and make a tooth from just one prism.
This gives ten straight line facets on each flank and although I think is good enough
for
the purpose, I have tried doubling the number of points and the rendering time only
increases to 40 secs.
I don't think manual bounding will make any difference as the automatic bounding in
POV is
now pretty good.
David
------------
dav### [at] cwcomnet
http://www.hamiltonite.mcmail.com
------------


Post a reply to this message

From: Marc Schimmler
Subject: Re: Looking for gears
Date: 23 Jul 1999 02:29:37
Message: <37980BCF.AFE56BDC@ica.uni-stuttgart.de>
David Wilkinson wrote:
> 
> Marc,
> I had a look at the code in your gear.inc file and the major difference between your
> method and mine seems to be that you create the gear tooth with a union of 11
prisms, each
> of 5 points, whereas I calculate 22 points and make a tooth from just one prism.
> This gives ten straight line facets on each flank and although I think is good
enough for
> the purpose, I have tried doubling the number of points and the rendering time only
> increases to 40 secs.
> I don't think manual bounding will make any difference as the automatic bounding in
POV is
> now pretty good.
> David

Hi David!

This explains the differences. 
The CSG adds a lot of extra time. 
Maybe I redo my stuff. 

Thank you,

Marc

-- 
Marc Schimmler


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.