How to sweep by scaling a sphere?

try this video here, it’s Russian but you can copy some code: - YouTube