Coder Social home page Coder Social logo

vrarhomework's Introduction

利用pyopengl和freeglut实现相机模型

运行环境

ubuntu16.04

python-3.5.2:

  • numpy库
  • 3.7版本在下载PyOpenGL_accelerate时会报错

安装pyopengl

$ pip install PyOpenGL PyOpenGL_accelerate

更多下载细节参考pyopengl官网

安装freeglut

  • demo中使用的是freeglut窗口工具包,pyopengl官网貌似只支持glut和freeglut,有兴趣的同学可以尝试使用其他的窗口工具包,例如glfw
  • 如果同学你的系统是windows,那么你不需要再去安装freeglut,win32和win64的pyopengl安装包含了glut

安装freeglut

$ apt-get install freeglut3-dev

关于demo

  • 主要的两个函数gluLookAt和gluPerspective,gluLookAt用来设置视图变换,gluPerspective设置投影变换
  • demo中只是画了一个简单的立方体,有兴趣的同学可以利用着色器和纹理来创建更加美观的模型 相关函数请参考pyopengl文档

如果在安装环境和运行demo的过程中有问题,请在Issues中提出

vrarhomework's People

Contributors

zhizhuozhang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.