Skip to main content

Some helper class

Project description

glsurface

glsurface is a python class to show show 2d data with wxpython and pyopengl.

Installation

$ pip install glsurface

Usage

  1. Derived a class from TrackingSurface
    class Surface(TrackingSurface):
        def __init__(self, *args, **kwargs):
        TrackingSurface.__init__(self, *args, **kwargs)
        ...
    
  2. Create an instance, and set data (optional)
    class SurfacePanel(wx.Panel):
    
        def __init__(self, parent):
            wx.Panel.__init__(self, parent, -1)
            ...
            self.x = np.linspace(0, 2 * np.pi, 30).reshape((1, 30))
            z = np.cos(self.x).T * np.sin(self.x)
            self.canvas = Surface(self, {'z': z})
            ...
    
  3. Update the data
    1. Add the new frame data to the current frame buffer
      self.canvas.NewFrameArrive(z, silent=False)
      
    2. Or reset the frame buffer with new data
      self.canvas.SetFrames(points, reset_buf_len=True, silent=False)
      

Check gltest.py for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

glsurface-0.1.0.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

glsurface-0.1.0-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file glsurface-0.1.0.tar.gz.

File metadata

  • Download URL: glsurface-0.1.0.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for glsurface-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7723c0925ed5cc12098eb9caf327f173649f219ad55357b6acb41db5f1be089a
MD5 6543c63c4105e950e067b3066cb7b39f
BLAKE2b-256 cd2eb7010e3be17311552ce193a3b30aacc6dabd31111150f313dfde97d583a4

See more details on using hashes here.

File details

Details for the file glsurface-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: glsurface-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for glsurface-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ce71209fcdf0fe3deeeae5f37b47190e3650bff853bf552408f2bccc7c1e5fa
MD5 f6a827ea6717e0bd8793e9881bc7c4b7
BLAKE2b-256 ae4198d26942fdcd20aa5e40ff3822373b87a11987b144a6dea45fa40fbe061a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page