# geo nodes: what's the math behind a cube being transformed into a sphere?

I am following a tutorial where a cube is transformed into a sphere and I want to understand why this happens. I understand that ...

• each vertex can be described as a vector
• the position node gives me the x,y,z coordinates of the cube's vertices
• the length node gives me the length of each vector
• the divide node divedes 1 by the vectors length
• the coordinates of every vertex is scaled by the factor 1/vector length
• when multiplying a vector by a floa, each element of the vector is multiplied by the factor

but why does this operation lead to a sphere when applied to all of the cubes vertices? is there an INTUITIVE way to understand that? Or is this just a formula to be remembered?

• A sphere is the unique 3D object for which every vertex is at exactly the same (Euclidean) distance from a fixed point (its center). For a cube centered at (0,0,0), multiplying every vertex by 1/vector_length forces every vertex to have magnitude 1.0 -- i.e., this is now a "unit sphere" (every vertex is exactly distance 1 from (0,0,0)). Multiplying it by some additional factor then changes this from a unit sphere into a sphere with a smaller or larger radius, depending on chosen factor. All calculations involved are continuous, so this transformation looks 'smooth'. Feb 2 at 17:07

A sphere is the set of points that are all at the same distance $$r$$ from a given point in three-dimensional space.
So setting all vertices in a distance $$r=1$$ from the center complies the conditions to form a sphere. Well, of course not perfectly since depending on the resolution it will not have an absolutely smooth surface, but that's always the case with polygonal meshes - they are only an approximation.