## Can Inquisite use equations to mathematically define the gray-scale...

 Author Message matthewsn@denison.edu Associate Member Group: Forum Members Posts: 4, Visits: 8 Can Inquisite use equations to mathematically define the gray-scale values of visual stimuli?A related question is whether inquisite can use equations to define the motion (or other dynamic properties) of visual stimuli. Dave Supreme Being Group: Administrators Posts: 9K, Visits: 38K +xmatthewsn@denison.edu - Wednesday, May 30, 2018Can Inquisite use equations to mathematically define the gray-scale values of visual stimuli?A related question is whether inquisite can use equations to define the motion (or other dynamic properties) of visual stimuli.Color of stimuli is determined by RGB values ranging from 0 to 255 in each color channel, and grey hues are what results when all three channels -- red, green, and blue -- are set to the same value. It is possible to set these values programmatically and dynamically. Here's an example that will change the color of a square from white to black across the entire range of grey values on a trial by trial basis:/ channel = 256/ shape = rectangle/ size = (500px, 500px)/ color = (values.channel, values.channel, values.channel)/ erase = false/ ontrialbegin = [    values.channel -= 1;]/ stimulusframes = [1=square]/ validresponse = (0)/ trialduration = 20/ trials = [1-256 = mytrial]You can, of course, calculate the channel value via any kind of mathematical expression as long as the result is an integer in the range 0 to 255.As for the movement of objects, that's trickier and depends on what exactly you want to do. Similar to the above example, you can of course manipulate an object's on-screen position mathematically on a trial by trial basis, resulting in a quasi-animation.You can also use stimulus elements' /animation attribute https://www.millisecond.com/support/docs/v5/html/language/attributes/animation.htm to have an object move within a single trial, albeit your options are somewhat more limited here.Hope this helps. matthewsn@denison.edu Associate Member Group: Forum Members Posts: 4, Visits: 8 +xDave - Wednesday, May 30, 2018+xmatthewsn@denison.edu - Wednesday, May 30, 2018Can Inquisite use equations to mathematically define the gray-scale values of visual stimuli?A related question is whether inquisite can use equations to define the motion (or other dynamic properties) of visual stimuli.Color of stimuli is determined by RGB values ranging from 0 to 255 in each color channel, and grey hues are what results when all three channels -- red, green, and blue -- are set to the same value. It is possible to set these values programmatically and dynamically. Here's an example that will change the color of a square from white to black across the entire range of grey values on a trial by trial basis:/ channel = 256/ shape = rectangle/ size = (500px, 500px)/ color = (values.channel, values.channel, values.channel)/ erase = false/ ontrialbegin = [    values.channel -= 1;]/ stimulusframes = [1=square]/ validresponse = (0)/ trialduration = 20/ trials = [1-256 = mytrial]You can, of course, calculate the channel value via any kind of mathematical expression as long as the result is an integer in the range 0 to 255.As for the movement of objects, that's trickier and depends on what exactly you want to do. Similar to the above example, you can of course manipulate an object's on-screen position mathematically on a trial by trial basis, resulting in a quasi-animation.You can also use stimulus elements' /animation attribute https://www.millisecond.com/support/docs/v5/html/language/attributes/animation.htm to have an object move within a single trial, albeit your options are somewhat more limited here.Hope this helps.This is extremely helpful! Thank you!