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!
0 个评论
回答(1 个)
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 个评论
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
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 Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!