POV-Ray : Newsgroups : povray.binaries.utilities : Gears Server Time
22 Dec 2024 18:44:51 EST (-0500)
  Gears (Message 1 to 5 of 5)  
From: Loial Raven
Subject: Gears
Date: 4 Jun 2000 22:57:01
Message: <393B169F.9813661D@telus.net>
Ok... i just read the thread on looking for gears... i'll let my gear
stuff out :)

I've been working on this for quite a while, it's still not finished,
and it won't be for quite a while yet. Right now i'm working on bevel
gears, as well as looking at making helical gears and helical bevels...

attached is the gear_polar.inc and geartest.pov files.
The include file is the one you want to use. there is a little help at
the begining of the file, but not all that much... it should be useable
to those who have looked into gears at all, as well it has the macro
that can make multiple gears mesh, though this only works in one
direction.

The geartest.pov is an example of what the gear code can do. it is an
animation, so raytrace as such...
i used:
+KFF13
+KC
+A0.3
and it came out with a realy nice animation... uh... i don't have a copy
of that online as yet.

well, have fun,
     the Loial Raven

P.S. please give credit for this, it's my baby :)


Post a reply to this message


Attachments:
Download 'us-ascii' (6 KB) Download 'us-ascii' (8 KB)

From: David Wilkinson
Subject: Re: Gears
Date: 6 Jun 2000 17:46:38
Message: <75kqjs4q8lobksmei6ir0lnvbn1up9c88r@4ax.com>
On Sun, 04 Jun 2000 19:55:29 -0700, Loial Raven <Loi### [at] telusnet> wrote:

>Ok... i just read the thread on looking for gears... i'll let my gear
>stuff out :)
>
>I've been working on this for quite a while, it's still not finished,
>and it won't be for quite a while yet. Right now i'm working on bevel
>gears, as well as looking at making helical gears and helical bevels...
>

Loial,

I think several of us in the POV community have had a go at gears.  Marc
Schimmler and I have both posted macros for the generation of accurate involute
gears.   Marc's gears are specified using the module of the gear and mine use
the diametral pitch.

Your macro seems to use the same technique as mine - a linear spline prism to
define the tooth.  In my case I calculate an array of points on the tooth
profile and then plug them into the prism, whilst you calculate them when
defining the prism.  For the bevel gear I used a similar technique, but with a
prism with a conic sweep.

I did a comparitive test and rendered a 50 tooth gear of similar size using both
your macro and mine, and yours took about 3.6 times as long as mine. I can't see
why this should be, but perhaps you can find it.

My macros and example programs for both types of gears are available for
download on my website www.hamiltonite.com (The downloads also include flc
animations.)

Both Marc's macros and mine are intended to be simple to use.  In my case the
pressure angle is assumed to be 20 degrees, a widely adopted engineering
standard.  In the case of my spur gear macro, the user only needs to give the
diametral pitch (dp), the number of teeth and the face width. The bevel gear
macro is equally simple to use.

I look forward to seeing your helical gears and spiral bevels.

David

dav### [at] hamiltonitecom
http://www.hamiltonite.com/


Post a reply to this message

From: Loial Raven
Subject: Re: Gears
Date: 8 Jun 2000 01:59:53
Message: <393F3656.91112E1F@telus.net>
this is very strange... um... it could be because of number of points, oh wait, i
know why...
The outside of my teeth are clipped by a cylinder to make them round, this uses a
difference, making it slower.
I bet i could make it faster by moving the clip to when i create the tooth, instead
of clipping all the teeth at once.

hmm... i also have a default texture built in, i would always set my texture using
gear_texture... it may be that having this set might cause povray to think there
are two textures over top of eachother if you made another in a object statement...

i don't use diametrical pitch because it's an imperial base messurement, i use
metric when ever i can... i'll add it to the next version.  mdl = 1/PD   (= mm of
pitch diameter per tooth)   :)
so, you could use gear_n_mdl (point, angle, n, 1/PD, th) if you want to call it
close to the same... or you could just add:
#macro Gear(NumTeeth, PD, FaceWidth) object {
gear_n_mdl (0,0,NumTeeth,1/PD,Face_Width) translate -Face_Width } #end
to the end of polar_gear.inc to make exactly the same call and pretty close to the
same output.

I added the center_point and rotangle because i didn't think you could use
gear(...) directly in an object... i thought you had to #declare it first... oops.

hmm... things that i notice your code lacking, but realy is just superfluous in
mine... solid gears(uses merge instead of union), adjustable quality, a problem
with realy large gears(see below), rounded outside, meshing code, adjustable
pressure angle.

the problem with realy large gears won't be noticed in your stuff... but i've added
the ability to leave the center out, speeding up spoked centers. If you have a very
large gear(many teeth) the base of the involute dips below the root circle, if you
have a thin ring holding the teeth, this will cause a spike into the center of the
ring... um... kinda not importaint most of the time... but i disliked that when i
did some tests.

things my code is still lacking: stub gears, backlash... um... i think that's it
other than helical, worm and bevel... and hypoid(i wonder how i'll do that...)

Since i haven't ever found any accual information on gears except in one book, i
didn't know the normal pa was 20... i'll make that a self-set variable in the next
version.

I'll also shuffle some of the other variables back into auto-setting stuff if i
can...

I did have a fully working bevel gear macro a bit back, but my hd crashed, taking
all of my work with it... i haven't gotten around to coding a new one.

I should be able to speed it up a bunch, and i think i will use the array method
next time, when i did this one, i didn't know how to use it. as well, this is just
a #macro'ised version of an earlier include i did...

This one is called polar_gear 'cause it is my middle step before making the bevel
gear one. polar coordinates are easier to convert into bevel gears...

      the Loial Raven

David Wilkinson wrote:

> On Sun, 04 Jun 2000 19:55:29 -0700, Loial Raven <Loi### [at] telusnet> wrote:
>
> >Ok... i just read the thread on looking for gears... i'll let my gear
> >stuff out :)
> >
> >I've been working on this for quite a while, it's still not finished,
> >and it won't be for quite a while yet. Right now i'm working on bevel
> >gears, as well as looking at making helical gears and helical bevels...
> >
>
> Loial,
>
> I think several of us in the POV community have had a go at gears.  Marc
> Schimmler and I have both posted macros for the generation of accurate involute
> gears.   Marc's gears are specified using the module of the gear and mine use
> the diametral pitch.
>
> Your macro seems to use the same technique as mine - a linear spline prism to
> define the tooth.  In my case I calculate an array of points on the tooth
> profile and then plug them into the prism, whilst you calculate them when
> defining the prism.  For the bevel gear I used a similar technique, but with a
> prism with a conic sweep.
>
> I did a comparitive test and rendered a 50 tooth gear of similar size using both
> your macro and mine, and yours took about 3.6 times as long as mine. I can't see
> why this should be, but perhaps you can find it.
>
> My macros and example programs for both types of gears are available for
> download on my website www.hamiltonite.com (The downloads also include flc
> animations.)
>
> Both Marc's macros and mine are intended to be simple to use.  In my case the
> pressure angle is assumed to be 20 degrees, a widely adopted engineering
> standard.  In the case of my spur gear macro, the user only needs to give the
> diametral pitch (dp), the number of teeth and the face width. The bevel gear
> macro is equally simple to use.
>
> I look forward to seeing your helical gears and spiral bevels.
>
> David
>
> dav### [at] hamiltonitecom
> http://www.hamiltonite.com/


Post a reply to this message

From: David Wilkinson
Subject: Re: Gears
Date: 8 Jun 2000 10:44:37
Message: <do7vjso8g8nh32gethdjkemf2k9idlm0bj@4ax.com>
On Wed, 07 Jun 2000 22:59:50 -0700, Loial Raven <Loi### [at] telusnet> wrote:
Hi Loial,

>this is very strange... um... it could be because of number of points, oh wait, i
>know why...
>The outside of my teeth are clipped by a cylinder to make them round, this uses a
>difference, making it slower.
>I bet i could make it faster by moving the clip to when i create the tooth, instead
>of clipping all the teeth at once.
>
Yes it's your intersection with a cylinder to make them truly cylindrical on the
outside that does it.  I tried differencing the teeth with a cylinder in my
macro and the time taken goes up dramatically -. 6m.24s. as against 17s. !
Probably the fastest way would to do this would to add some more points to the
tooth prism.
>
>i don't use diametrical pitch because it's an imperial base messurement, i use
>metric when ever i can... i'll add it to the next version.  mdl = 1/PD   (= mm of
>pitch diameter per tooth)   :)
>
yes, as you say, continental europe always use module because it relates to the
metric system and probably many British firms do so nowadays.  I don't know
about the USA, they have been pretty reluctant to change to the metric system,
but it's many years since I was involved directly in mechanical engineering.
>
>I added the center_point and rotangle because i didn't think you could use
>gear(...) directly in an object... i thought you had to #declare it first... oops.
>
You will notice I made my gear macro with the centre of one of the teeth lining
up with the y-axis and also make available the angular pitch outside the macro
so that it is easy for a user to arrange for them to be correctly meshed. 

>hmm... things that i notice your code lacking, but realy is just superfluous in
>mine... solid gears(uses merge instead of union), adjustable quality, a problem
>with realy large gears(see below), rounded outside, meshing code, adjustable
>pressure angle.
>
>the problem with realy large gears won't be noticed in your stuff... but i've added
>the ability to leave the center out, speeding up spoked centers. If you have a very
>large gear(many teeth) the base of the involute dips below the root circle, if you
>have a thin ring holding the teeth, this will cause a spike into the center of the
>ring... um... kinda not importaint most of the time... but i disliked that when i
>did some tests.
>
As you say there are a lot of bells and whistles that can be added, I tried to
keep it as simple as possible for non-engineers who just want to model some
gears that are realistic.  Things like the pressure angle and accuracy are very
easy to alter in the macro.  If you want to go for extreme realism, then perhaps
you should  consider adding radii to the root of the involute, tip relief to the
top of the tooth - and even the positive correction of both gears (this is how
engineers avoid the working surface of the tooth going below the root circle).
>
>This one is called polar_gear 'cause it is my middle step before making the bevel
>gear one. polar coordinates are easier to convert into bevel gears...
>
All the best with your efforts.  I look forward to seeing your results.
David
dav### [at] hamiltonitecom
http://www.hamiltonite.com/


Post a reply to this message

From: Loial Raven
Subject: Re: Gears
Date: 8 Jun 2000 17:20:18
Message: <39400E12.93A24EBE@telus.net>
David Wilkinson wrote:

> Yes it's your intersection with a cylinder to make them truly cylindrical on the
> outside that does it.  I tried differencing the teeth with a cylinder in my
> macro and the time taken goes up dramatically -. 6m.24s. as against 17s. !
> Probably the fastest way would to do this would to add some more points to the
> tooth prism.
> >
> >i don't use diametrical pitch because it's an imperial base messurement, i use
> >metric when ever i can... i'll add it to the next version.  mdl = 1/PD   (= mm of
> >pitch diameter per tooth)   :)
> >
> yes, as you say, continental europe always use module because it relates to the
> metric system and probably many British firms do so nowadays.  I don't know
> about the USA, they have been pretty reluctant to change to the metric system,
> but it's many years since I was involved directly in mechanical engineering.
>

> You will notice I made my gear macro with the centre of one of the teeth lining
> up with the y-axis and also make available the angular pitch outside the macro
> so that it is easy for a user to arrange for them to be correctly meshed.
>
> As you say there are a lot of bells and whistles that can be added, I tried to
> keep it as simple as possible for non-engineers who just want to model some
> gears that are realistic.  Things like the pressure angle and accuracy are very
> easy to alter in the macro.  If you want to go for extreme realism, then perhaps
> you should  consider adding radii to the root of the involute, tip relief to the
> top of the tooth - and even the positive correction of both gears (this is how
> engineers avoid the working surface of the tooth going below the root circle).

positive correction is in it already... took me forever to get the function to do
that...
I'm just adding root radii and tip releaf right now, it was the next thing to do
before

i go to other gear types :)

> >
> >This one is called polar_gear 'cause it is my middle step before making the bevel
> >gear one. polar coordinates are easier to convert into bevel gears...
> >
> All the best with your efforts.  I look forward to seeing your results.
> David
> dav### [at] hamiltonitecom
> http://www.hamiltonite.com/

will have more very very soon... oh, i just moved the intersection into a bounding and
it sped up amazingly... i bet when i go to the new method i'm going to use, it'll make
it even faster :)

oh... my next version is for megapov only, i think... well... no, i'll make that
settable...

well... have fun all :)
       the Loial Raven


Post a reply to this message

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