Star pattern

ben robinson baltimore.ben at gmail.com
Fri Sep 14 19:45:49 UTC 2012


You should be able to track your mouse coordinates regardless of
whether the pointer is over the .bmp or not. Simply a matter of using
Mouse.GetCursorPos as frequently as you want to track the cursor
position.
So there's that.
Then, to know whether you've clicked the star or not, you should be
able to use the xy coordinates at the moment of click with
cnvs.GetPixel(x,y) to determine whether they clicked on a pixel with
the same color as your star (good) or background screen (not good).
There was a really neat example script, I think posted to this group,
I think about a year ago, that tracked mouse cursor movement then
played it back for the participant as, like, a movie. I wish I knew
where to look for the script, but I've lost it.

Ben

On Fri, Sep 14, 2012 at 2:54 PM, Corona <shunyata.aishwarya at gmail.com> wrote:
> Hi,
>
> I only recently switched to e-prime having used Inquisit software
> previously. I am designing a dot probe experiment with images. After a pair
> of images are displayed, I present a star in either of the two locations
> where the images appeared. The participant is then expected to click
> anywhere in the star location. I am having problems coming up with a star
> shaped design that would be generated in the locations where the two images
> appear.
> Is it better to just create a star bitmap image, and then ask the user to
> click on the location where the star appeared? My only problem with this
> strategy is that I would not be able to track mouse co-ordinates outside of
> the star image, since I would not have the exact point co-ordinates of the
> star. (For example, if I were to use the star as shown on this page:
> http://www.ehow.com/how_6056225_measure-interior-angles-star.html , and used
> the saved bitmap image as a target prompt (i.e. the star that would appear
> in either of two locations where the images were), I would be able to
> estimate the point co-ordinates). Tracking mouse co-ordinates is vital in
> our experiment, as it is going to be used in tandem with, and to validate
> eye tracking that will also be used.
> My images were of the following dimensions (if that helps in any way):
> 424 * 283
> (rectangular images)
>
> Below is a sample code I have been trying to run to generate a star image:
> Dim cnvs As Canvas
> Set cnvs = display.Canvas
> cnvs.PenColor = CColor("white")
> cnvs.FillColor = CColor("black")
> cnvs.RoundedRectangle 40, 35, 300, 40, 25, 25
>
> Dim arrthepoint(5) as Integer
> Dim arrthepointy(5) as Integer
> 'thepoint[5].center = cnvs.RoundedRectangle.CenterPoint();
> Dim i as integer
> Dim x as double
> Dim y as double
> for i = 0 to i = 4
>
> x = Cos(i * 2 * PI / 5)
>
> y = Sin(i * 2 * PI / 5)
>
> arrthepoint(i) = arrthepoint(x)
> arrthepointy(i) = arrthepointy(y)
>
>
>
> Dim p as double
> p = 3.1415926
> cnvs.Line arrthepoint(2),arrthepointy(0),0,0
> cnvs.Line arrthepoint(0),arrthepointy(3),0,0
>
>
> Next i
>
> I would be grateful if anyone could offer some insight.
>
> Thank you for your help,
> Corona
>
> --
> You received this message because you are subscribed to the Google Groups
> "E-Prime" group.
> To post to this group, send email to e-prime at googlegroups.com.
> To unsubscribe from this group, send email to
> e-prime+unsubscribe at googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/e-prime/-/LBt-yTUc3nUJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



More information about the Eprime mailing list