在 OpenGL 中可视化 4D 对象

Visualising 4D objects in OpenGL(在 OpenGL 中可视化 4D 对象)
本文介绍了在 OpenGL 中可视化 4D 对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

您是否知道有任何积极开发的 C/C++ 库可以将一堆(最好是大量)4D 顶点投影回 3D 空间,这些顶点相对于某个任意的4D 相机"投影矩阵和输出我可以将常规 3D 顶点输入 OpenGL 以进行硬件加速可视化?我还需要能够在 4D 空间中执行标准转换(平移、沿所有 4 个轴旋转和统一缩放).

解决方案

以下是一个糟糕的答案(因为我绝不是该主题的专家),但我决定快速浏览一下并提出本论文:http://steve.hollasch.net/thesis/#chapter4>

将 4D 对象投影到 3 空间,正如您所期望的,是 3D 到 2 空间的投影的简单扩展,上面的论文演示了从 4D 到 2 空间的不同类型的投影.代码示例是用 C 语言编写的,所以应该很容易理解.

Do you know of any, actively developed, C/C++ library that can take a bunch (preferably a large amount) of 4D vertices, project them back into 3D space with respect to some arbitrary "4D camera" projection matrix and output regular 3D vertices that I could feed into OpenGL for hardware accelerated visualisation? I'd also need the ability to perform standard transformations in 4D space (translation, rotation along all 4 axes and uniform scaling).

解决方案

The following is a poor answer (since I am by no means an expert on the topic), but I decided to take a quick peek around and came up with this thesis: http://steve.hollasch.net/thesis/#chapter4

Projection of a 4D object into 3-space is, as you would expect, a simple extension on the projection of 3D into 2-space, and the above thesis demonstrates different kinds of projection from 4D to 2-space. The code samples are in C, so it should be easy to follow.

这篇关于在 OpenGL 中可视化 4D 对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

Prevent class inheritance in C++(防止 C++ 中的类继承)
Why should I declare a virtual destructor for an abstract class in C++?(为什么要在 C++ 中为抽象类声明虚拟析构函数?)
Why is Default constructor called in virtual inheritance?(为什么在虚拟继承中调用默认构造函数?)
C++ cast to derived class(C++ 转换为派生类)
C++ virtual function return type(C++虚函数返回类型)
Is there any real risk to deriving from the C++ STL containers?(从 C++ STL 容器派生是否有任何真正的风险?)