Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NF: Pie shape class for pac-man shapes. #2652

Merged
merged 8 commits into from
Oct 15, 2019
Merged

NF: Pie shape class for pac-man shapes. #2652

merged 8 commits into from
Oct 15, 2019

Conversation

mdcutone
Copy link
Member

Here is a stimulus class that create "pie" shapes, which is a circle with a wedge cut out. This is usually called a pac-man shape in the VS community. Typically, you would use these to generate Kanizsa figures. This is a pretty well-known illusion and it might be useful to have this class for teaching. You can also use these shapes in applications where you need to visually represent a proportion. For instance a visual countdown timer where filled proportion of the shape shrinks with time.

The shape takes arguments start and end in degrees, which defines the filled region of the shape. Using negative values will fill in the opposite direction. The size of the shape is defined by radius. The code which generates the vertices is pretty fast, so you can make updates to these values in real-time.

Demos and documentation have been included. Takes nearly all arguments BaseShapeStim accepts. So you can also outline the shapes if you wish by setting lineColor. By default, there is no outline.

@lgtm-com
Copy link

lgtm-com bot commented Oct 15, 2019

This pull request introduces 1 alert when merging 035e57e into 8db8521 - view on LGTM.com

new alerts:

  • 1 for Module is imported with 'import' and 'import from'

@peircej peircej merged commit 584d586 into psychopy:master Oct 15, 2019
@mdcutone mdcutone deleted the pie-stim branch November 26, 2020 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants