PyOpenGL is no longer used at all (no offense to Mike Fletcher and his loyal followers). After it was suggested last week, I'm now including a (stripped-down) version of Pyglet, which provides a ctypes-only OpenGL wrapper, in addition to excellent windowing, keyboard, and mouse support. Pyglet's event model is also compatible with the multi-threaded interface I described last week. That means you can now do this:

>>> from sympy import Symbol

>>> from sympy.modules.plotting import Plot

>>> x,y = Symbol('x'),Symbol('y')

>>> p = Plot(width=300, height=250, bbox=True)

>>> p[1] = x**2-y**2, [x,-1,1], [y,-1,1]

>>>

>>> p[1] = x**2+y**2, [x,-1.0,1.0], [y,-1.0,1.0]

>>> p[2] = -x**2-y**2, [x,-1.0,1.0], [y,-1.0,1.0]

>>> print pAlso new:

[1]: x**2+y**2, [x,-1.0,1.0], [y,-1.0,1.0]

[2]: -x**2-y**2, [x,-1.0,1.0], [y,-1.0,1.0]

- Rotation mechanism based on a virtual trackball.
- Scroll-wheel zoom.
- Holding the shift key allows more precise movement.
- Smooth time-based keyboard movement.
- Added arrow and page up/down key control (ASDWRF is still there).
- X,Y, and Z-blended coloring scheme.

- Configurable coloring.
- Labeled coordinate axes.
- Translation in the plane of the screen.
- Automatic intervals.
- Intuitive 2d support, including dynamic intervals.
- Display lists (maybe faster for higher-resolution rendering, we'll see).
- Anti-aliasing.

## 3 comments:

I have no imagination for functions to test and/or demo, as you can see from my repeated use of ellipsoids, saddles, and trig functions. Any suggestions, and in particular real-world examples, would be appreciated! ;-)

x2+y2=(1-z)z4

http://mathworld.wolfram.com/KissSurface.html

I was saddened to find that it no longer works in my virtual machine. I always get "ContextException: No conforming visual exists" :(

Post a Comment