Exemple #1
0
    def __init__(self, config):
        config_screen = config['Screen']['SphereScreen']

        # number of parallels, meridians is different than
        self._width = config_screen['parallels']
        self._height = config_screen['meridians']
        self._radius = config_screen['radius']
        self._half = config_screen['half']

        # TODO allow for classes that accept radius as input and possibly
        # extra arguments or add a manual check for inputs
        self._screen_to_image_map = pointmapfactory(
            config_screen['image_map'])(self._radius)
        self._generate_grid()
        super(SphereScreen, self).__init__(config)
Exemple #2
0
    def __init__(self, config):
        config_screen = config['Screen']['CylinderScreen']

        self._radius = config_screen['radius']
        # cylinder length
        # (height is more appropriate name but is used elsewhere)
        self._length = config_screen['height']

        self._height = config_screen['columns']
        self._width = config_screen['parallels']

        # parameter corresponds to the length of the image
        # TODO allow to be specified
        self._screen_to_image_map = pointmapfactory(
            config_screen['image_map'])(self._length)
        self._generate_grid()
        super(CylinderScreen, self).__init__(config)