Let both of the ends of the rod are on x-axis and y-axis. Let AB be rod of length l and coordinates of A and B be (a,0) and (0,b) respectively.
Let P(h,k) be the mid point of the rod AB.
Now, in ΔOAB, OA2+OB2=AB2 a2+b2=l2 ⇒(2h)2+(2k)2=l2 [using Eq. (i)] ⇒h2+k2=4l2 ∴ The equation of locus is x2+y2=4l2