Commit f227bbb0 authored by Mythezone's avatar Mythezone
Browse files

--(quick update)

parent 33a53e36
Loading
Loading
Loading
Loading
(8 KiB)

File changed.

No diff preview for this file type.

+x+56.6 KiB

File added.

No diff preview for this file type.

+47
Changes for README.md: 47 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -79,8 +79,55 @@
 * pandas

 ##### 4.1.3 OpenGL
 请参考:[PyOpenGL 官方文档](http://pyopengl.sourceforge.net)
 * PyOpenGL,PyOpenGL_accelerate
  
 目前OpenGL尚不支持Python3,所以可能会折中采用Pyglet先进行学习。
  
  
##### 4.1.4 pillow
> Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. As of 2019, Pillow development is supported by Tidelift.

##### 4.1.5 FontTools
> What is this?
  fontTools is a library for manipulating fonts, written in Python. The project includes the TTX tool, that can convert TrueType and OpenType fonts to and from an XML text format, which is also called TTX. It supports TrueType, OpenType, AFM and to an extent Type 1 and some Mac-specific formats. The project has an MIT open-source licence.
  Among other things this means you can use it free of charge.
  User documentation and developer documentation are available at Read the [Docs](https://fonttools.readthedocs.io/en/latest/).
```bash
# download the source code to 'fonttools' folder
git clone https://github.com/fonttools/fonttools.git
cd fonttools

# create new virtual environment called e.g. 'fonttools-venv', or anything you like
python -m virtualenv fonttools-venv

# source the `activate` shell script to enter the environment (Un*x); to exit, just type `deactivate`
. fonttools-venv/bin/activate

# to activate the virtual environment in Windows `cmd.exe`, do
fonttools-venv\Scripts\activate.bat

# install in 'editable' mode
pip install -e .
```

##### 4.1.6 wxPython
> **Project description**
 Welcome to wxPython’s Project Phoenix! Phoenix is the improved next-generation wxPython, “better, stronger, faster than he was before.” This new implementation is focused on improving speed, maintainability and extensibility. Just like “Classic” wxPython, Phoenix wraps the wxWidgets C++ toolkit and provides access to the user interface portions of the wxWidgets API, enabling Python applications to have a native GUI on Windows, Macs or Unix systems, with a native look and feel and requiring very little (if any) platform specific code.
 For more information please refer to the README file, the Migration Guide, or the wxPython API documentation.
 Archive files containing a copy of the wxPython [documentation](http://docs.wxpython.org/index.html), the demo and samples, and also a set of MSVC .pdb files for Windows are available here.
 The utility tools wxdocs and wxdemo will download the appropriate files with wxget, (if necessary), unpack them, (if necessary) and launch the appropriate version of the respective items. (Documents are launched in the default browser and demo is started with python).

 ##### 4.1.7 [pyglet](https://pyglet.readthedocs.io/en/latest/)
 > pyglet is a cross-platform windowing and multimedia library for Python, intended for developing games and other visually rich applications. It supports windowing, user interface event handling, game controllers and joysticks, OpenGL graphics, loading images and videos, and playing sounds and music. pyglet works on Windows, OS X and Linux.

 > Some of the features of pyglet are:

 * No external dependencies or installation requirements. For most application and game requirements, pyglet needs nothing else besides Python, simplifying distribution and installation.
 * Take advantage of multiple windows and multi-monitor desktops. pyglet allows you to use as many windows as you need, and is fully aware of multi-monitor setups for use with fullscreen games and applications.
* Load images, sound, music and video in almost any format. pyglet has built-in support for common audio and image formats, and can optionally use ffmpeg to load almost any other compressed audio or video files.
* pyglet is provided under the BSD open-source license, allowing you to use it for both commercial and other open-source projects with very little restriction.




+64
Changes for code_test/first_step.py: 64 added lines, 0 removed lines.
Original line number Diff line number Diff line
import pygame
from pygame.locals import *

from OpenGL.GL import *
from OpenGL.GLU import *

verticies = (
    (1, -1, -1),
    (1, 1, -1),
    (-1, 1, -1),
    (-1, -1, -1),
    (1, -1, 1),
    (1, 1, 1),
    (-1, -1, 1),
    (-1, 1, 1)
    )

edges = (
    (0,1),
    (0,3),
    (0,4),
    (2,1),
    (2,3),
    (2,7),
    (6,3),
    (6,4),
    (6,7),
    (5,1),
    (5,4),
    (5,7)
    )


def Cube():
    glBegin(GL_LINES)
    for edge in edges:
        for vertex in edge:
            glVertex3fv(verticies[vertex])
    glEnd()


def main():
    pygame.init()
    display = (800,600)
    pygame.display.set_mode(display, DOUBLEBUF|OPENGL)

    gluPerspective(45, (display[0]/display[1]), 0.1, 50.0)

    glTranslatef(0.0,0.0, -5)

    while True:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                pygame.quit()
                quit()

        glRotatef(1, 3, 1, 1)
        glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)
        Cube()
        pygame.display.flip()
        pygame.time.wait(10)


main()
 No newline at end of file
+1299

File added.

Preview size limit exceeded, changes collapsed.

Loading