gpt4 book ai didi

math - 来自 3D 体积的随机 2D 切片

转载 作者:行者123 更新时间:2023-12-02 22:41:10 25 4
gpt4 key购买 nike

我想在用于生成噪声的计算机程序中从 3D 体积中获取随机 2D 切片。我决定使用旋转矩阵,我知道它必须是旋转群 SO(3) 的成员。如何创建该组的均匀随机成员?

最佳答案

在 0 和 1 之间选择三个随机值 u1、u2 和 u3

均匀随机四元数 is given by :

  • w = sqrt(1 - u1)sin(2pi*u2)

  • x = sqrt(1 - u1)cos(2pi*u2)

  • y = sqrt(u1)sin(2pi*u3)

  • z = sqrt(u1)cos(2pi*u3)

然后您可以使用 this formula 生成适当的旋转矩阵:

    |       2     2                                |
| 1 - 2y - 2z 2xy - 2zw 2xz + 2yw |
| |
| 2 2 |
M = | 2xy + 2zw 1 - 2x - 2z 2yz - 2xw |
| |
| 2 2 |
| 2xz - 2yw 2yz + 2xw 1 - 2x - 2y |
| |

关于math - 来自 3D 体积的随机 2D 切片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10745221/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com