diff --git a/.gitignore b/.gitignore index 6818798..d32855e 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,7 @@ venv/ # OS generated files .DS_Store -Thumbs.db \ No newline at end of file +Thumbs.db + +# Other files +controlpts.txt \ No newline at end of file diff --git a/lab1/README.md b/lab1/README.md index 2adda26..c62a0c7 100644 --- a/lab1/README.md +++ b/lab1/README.md @@ -10,6 +10,8 @@ I use `uv` to create a virtual environment for this project. You can synchronize uv sync ``` +`uv` is not the only option, you can run this program in any Python environment with the required dependencies installed. The main dependencies are listed in `pyproject.toml`. + ## Run the Code To run the interactive Bezier curve editor, execute the following command in your terminal: @@ -25,6 +27,7 @@ For example, to create a new Bezier curve with 5 control points, run: ```bash uv run ibezier.py 5 ``` + To load control points from a file named `control_points.txt`, run: ```bash @@ -33,4 +36,4 @@ uv run ibezier.py control_points.txt ## Statement of AI Usage -I use Github Copilot's Auto Completion feature to help me write code and README faster. I ask Gemini to help me to debug GUI issues. +I use `Github Copilot`'s Auto Completion feature to help me complete code lines and README faster. I ask `Gemini` to help me to debug GUI issues. diff --git a/lab1/bezier_circle.png b/lab1/bezier_circle.png new file mode 100644 index 0000000..d7097d2 Binary files /dev/null and b/lab1/bezier_circle.png differ diff --git a/lab1/bezier_figure8.png b/lab1/bezier_figure8.png new file mode 100644 index 0000000..57213a8 Binary files /dev/null and b/lab1/bezier_figure8.png differ diff --git a/lab1/bezier_figures.txt b/lab1/bezier_figure8.txt similarity index 100% rename from lab1/bezier_figures.txt rename to lab1/bezier_figure8.txt diff --git a/lab1/ibezier.py b/lab1/ibezier.py index 9146179..b0f6e00 100644 --- a/lab1/ibezier.py +++ b/lab1/ibezier.py @@ -21,7 +21,7 @@ def ibezier(inputA): global num_sample global curve_degree, is_subdivided # add for bezier - # Compute a point on the Bezier curve at parameter t using de Casteljau's algorithm. + # de Casteljau's algorithm. # points: list of tuples/lists [(x0,y0), (x1,y1), ...] # Returns: (x, y) coordinates on the curve def deCasteljau(points, t):