- Download software:
- Visual Studio Code (if not installed already)
- Anaconda (if not installed already)
- (For Windows only) PyOpenGL-3.1.6 and PyOpenGL_accelerate-3.1.6
- Install software (to default location)
- Visual Studio Code
- Anaconda
- Create python virtual environment and install PyGame and PyOpenGL
- Open Anaconda Promopt Command Window
- type
conda create --name cpsc515 python=3.8
- type
conda activate cpsc515
- type
pip install pygame
- Navigate to the folder where you downloaded PyOpenGL-3.1.6 and PyOpenGL_accelerate-3.1.6
- For example,
cd Downloads\cpsc515
- For example,
- type
pip install PyOpenGL-3.1.6-cp38-cp38-win_amd64.whl --force-reinstall
- type
pip install PyOpenGL_accelerate-3.1.6-cp38-cp38-win_amd64.whl --force-reinstall
- Open Terminal
- type
conda create --name cpsc515 python=3.8
- type
conda activate cpsc515
- type
python3 -m pip install -U pygame
- type
python3 -m pip install PyOpenGL PyOpenGL_accelerate
- Note: if you got errors when running the above command, try one of the following
pip install PyOpenGL PyOpenGL_accelerate
pip3 install PyOpenGL
- type
pip install numpy
- Download code
- Under this github repo, go to Code -> Download Zip
- Alternatively, if you are familiar with git/github, you may also clone the code from: https://github.com/trudiQ/cpsc515-SP25.git (pull only)
- if you want to save and upload your changes, fork it to your own repo before changing anything
- Open VScode
- Install Python extention
- Open code folder, e.g.,'cpsc515-SP25'
- Select Interpreter: Python 3.8.x ('cpsc515') # 'cpsc515' is the conda environment you just created
- Run python file 'helloWorld.py'
- Rotate the object: Hold the left-button of your mouse and drag the mouse (trackpad may also work!)
- Reset the object: Press '0' on your keyboard