Coordinate system


Coordinate system

Author
Message
nakayama
nakayama
Distinguished Member
Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)

Group: Forum Members
Posts: 64, Visits: 374

Hi, Dave,
This maybe an old question. I wish to calculate the coordinate of  (a,b) in pixels under the screen resolution of (1960,1200). The angle between is 10 degree.
Is there a formula I could refer to? I used something like this but does work.

/ circle_a=1px*(expressions.circle_x+300*cos(0.174533))
/ circle_b=1px*(expressions.circle_y+300*sin(0.174533))

Thank you Wink


nakayama
nakayama
Distinguished Member
Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)

Group: Forum Members
Posts: 64, Visits: 374
nakayama - 11/5/2019

Hi, Dave,
This maybe an old question. I wish to calculate the coordinate of  (a,b) in pixels under the screen resolution of (1960,1200). The angle between is 10 degree.
Is there a formula I could refer to? I used something like this but does work.

/ circle_a=1px*(expressions.circle_x+300*cos(0.174533))
/ circle_b=1px*(expressions.circle_y+300*sin(0.174533))

Thank you Wink


*(960, 1000) is (x,y)
Dave
Dave
Supreme Being
Supreme Being (749K reputation)Supreme Being (749K reputation)Supreme Being (749K reputation)Supreme Being (749K reputation)Supreme Being (749K reputation)Supreme Being (749K reputation)Supreme Being (749K reputation)Supreme Being (749K reputation)Supreme Being (749K reputation)

Group: Administrators
Posts: 9.9K, Visits: 49K
nakayama - 11/6/2019
nakayama - 11/5/2019

Hi, Dave,
This maybe an old question. I wish to calculate the coordinate of  (a,b) in pixels under the screen resolution of (1960,1200). The angle between is 10 degree.
Is there a formula I could refer to? I used something like this but does work.

/ circle_a=1px*(expressions.circle_x+300*cos(0.174533))
/ circle_b=1px*(expressions.circle_y+300*sin(0.174533))

Thank you Wink


*(960, 1000) is (x,y)

<expressions>
/ theta = (values.angle)*(m_pi/180)
/ deltax = values.radius*cos(expressions.theta)
/ deltay = values.radius*sin(expressions.theta)
/ a = values.x+expressions.deltax
/ b = values.y+expressions.deltay
</expressions>

<values>
/ x = 960px
/ y = 1000px
/ radius = 300px
/ angle = -10
</values>

<shape xy>
/ shape = circle
/ size = (40px, 40px)
/ color = blue
/ hposition = values.x
/ vposition = values.y
</shape>

<shape ab>
/ shape = circle
/ size = (40px, 40px)
/ color = red
/ hposition = expressions.a
/ vposition = expressions.b
</shape>

<trial example>
/ stimulusframes = [1=xy, ab]
/ validresponse = (57)
</trial>


GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search