Content deleted Content added
→xyzw order?: Reply |
|||
Line 59:
::Not suggesting it be changed, just wondering if it should be noted in case somebody is looking at code that works that way. Looking at some existing code such as Pixar's math library, it looks like they are pretty careful to make the api return the real and vector parts as two different pieces, and indexing only works on the vector (ie you write quat.vector[2] to get the z, not quat[3] or quat[2]). I think though there are some tiny advantages on GPUs to storing the quaternions as xyzw so this is often done. [[User:Spitzak|Spitzak]] ([[User talk:Spitzak|talk]]) 23:56, 8 October 2024 (UTC)
:::Looking at Pixar's `GfQuatd` it does appear to lay out the memory as I said, but they definitely hide this in the api. There is a 4-number constructor but it has the real part first, then the imaginary vector. In the private part of the data structure they store 4 doubles and they put the real part last, this may have been done so the memory can be sent to the GPU. Some other libraries I looked at seem to store the real part first. [[User:Spitzak|Spitzak]] ([[User talk:Spitzak|talk]]) 00:08, 9 October 2024 (UTC)
== Reasoning for #Performance_comparisons missing, unspecific ==
[22] and [23] are currently present. [22] is unspecific: is it a replier in some forum thread? [23] needs a qualifier such as "as in code published at ...".<br>
<br>
Method in table 1 under Storage requirements is linked to articles but does not specify the look further which makes "Rotation matrix" at least ambigious (2D? 3D? 4D?) and the numbers in the storage column are not referenced in the paragraph below the table which is why they are not reasoned.<br>
<br>
"Performance comparison of rotation chaining operations" does not include angle-axis after angle-axis which is 2 x angle-axis of "Performance comparison of vector rotating operations".<br>
<br>
"Performance comparison of vector rotating operations" does not explain intermediate matrix, does not consider transforming vector to quaternion first which requires C and S of Theta/2 which is 2 sin/cos and 1 mul/div.<br>
<br>
"Rotation matrix" is likely a rotation around a 3D base vector as axis which is not equal an arbitrary angle-axis or a quaternion and thus should be marked with an asterisk.<br>
<br>
Performance comparisons can consider time ___domain when parallel computing if this whole section is original work: a dot product would be 1 op instead of 3 mul and 2 add for example. [[Special:Contributions/2A02:2455:30C:7D00:3931:FDDB:9442:9713|2A02:2455:30C:7D00:3931:FDDB:9442:9713]] ([[User talk:2A02:2455:30C:7D00:3931:FDDB:9442:9713|talk]]) 23:41, 29 August 2025 (UTC)
|