What is the cube equivalent to the given equation describing square?

71 Views Asked by At

The equation

$$ |x+y|+|x-y|=L $$

describes the boundary of a square in 2D. I am looking for the equivalent equation describing the surface of a cube in 3D. Something of the form $$ |???| + |???| + |???| = L $$

or similar.

I am aware of this question, but the given equation is not in the form I am looking for (EDIT: Meaning it uses max()).

1

There are 1 best solutions below

1
On BEST ANSWER

You could use $$ |x| + |y| + \big||x| - |y|\big| + 2 |z| + \Big||x| + |y| + \big| |x| - |y| \big| - 2 |z| \Big| = 2 L $$

This comes from using $2 \max(a,b) = a+b + |a-b|$ twice on $L/2 = \max(|x|,|y|,|z|) = \max(\max(|x|,|y|),|z|)$.