POV-Ray : Newsgroups : povray.general : Closest points on two circles : Re: Closest points on two circles Server Time
4 Aug 2024 22:14:24 EDT (-0400)
  Re: Closest points on two circles  
From: Tom Melly
Date: 25 Mar 2003 09:33:18
Message: <3e8068ae@news.povray.org>
"Edward Coffey" <eco### [at] alphalinkcomau> wrote in message
news:3E8### [at] alphalinkcomau...

> Yes, but as I stated in my original post, the mathematics of this is
> quite complex, it's not as though you're finding the minimum of a

Does the solution need to be proper math, and does the result have to be
perfect?

For a kludge, IMHO it shouldn't be too hard to write a macro that will return
the two points using a brute force approach. i.e. (approx. code, won't parse)

#declare Len = 10000000000000
#declare R1 = 0
#while (R1 < 360)
    #declare R2 = 0
    #while(R2 < 360)
       #if(distance between R1 on 1st circle and R2 on 2nd circle < Len)
            Len = that distance
        #end
        #declare R2 = R2 +1
    #end
    #declare R1 = R1 + 1
#end


Post a reply to this message

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