Deadline: July 4th (Thu) at 15:00pm
We use Python for this assignment. This assigment only supports Python ver. 3.
To check if Python 3.x is installed, launch a command prompt and type python3 --version
and see the version.
For MacOS and Ubuntu you have Python installed by default. For Windows, you may need to install the Python by yourself. This document show how to install Python 3.x on Windows.
We want to install dependency locally for this assignment.
cd acg-<username>
python3 -m venv venv # make a virtual environment named "venv"
Then, start the virtual environment. For Mac or Linux, type
source venv/bin/activate # start virtual environment
For Windows, type
venv\Scripts\activate.bat # start virtual environment
In the command prompt, you will see (venv)
at the beginning of each line.
There will be venv
folder under acg-<username>
.
In this assignment we use many external library. We use pip
to install these.
pip3 install numpy
pip3 install moderngl
pip3 install moderngl_window
pip3 install scipy
Alternatively, you can install above dependency at once by
cd acg-<username>/task09
pip3 install -r requirements.txt
type pip3 list
and then confirm you have libraries such as moderngl
, numpy
, pillow
, pyglet
, pyrr
, scipy
etc.
Follow this document to submit the assignment, In a nutshell, before doing the assignment,
- make sure you synchronized the
main
branch of your local repository to that of remote repository. - make sure you created branch
task09
frommain
branch. - make sure you are currently in the
task09
branch (usegit branch -a
command).
Now you are ready to go!
Run the code with python3 main.py
The program will output out.png
. Rename it to out_default.png
then it replaces the image below.
This code only move the position of fixed vertex. Let's deform other vertices to make hte deformation smooth!
Write a few lines of code around line #134 to implement smooth mesh deformation using Laplacian.
The program will output out.png
. Rename it to out_laplacian.png
then it replaces the image below.
Write a few lines of code around line #134 to implement smooth mesh deformation using BiLaplacian.
The program will output out.png
. Rename it to out_bilaplacian.png
then it replaces the image below.
After modify the code, push the code and submit a pull request. Make sure your pull request only contains the files you edited. Good luck!
BTW, You can exit the virtual environment by typing deactivate
in the command prompt.