<div dir="ltr"><div>Let me just add for clarity that the length (or norm) of a quaternion includes the fourth, the scalar component. The norm is the square root of the sum of the squares of all four components.<br></div><div><br></div><div>Only unit quaternions represent rotations. A (0,0,0,0) quaternion does not represent any rotation (but of course exists outside of rotations).</div><div><br></div><div>Andreas</div><div><br></div><div>PS: To add back in some fuzziness, a unit quaternion can only represent a rotation up to 360 degrees. I think there is a mechanism to use non-unit quaternions for larger rotations.<br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Feb 14, 2025 at 10:22 AM Holger Seelig <<a href="mailto:holger.seelig@yahoo.de">holger.seelig@yahoo.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>All quaternions must be normalized to be a legal rotation, so the length of the quaternion must always be one.<div><br></div><div>Holger<br id="m_-3216428128469200639lineBreakAtBeginningOfMessage"><div>
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="text-align:start;text-indent:0px"><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">--</div><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">Holger Seelig</div><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">Leipzig, Germany</div><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><br></div><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><a href="mailto:holger.seelig@yahoo.de" target="_blank">holger.seelig@yahoo.de</a></div><div><a href="https://create3000.github.io/x_ite/" target="_blank">https://create3000.github.io/x_ite/</a></div></div></div></div></div></div></div>
</div>
<div><br><blockquote type="cite"><div>Am 14.02.2025 um 15:38 schrieb Joe D Williams via x3d-public <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>>:</div><br><div><div style="font-family:Arial;font-size:12pt"><div style="margin:0.1rem 0px;line-height:1">> <span style="font-family:"Times New Roman";font-size:medium;white-space:normal;float:none;display:inline">So, sensibly, a zero rotation around any axis corresponds to the "zero unit Quaternion" (0, 0, 0, 1 XYZW), </span> </div><p style="margin:0.1rem 0px;line-height:1"> </p><div style="margin:0.1rem 0px;line-height:1">Right. Not sure but 0 0 0 0 for unit quaternion might not be legal. I think the values must compute to1 to be legal?</div><div style="margin:0.1rem 0px;line-height:1">Thanks,</div><div style="margin:0.1rem 0px;line-height:1">Joe</div><p style="margin:0.1rem 0px;line-height:1"> </p><p style="margin:0.1rem 0px;line-height:1"> </p>
</div>
<div style="border-left:1px solid rgb(170,170,170);box-sizing:border-box;padding:10px 0px 10px 15px;margin:0px"><p>-----Original Message-----<br>From: Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>><br>Sent: Feb 10, 2025 12:37 PM<br>To: Joe D Williams <<a href="mailto:joedwil@earthlink.net" target="_blank">joedwil@earthlink.net</a>><br>Cc: Extensible 3D (X3D) Graphics public discussion <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>Subject: Re: [x3d-public] SFRotation default value spec. inconsistency</p><p style="margin:0.1rem 0px;line-height:1"> </p>
<div dir="ltr">
<div><a href="https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#_node_rotation" target="_blank">https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#_node_rotation</a></div>
<div>has indeed (0, 0, 0, 1 XYZW) as a default value.</div>
<div> </div>
<div>This is difficult to interpret as a rotation around an axis since the corresponding axis would be at first glance (0 0 0).</div>
<div> </div>
<div>x3dom converts quaternion (0, 0, 0, 1 XYZW) to (axis),angle (0,0,0),0 as does <a href="https://www.andre-gaschler.com/rotationconverter/" target="_blank">https://www.andre-gaschler.com/rotationconverter/</a> .</div>
<div> </div>
<div>On the other hand both SFRotation (0 0 1 0) and SFRotation (0 1 0 0) are also represented by quaternion (0, 0, 0, 1 XYZW).</div>
<div> </div>
<div>So, sensibly, a zero rotation around any axis corresponds to the "zero unit Quaternion" (0, 0, 0, 1 XYZW), making it a useful default value for quaternions. But that does not help with choosing a default axis for the SFRotation value.</div>
<div> </div>
<div>This will rarely matter. A use case may be when a SFRotation is initialized to the X3D default in a Proto but then only the angle is modified by a Proto script with the assumption that the axis is (0 0 1).</div>
<div> </div>
<div>-Andreas</div>
</div>
<br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Mon, Feb 10, 2025 at 12:57 PM Joe D Williams <<a href="mailto:joedwil@earthlink.net" target="_blank">joedwil@earthlink.net</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="font-family:arial,sans-serif;font-size:12pt"><div style="margin:0.1rem 0px;line-height:1">not zerp, zero</div>
</div>
<div style="border-left:1px solid rgb(170,170,170);box-sizing:border-box;padding:10px 0px 10px 15px;margin:0px"><p>-----Original Message-----<br>From: Extensible 3D (X3D) Graphics public discussion <<a href="mailto:x3d-public@web3d.org" rel="noopener" target="_blank">x3d-public@web3d.org</a>><br>Sent: Feb 10, 2025 9:50 AM<br>To: Extensible 3D (X3D) Graphics public discussion <<a href="mailto:x3d-public@web3d.org" rel="noopener" target="_blank">x3d-public@web3d.org</a>>, X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org" rel="noopener" target="_blank">x3d-public@web3d.org</a>><br>Cc: Joe D Williams <<a href="mailto:joedwil@earthlink.net" rel="noopener" target="_blank">joedwil@earthlink.net</a>>, Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" rel="noopener" target="_blank">andreasplesch@gmail.com</a>><br>Subject: Re: [x3d-public] SFRotation default value spec. inconsistency</p><p style="margin:0.1rem 0px;line-height:1"> </p>
<div style="font-family:arial,sans-serif;font-size:12pt"><div style="margin:0.1rem 0px;line-height:1">I think the 0 0 1 0 should be used everywhere for default axis-angle. </div><div style="margin:0.1rem 0px;line-height:1">I thinkI see 'zerp' unit quaternions (as in gltf as 0 0 0 1 XYZW) </div><div style="margin:0.1rem 0px;line-height:1">Thanks,</div><div style="margin:0.1rem 0px;line-height:1">Joe</div><p style="margin:0.1rem 0px;line-height:1"> </p>
</div>
<div style="border-left:1px solid rgb(170,170,170);box-sizing:border-box;padding:10px 0px 10px 15px;margin:0px"><p>-----Original Message-----<br>From: Extensible 3D (X3D) Graphics public discussion <<a href="mailto:x3d-public@web3d.org" rel="noopener" target="_blank">x3d-public@web3d.org</a>><br>Sent: Feb 10, 2025 8:44 AM<br>To: X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org" rel="noopener" target="_blank">x3d-public@web3d.org</a>><br>Cc: Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" rel="noopener" target="_blank">andreasplesch@gmail.com</a>><br>Subject: Re: [x3d-public] SFRotation default value spec. inconsistency</p><p style="margin:0.1rem 0px;line-height:1"> </p>
<div dir="ltr">
<div>The JS SAI spec. at <a href="https://www.web3d.org/documents/specifications/19777-1/V3.3/Part1/functions.html#FieldServices" rel="noopener" target="_blank">https://www.web3d.org/documents/specifications/19777-1/V3.3/Part1/functions.html#FieldServices</a></div>
<div> </div>
<div>does not list functions for SFColorRGBA, only SFColor. There may be an earlier report. -Andreas</div>
</div>
<br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Mon, Feb 10, 2025 at 11:31 AM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" rel="noopener" target="_blank">andreasplesch@gmail.com</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div><a href="https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/fieldTypes.html#SFRotationAndMFRotation" rel="noopener" target="_blank">https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/fieldTypes.html#SFRotationAndMFRotation</a></div>
<div> </div>
<div>specifies that (0 0 1 0) is the value of an uninitialized SFRotation given as (x y z a).</div>
<div> </div>
<div>However, the JS SAI spec. in table 7.18 in <a href="https://www.web3d.org/documents/specifications/19777-1/V3.3/Part1/functions.html#SFRotationInstanceCreationFunction" rel="noopener" target="_blank">https://www.web3d.org/documents/specifications/19777-1/V3.3/Part1/functions.html#SFRotationInstanceCreationFunction</a></div>
<div> </div>
<div>effectively makes (0 1 0 0) the default value if no parameters are provided.</div>
<div> </div>
<div>The inconsistency does not have much of an impact since both are 0 rotations but I believe (0 1 0 0) - a 0 rotation around y - may have been intended as the default.</div>
<div> </div>
<div>-Andreas</div>
<div> </div>
<span class="gmail_signature_prefix">-- </span><br>
<div class="gmail_signature" dir="ltr">
<div dir="ltr">
<div>Andreas Plesch<br>Waltham, MA 02453</div>
</div>
</div>
</div>
</blockquote>
</div>
<div> </div>
<br><span class="gmail_signature_prefix">-- </span><br>
<div class="gmail_signature" dir="ltr">
<div dir="ltr">
<div>Andreas Plesch<br>Waltham, MA 02453</div>
</div>
</div>
</div><p style="margin:0.1rem 0px;line-height:1"> </p>
</div><p style="margin:0.1rem 0px;line-height:1"> </p>
</blockquote>
</div>
<div> </div>
<br><span class="gmail_signature_prefix">-- </span><br>
<div class="gmail_signature" dir="ltr">
<div dir="ltr">
<div>Andreas Plesch<br>Waltham, MA 02453</div>
</div>
</div>
</div><p style="margin:0.1rem 0px;line-height:1"> </p>_______________________________________________<br>x3d-public mailing list<br><a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br></div></blockquote></div><br></div></div></blockquote></div><div><br clear="all"></div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div></div>