<div dir="ltr"><div>I agree, probably the best default value for a unit quaternion is 0 0 0 1.</div><div><br></div><div>However, X3D does not concern itself with quaternions, only axis-angle rotations.</div><div><br></div><div>So the original question remains: Part 1 has axis-angle 0 0 1 0 as default while the JS SAI spec. has 0 1 0 0. Should both list the same default value ?</div><div><br></div><div>If yes, which one ? I would vote for 0 1 0 0 since rotations around Y seem more common.</div><div><br></div><div>-Andreas</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sat, Feb 15, 2025 at 11:04 PM <<a href="mailto:joedwil@earthlink.net">joedwil@earthlink.net</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 style="color:rgb(0,0,0);font-family:Arial;font-size:12pt"><p style="margin:0.1rem 0px;line-height:1">Doesn't this mean that the _best_ default value, for no rotation, is 'legally' for unit quaternion = 0 0 0 1 </p>
<p style="margin:0.1rem 0px;line-height:1"><span style="font-size:12pt">because </span><span style="font-size:12pt">the square root of the sum of the squares of all four components does = 1 ?</span></p>
<p style="margin:0.1rem 0px;line-height:1"><span style="font-size:12pt">0 0 0 0 would not be a legal unit quaternion.</span></p>
<p style="margin:0.1rem 0px;line-height:1">While the axis-angle default is 0 0 1 0 as appears in Part 1 is mostly for convenience</p>
<p style="margin:0.1rem 0px;line-height:1">since many value combinations can produce zero rotation? </p>
<p style="margin:0.1rem 0px;line-height:1">Also sure shows why axis-angle is so much easier to work with when typing numbers,</p>
<p style="margin:0.1rem 0px;line-height:1">pitch and yaw and roll for all. </p>
<p style="margin:0.1rem 0px;line-height:1">Thanks,</p>
<p style="margin:0.1rem 0px;line-height:1">Joe</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 14, 2025 11:36 AM<br>To: Holger Seelig <<a href="mailto:holger.seelig@yahoo.de" target="_blank">holger.seelig@yahoo.de</a>><br>Cc: X3D <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>>, Joseph D Williams <<a href="mailto:joedwil@earthlink.net" target="_blank">joedwil@earthlink.net</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>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.</div>
<div> </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> </div>
<div>Andreas</div>
<div> </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.</div>
<br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Fri, Feb 14, 2025 at 10:22 AM Holger Seelig <<a href="mailto:holger.seelig@yahoo.de" target="_blank">holger.seelig@yahoo.de</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>All quaternions must be normalized to be a legal rotation, so the length of the quaternion must always be one.
<div> </div>
<div>Holger<br id="m_-7886534808598711450m_-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"> </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" rel="noopener" target="_blank">holger.seelig@yahoo.de</a></div>
<div><a href="https://create3000.github.io/x_ite/" rel="noopener" target="_blank">https://create3000.github.io/x_ite/</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div><br>
<blockquote>
<div>Am 14.02.2025 um 15:38 schrieb Joe D Williams via x3d-public <<a href="mailto:x3d-public@web3d.org" rel="noopener" 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" rel="noopener" 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" rel="noopener" target="_blank">joedwil@earthlink.net</a>><br>Cc: Extensible 3D (X3D) Graphics public discussion <<a href="mailto:x3d-public@web3d.org" rel="noopener" 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" rel="noopener" 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/" rel="noopener" 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" rel="noopener" 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" rel="noopener" target="_blank">x3d-public@web3d.org</a><br><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noopener" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a></div>
</blockquote>
</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>
</div>

<p style="margin:0.1rem 0px;line-height:1"> </p></blockquote></div><div><br clear="all"></div><div><br></div><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>