POV-Ray : Newsgroups : povray.general : Help with "programmatically" determining intersection : Re: Help with "programmatically" determining intersection Server Time
3 May 2024 09:28:20 EDT (-0400)
  Re: Help with "programmatically" determining intersection  
From: scott
Date: 17 Mar 2016 11:16:31
Message: <56eaca4f$1@news.povray.org>
> Correct.   Because if you plot the involutes, one curves up, and the other
> curves down.  I already (after 40 minutes worth of trigonometric algebra)
> established where they cross the base circle, and then after some more searching
> and some luck, did the same with the addendum circle.

I'm surprised this is not documented/solved somewhere else already. 
You're surely not the only one wanting to design gears. Saying that 
though, most CAD software will automatically do CSG on the intersecting 
teeth, so you wouldn't need to worry so much where the exact point was, 
so long as you went past it for each tooth.

> The second sphere gets rotated by Tooth2, which is just Tooth1+0.5.  Therefore
> it gets rotated above/past the other involute and so as it curls own and the
> first involute curls up, they will eventually intersect.   As Jerome pointed
> out, since these are "transcendental functions" - they will have an infinite
> number of intersections, but I'm only interested at the first (at the moment
> ;).
>
> I do think that his suggestion of "tracking" the curves and determining the
> intersection from a change of sign will work -

I don't think that will work because your curves are moving in 2 
dimensions. What you'd need to do is check if the line between the 
current point and the previous point of curve 1 *crosses* the line 
between the current point and the previous point of curve 2.

> but that looks more "practical"
> than mathematical and elegant.   But maybe that's the reality of how it's done.
>   I'll play with it some and see where I get, but that could take all day
> again...

I prefer the "practical" approach, because it will work with (almost) 
any function or formula with little modification. The mathematical 
approach, whilst neat, needs recalculating every time you tweak the 
curve, and just may not be possible to do in some situations (or more 
likely, is beyond my skill to do the algebra!).


Post a reply to this message

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