Generation

generate functionThu, 24 Nov 2022

project photo on sphere

def project_on_sphere(x, y, z, radius): scale = radius / sqrt(x ** 2 + y ** 2 + z ** 2) return x * scale, y * scale, z * scale

Questions about programming?Chat with your personal AI assistant