Problem 57750. Radius of an inner N-dimensional sphere
A hypercube is an N-dimensional analogue of a square (N=2). Similarly, an N-sphere is an N-dimensional analogue of a circle. Note that a circle is considered a 1-sphere set in 2D space. In this problem, we will consider a circle as having a dimensionality of 2, a sphere as 3, and so on.
We begin by considering a square (2D hypercube) of length 2R centered around the origin of a 2D Cartesian plane. Four circles (2D 1-spheres) of radius R are placed, such that each one is centered around one of the square's corners. Each circle is tangent to its two neighers. In the illustration below, the square is represented by the gray area and the four circles are displayed in blue.
An additional inner circle or radius r, displayed in red, is centered around the origin, such that it is tangent to all other circles. Your task is to compute this radius.
In 3D, there would be a cube of length 2R, with eight spheres centered on the cube's corneres and an inner sphere centered around the origin. This continues similarly in higher dimensions.
Given the number of dimensions, N, and the radius of the corner N-spheres, R, return the radius of the inner N-sphere, r. Round your answer to 3 decimal places.
Example:
N = 2;
R = 1;
r = 0.414
This example represents the 2D case, as illustrated above, in which the radius of the corner circles is equal to 1.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers6
Suggested Problems
-
Return the largest number that is adjacent to a zero
5314 Solvers
-
475 Solvers
-
Remove from a 2-D matrix all the rows that contain at least one element less than or equal to 4
134 Solvers
-
1405 Solvers
-
5215 Solvers
More from this Author45
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!