<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: I want to maintain state, have loops, how are these done in MCG? in 3ds Max Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-forum/i-want-to-maintain-state-have-loops-how-are-these-done-in-mcg/m-p/5765312#M87482</link>
    <description>&lt;P&gt;one thing at a time then.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DeltaPosSquared = &amp;nbsp; x &amp;gt; y &amp;nbsp;= x^2 &amp;gt; y ^2 &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;since this holds true, we can compare squared distances, instead of going through the whole square root process. It's a math shortcut.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since a dot product of (start - end) gives me the 'squared length', I can use that for a distance check, as long as I compared the squared distance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So you really need to know algerbra, but some linear geometry, and trigonometry, &amp;nbsp;otherwise lots of this stuff won't make any sense.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You seem to know about offseting objects (like your blinds), so instead of &amp;nbsp;myZ = myIndex * 5meters, a simulation is iterative.&lt;/P&gt;&lt;P&gt;instead of a single equation to get to a final position, it must iterate. &amp;nbsp;myZ = myZ + deltaZ. &amp;nbsp;This means the 'old' value is rolled into the new position with a delta applied to it. In my case, it's the force of gravity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before I blindly move the virtual particle however, I check for a collision against the 'ground'. and if found, it bounces.&amp;nbsp;&lt;/P&gt;&lt;P&gt;A bounce is a loss of energy and usually a reflection across the surface normal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Aug 2015 05:32:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-08-11T05:32:48Z</dc:date>
  </channel>
</rss>

