assurance-tunnel
assurance-tunnel
assurance-tunnel
assurance-tunnel

Logical calculator (what I did works but I don't get it) and equivalent in javascript



  • Hello all,

    the very little discussed logical calculator is a difficult one to understand for me.
    First of all the actor help text..... who understands it? For me it is not a very "isadorish" text. I don't get it. I suggest a more comprehensible text (even if it is a bit longer. And in fact in the manual the description text is shorter than the actor help). Could someone explain it ?
    What I understood (at least for the AND operation is that if 2 values going in the "value 1" and "value 2 inputs are the same (either 0 or 1) AND operation outputs "1" if the values in the input properties are different the actor calculates "0". Is that correct?
    I made a real life example : I need to track x and y position of a dancer on a stage. I'm doing it with an infrared camera pointing down in zenithal position with eyes++. In the patch I sent dancer position is simulated with a 2d slider.
    What I want izzy to detect is if the dancer is close to the borders for 3 seconds or if he is more in the center for same 3 seconds. For the Izzy to determine if the dancer is close to the border or closer to the center I used 2 inside range (that determine the "center" area and the "borders" area).
    The logical calculator is there to compare the presence in the 2 different zones and the 2 subsequent trigger delays allow to determine the duration of the presence in the area. Izzy "sees" if the dancer stays in an area for more than 3 seconds continuously before determining the change in the presence zone.
    Questions:
    How can I add third parameter like speed (beyond x and y position)? For example it could be interesting to determine: dancer is moving slow and is in the center or fast in the center etc...
    How can I do this in javascript? Any idea and thoughts on the actor?

    d4ff1d-logical-calculator-armando.izz


  • Tech Staff

    Take a look at the '2D velocity' actor.

    you can find a detailed breakdown of Bitwise operations (specifically for Javascript) here: 
    https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators
    These can be confusing, but your usage of AND sounds correct.