Dear threedslider,
you mix up different topic: dimension itself, dimension of objects in different dimensions, and the projection (image) of n-dimensional objects into a view.
Dimension itself:
A 4-dimensional (4D) space is a space were you have 4 linearly independent axis.
The easiest definition would be (x,y,z,w) with the base (1,0,0,0), (0,1,0,0), (0,0,1,0) and (0,0,0,1).
Such space is also euclidean, because euclidean is not limited to 3D [see
Euclidean space].
They have normal distances like sqrt(x^2+y^2+z^2+w^2) etc.
Only in such a 4D space you can add objects with 0, 1, 2, 3 or 4 dimensions.
Dimension of objects:
An
n-dimensional object is an object in
n or more dimension with an expansion in
n directions. You can not "create" 4D in a program with just three dimensions, what ever you try. You can only create a projection (see below).
The projection of objects:
The projection of a 4D space into a 2D space needs a 2×4-matrix, because you want to transform (x,y,z,w) to (x',y'). Such matrix could be very easy, and you did this in basic school already. You draw x and y into x' and y' of your view, and make z diagonal. The same can be done for the 4th dimension and so on. But all are just projections. You can not imaging a four dimensional object itself, only the projection in 2D or 3D.
In summary:
The
tesseract (your last picture) is probably the most common way to project the 4D cube into the 3D world and render it on the 2D screen.