How to draw an object in 4 dimensional space using matlab ?

2 次查看(过去 30 天)
Hi all,
Do you know how to draw an object in 4 dimensional space, namely the gif pictures showed in this wiki link (https://en.wikipedia.org/wiki/Four-dimensional_space)?
I need to draw ‘regular triangular pyramid’,‘cube' and 'sphere' of 4 dimensional space using matlab and show them by gif pictures.
I need algorithms or useful math expressions in detail.
Thanks you very much!
Wish you good!

回答(1 个)

Walter Roberson
Walter Roberson 2015-12-11
Create your points and connection list in 4D. When you need to draw it, do a Projection into 3D and draw the result.
You likely will not want to bother with a formal projection matrix: you will probably just want to use a rotation matrix and then drop the last coordinate.
  2 个评论
William
William 2015-12-11
Hi Walter,
Thank you very much! I just don't know how to creat those points or connections in 4D.Do you know the coputation method in detail? The papers and links gives operable computing method will also be very helpful.
I.P.
Walter Roberson
Walter Roberson 2015-12-11
https://en.wikipedia.org/wiki/5-cell#Geometry
Coordinates for the hypercube are trivial, all 0's and 1's
For the 3-sphere you are going to need to choose a subset of points on the surface.
On the other hand, rotating a true 3-sphere around its center is going to result in the same 3-sphere, so in a sense there is no point doing the rotation. The same would be true of a sufficiently dense approximation of a 3-sphere; it is not, however, true of an approximation to a 3-sphere. And of course if you have colored the 3-sphere non-uniformly then it might be worth rotating.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by