Coordinate system


Author
Message
nakayama
nakayama
Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)
Group: Forum Members
Posts: 72, Visits: 408

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 ;)


nakayama
nakayama
Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)Guru (5.1K reputation)
Group: Forum Members
Posts: 72, Visits: 408
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 ;)


*(960, 1000) is (x,y)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
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 ;)


*(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

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search