Hello,
I managed to create a pac-man which can rotate in any direction by using the following code component (and modifying “ori”):
circle_size = 1
wedge = visual.RadialStim(win, tex=‘None’, color=-1, units=‘deg’, size=[circle_size, circle_size],
angularRes=360, visibleWedge=[0, 270], interpolate=False,
autoLog=False, ori=90)
wedge.draw()
Is there a way to show only the outline of this pac-man? Nothing inside, just the contour
Thanks!
Oddly enough, @mdc has recently added a pie
stimulus to PsychoPy that more directly achieves what you want. I’m not sure that it has been included in the latest releases of PsychoPy yet, but if not you could grab the code from here:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Create a pie shape."""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from __future__ import absolute_import, print_function
from psychopy.visual.shape import BaseShapeStim
from psychopy.tools.attributetools import attributeSetter, setAttribute
import numpy as np
class Pie(BaseShapeStim):
"""Creates a pie shape which is a circle with a wedge cut-out.
This shape is sometimes referred to as a Pac-Man shape which is often
used for creating Kanizsa figures. However, the shape can be adapted for
This file has been truncated. show original
and pop that visual.py
file inside your PsychoPy installation to get access to it now.
Thank you so much! Problem solved