<p>I wonder how is it possible to scale all shapes so that they are within boundaries of a [unit] sphere? I know how to do this for a cube: if radius of the sphere is <code>S</code> I set the length of <code>X</code>, <code>Y</code> and <code>Z</code> of the cube to <code>S * math.sqrt(3)/3</code>. This way, the corners of the cube are barely touching the surface of the sphere. But I don't know how to do this for other objects such as torus, cylinder and cone in <a href="https://www.blender.org/" rel="nofollow noreferrer">Blender</a>. I wonder, is there a general rule/equation to calculate the scaling factor of a shape so that it fits into a sphere with radius <code>S</code>?</p>

<transformations><algorithm><geometry><mesh>
How to scale primitive shapes [in Blender] so that they are within a [unit] sphere?
Amir
# How to scale primitive shapes [in Blender] so that they are within a [unit] sphere?

(Asked by: username_0 on 2019-04-19)

I wonder how is it possible to scale all shapes so that they are within boundaries of a [unit] sphere? I know how to do this for a cube: if radius of the sphere is `S` I set the length of `X`, `Y` and `Z` of the cube to `S * math.sqrt(3)/3`. This way, the corners of the cube are barely touching the surface of the sphere. But I don't know how to do this for other objects such as torus, cylinder and cone in [Blender](https://www.blender.org/). I wonder, is there a general rule/equation to calculate the scaling factor of a shape so that it fits into a sphere with radius `S`?

**Tags:** transformations, algorithm, geometry, mesh

---

## 0 answers

