Skip to content

Chewy42/cpsc515-SP25

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CPSC 515: Computer Graphics and Computational Geometry

Programming Environment Setup

Installation

  1. Download software:
  1. Install software (to default location)
  • Visual Studio Code
  • Anaconda
  1. Create python virtual environment and install PyGame and PyOpenGL

Windows

Create and activate Anaconda virtual environment
  • Open Anaconda Promopt Command Window
  • type conda create --name cpsc515 python=3.8
  • type conda activate cpsc515
Install PyGame
  • type pip install pygame
Install PyOpenGL and PyOpenGL_accelerate from downloaded files
  • Navigate to the folder where you downloaded PyOpenGL-3.1.6 and PyOpenGL_accelerate-3.1.6
    • For example, cd Downloads\cpsc515
  • 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

MacOS

Create and activate Anaconda virtual environment
  • Open Terminal
  • type conda create --name cpsc515 python=3.8
  • type conda activate cpsc515
Install PyGame using pip
  • type python3 -m pip install -U pygame
Install PyOpenGL and PyOpenGL_accelerate
  • 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

4. Install Python Computing Libraries

  • type pip install numpy

Run the helloworld code

  1. 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
  1. 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
  1. 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages