<div dir="auto">Joe,</div><div dir="auto"><br></div><div dir="auto">If you want to find the archived thread for context, try searching for “giant shrinking machine”. I believe this was a personal conversation, and i may need to resend, or otherwise make a link available for download (your choice, Joe).</div><div dir="auto"><br></div><div dir="auto">I’m sorry if I dropped the ball and did not pursue this a bit more last year.</div><div dir="auto"><br></div><div dir="auto">These messages are in reference to shrinking the JinLOA4 example in the archives.</div><div dir="auto"><br></div><div dir="auto">Thanks!</div><div dir="auto"><br></div><div dir="auto">John</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, May 29, 2022 at 3:00 PM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="auto">Here is latest jar/zip, i hope.</div><div dir="auto"><br></div><div><br><div class="gmail_quote"></div></div><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br>From: <strong class="gmail_sendername" dir="auto">John Carlson</strong> <span dir="auto"><<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>></span><br>Date: Tue, Sep 7, 2021 at 12:32 AM<br>Subject: Re: JinLOA4 and the giant shrinking machine<br>To: Joseph D Williams <<a href="mailto:joedwil@earthlink.net" target="_blank">joedwil@earthlink.net</a>><br></div><br><br>
<div>
<p>Updates attached.</p></div><div><p><br>
</p>
<p>John<br>
</p>
<div>On 9/6/21 5:00 PM, Joseph D Williams
wrote:<br>
</div>
<blockquote type="cite">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Hi John. </p>
<p class="MsoNormal">OK, first look at the user code and see
that there is a comment with height declared.</p>
<p class="MsoNormal">Now look at the Humanoid root node and see
the joint center location, which in reality is intended to be
approximately a model contact point when sitting, but is
dimensioned for standing, standard default pose in a
coordinate system where I equals 1 meter.</p>
<p class="MsoNormal">So from the joint center for root, we could
just say that this feature is about halfway up so its y axis
should be about ½ of the stated model height, so we could
figure out how to change the y value of the root to some
number that represents a human space value for the root joint
center. If we used that same factor for the other joint
centers, then at least the joint center y values would be
rescaled to ‘human’ dimensions. </p>
<p class="MsoNormal">So, please look at the existing model and
figure how to rescale the x y z values of the given skeleton
joint center model to an ’idealized’ ‘standard’ skeleton
human-scale dimensions, as given in Annex A, for a humanoid
about 1.86 metres tall.</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I’m not sure about what you sent, maybe
send example of input and output. I can read json, I think. Do
you have json transcoding for the jinloa4 model?</p>
<p class="MsoNormal">Thanks.</p>
<p class="MsoNormal">Joe</p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-style:solid none none;border-top-width:1pt;padding:3pt 0in 0in;border-top-color:rgb(225,225,225)">
<p class="MsoNormal" style="border:none;padding:0in"><b>From:
</b><a href="mailto:yottzumm@gmail.com" target="_blank">John Carlson</a><br>
<b>Sent: </b>Monday, September 6, 2021 3:44 AM<br>
<b>To: </b><a href="mailto:joedwil@earthlink.net" target="_blank">Joseph D Williams</a><br>
<b>Subject: </b>JinLOA4 and the giant shrinking machine</p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Joe, once I started using JSON for the
encoding, things became MUCH </p>
<p class="MsoNormal">easier. I don't know who had the idea to
switch from DOM/SAI to JSON, </p>
<p class="MsoNormal">but it's a big win!</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Here's a script that changes JinLOA4.json
to JinLOA4.txt below</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Please review.</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Haven't viewed yet. That's next.</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Not sure if the people are supposed to be
1m or 2m tall. Let me know.</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I haven't dealt with units yet.</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">John</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">===========================================================</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">"use strict";</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">const fs = require('fs');</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">const files = [ "JinLOA4.json" ];</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">let globalScale = [ 1, 1, 1 ];</p>
<p class="MsoNormal">let height = 1;</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">function browse(obj) {</p>
<p class="MsoNormal"> if (typeof obj === 'object') {</p>
<p class="MsoNormal"> for (let o in obj) {</p>
<p class="MsoNormal"> if (o ===
'@translation') {</p>
<p class="MsoNormal"> //
console.log('translation before', </p>
<p class="MsoNormal">obj[o]);</p>
<p class="MsoNormal"> for (let i
in obj[o]) {</p>
<p class="MsoNormal">
obj[o][i] *= globalScale[i];</p>
<p class="MsoNormal"> }</p>
<p class="MsoNormal">
console.log('translation after', obj[o]);</p>
<p class="MsoNormal"> } else if (o ===
'@center') {</p>
<p class="MsoNormal"> //
console.log('center before', obj[o]);</p>
<p class="MsoNormal"> for (let i
in obj[o]) {</p>
<p class="MsoNormal">
obj[o][i] *= globalScale[i];</p>
<p class="MsoNormal"> }</p>
<p class="MsoNormal">
console.log('center after', obj[o]);</p>
<p class="MsoNormal"> } else if (o ===
'@name' && obj[o] === 'height') {</p>
<p class="MsoNormal">
console.log('height before', </p>
<p class="MsoNormal">obj['@value']);</p>
<p class="MsoNormal">
console.log('global scale before:', </p>
<p class="MsoNormal">globalScale);</p>
<p class="MsoNormal">
globalScale[1] /= obj['@value'][0];</p>
<p class="MsoNormal">
console.log('global scale after:', </p>
<p class="MsoNormal">globalScale);</p>
<p class="MsoNormal">
obj['@value'][0] /= </p>
<p class="MsoNormal">obj['@value'][0];</p>
<p class="MsoNormal">
console.log('height after', </p>
<p class="MsoNormal">obj['@value'][0]); // this should be 1</p>
<p class="MsoNormal"> } else if (o ===
'@scale') {</p>
<p class="MsoNormal"> // change
scale to no scaling</p>
<p class="MsoNormal">
console.log('scale before', obj[o]);</p>
<p class="MsoNormal">
console.log('global scale before', </p>
<p class="MsoNormal">globalScale);</p>
<p class="MsoNormal"> for (let i
in obj[o]) {</p>
<p class="MsoNormal">
globalScale[i] = obj[o][i];</p>
<p class="MsoNormal">
obj[o][i] /= globalScale[i];</p>
<p class="MsoNormal"> }</p>
<p class="MsoNormal">
console.log('scale after', obj[o]);</p>
<p class="MsoNormal">
console.log('global scale after', </p>
<p class="MsoNormal">globalScale);</p>
<p class="MsoNormal"> } else if (typeof
obj[o] === 'object') {</p>
<p class="MsoNormal"> obj[o] =
browse(obj[o]);</p>
<p class="MsoNormal"> }</p>
<p class="MsoNormal"> }</p>
<p class="MsoNormal"> }</p>
<p class="MsoNormal"> return obj;</p>
<p class="MsoNormal">}</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">for (let f in files) {</p>
<p class="MsoNormal"> let str =
fs.readFileSync(files[f]);</p>
<p class="MsoNormal"> let obj = JSON.parse(str);</p>
<p class="MsoNormal"> str = JSON.stringify(obj, null,
2);</p>
<p class="MsoNormal"> // console.log(str);</p>
<p class="MsoNormal"> obj = browse(obj);</p>
<p class="MsoNormal"> str = JSON.stringify(obj, null,
2);</p>
<p class="MsoNormal"> // console.log(str);</p>
<p class="MsoNormal">
fs.writeFileSync(files[f].replace(/json/, "txt"), str);</p>
<p class="MsoNormal">}</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</blockquote>
</div>
</div></div>
</blockquote></div></div>