Salut fuccaro
The function you are looking for is a logarithmic spiral. Starting in the unit circle, the parametric equations of the spiral are:
x(a)=(q^a)*cos(a)
y(a)=(q^a)*sin(a)
where q= e^(-tan(pi/n)) and q^a is the distance from the center to the mouse
and n is the number of mice.
The angle a is in range 0...∞
For n=3...∞, q < 1. That means, q^a=0 at a=∞. The mice would never reach the center!!!
If k=tan(pi/n), the length of the trajectory is sqrt(k^2+1)/k, which is a finite number!!!
Half of the length is reached at r=0.5!
Strange enough, for n=10 the length is 2 times the golden ratio.
(defun mice ( n / rot a b c q da r l)
(defun rot (p a)
(list
(apply '- (mapcar '* p (list (cos a) (sin a))))
(apply '+ (mapcar '* p (list (sin a) (cos a))))
)
)
(setq b (/ (* 2 pi) n))
(setq q (exp (/ (- (sin (/ b 2))) (cos (/ b 2)))))
(setq a 0.0 da (/ pi 180))
(repeat 721
(setq r (expt q a)
l (cons
(list
(* r (cos a))
(* r (sin a))
)
l
)
a (+ a da)
)
)
(entmakex '((0 . "CIRCLE") (10 0.0 0.0 0.0) (40 . 1.0)))
(draw_spline
l
(setq c 1)
)
(repeat (1- n)
(draw_spline
(setq l (mapcar '(lambda (p) (rot p b)) l))
(setq c (1+ c))
)
)
)
(defun draw_spline (pts color)
(entmakex
(append
(list
'(0 . "SPLINE")
'(100 . "AcDbEntity")
'(100 . "AcDbSpline")
(cons 62 color)
'(70 . 1064)
'(71 . 3)
(cons 74 (length pts))
)
(mapcar
'(lambda (x)
(cons 11 x)
)
pts
)
)
)
)