<div dir="auto">0 0 0 is not an axis and it’s not normalized.</div><div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Feb 11, 2025 at 10:40 AM Joe D Williams via x3d-public <<a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:12pt"><p style="margin:0.1rem 0;line-height:1.0">OK, I favor favoring the value in the prime spec, X3D Part 1. Since gltf always uses unit quaternions (that I have seen), if we import or export gltf, then 0 0 0 1 quaternion should probably result to 0 0 1 0 rather that 0 0 0 0. whoever picked 0 0 1 0 might have had a hint that axis-angle 0 0 0 0 might result in some problem sometime.</p>
<p style="margin:0.1rem 0;line-height:1.0"><span style="font-family:Arial;font-size:12pt">Thanks,</span></p>
<p style="margin:0.1rem 0;line-height:1.0"><span style="font-family:Arial;font-size:12pt">Joe</span></p>
<p style="margin:0.1rem 0;line-height:1.0"> </p>
<p style="margin:0.1rem 0;line-height:1.0"><span style="font-family:Arial;font-size:12pt">----Original Message-----</span></p>
</div>
<div style="border-left:1px solid #aaa;box-sizing:border-box;padding:10px 0 10px 15px;margin:0">
<p>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 0;line-height:1.0"> </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 #cccccc;padding-left:1ex">
<div style="color:#000000;font-family:arial,sans-serif;font-size:12pt">
<p style="margin:0.1rem 0px;line-height:1">not zerp,  zero</p>
</div>
<div style="border-left:1px solid #aaaaaa;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="color:#000000;font-family:arial,sans-serif;font-size:12pt">
<p style="margin:0.1rem 0px;line-height:1">I think the 0 0 1 0 should be used everywhere for default axis-angle. </p>
<p style="margin:0.1rem 0px;line-height:1">I thinkI see 'zerp' unit quaternions (as in gltf as 0 0 0 1  XYZW) </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 #aaaaaa;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 #cccccc;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 0;line-height:1.0"> </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" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div></div>