Skip to content

Add LaTeX-formatted README for ICSP homework problem set#1

Draft
worldmake with Copilot wants to merge 2 commits into
mainfrom
copilot/prepare-latex-readme-for-homework-problems
Draft

Add LaTeX-formatted README for ICSP homework problem set#1
worldmake with Copilot wants to merge 2 commits into
mainfrom
copilot/prepare-latex-readme-for-homework-problems

Conversation

Copilot AI commented Mar 29, 2026

Copy link
Copy Markdown

Adds a structured LaTeX README (README.tex + compiled README.pdf) documenting six image-processing code modifications across three homework problems.

Document structure

  • Drive link prominently framed at the top
  • Problem 2-1 — Kernel convolution generalisation
    • (a) Hard-coded 3×3 → 5×5: update KERNEL_SIZE, kernel array, and half = KERNEL_SIZE / 2
    • (b) Run-time odd n×n: validates n % 2 != 0 and n > 1, exits with stderr message otherwise
  • Problem 2-2 — In-place 90° rotation (output dims = H×W)
    • (a) CW: (x,y) → (H−1−y, x)
    • (b) CCW: (x,y) → (y, W−1−x)
  • Problem 2-3 — Crop + resize pipeline
    • (a) crop(src, x0, y0, w, h) — copies rectangle [x0, x0+w) × [y0, y0+h)
    • (b) crop_and_resize — nearest-neighbour scale to displayW × displayH
    • (c) Full edge-case table: negative origin, non-positive dimensions, out-of-bounds region, non-positive display size, NN clamp, NULL propagation

Other files

  • README.md updated to reference .tex source and drive link
  • .gitignore excludes LaTeX intermediate artefacts (.aux, .log, .out, .toc, etc.)
Original prompt

Prepare a Latex formatted readme which explains each of the following modifications to a code file containing a single program 6 times to solve the following homework problems:
(ps: mention drive link at the top, as such-)

"drive link to code files for each problem" (the explanations to which are presented here itself):
"https://drive.google.com/drive/folders/1oU7uNtzw4zDzvH8hW310cTP0fcf66ybJ?usp=sharing"

Problem 2-1. Socialize with other pixels [40 points]
(a) [20 points] Take the code for convolving with a 3 by 3 kernel and modify it to
use a 5 by 5.
(b) [20 points] Then, modify it to use any odd n > 1. Even numbers should be
rejected with an error message.
NOTE: You must use the given codebase for 5×5 for the following questions. Please
provide the required code as per the question.
Problem 2-2. Take a left to go right [20 points]
Take an image - a rectangular one - and turn it:
(a) [10 points] Clockwise by 90 degrees
(b) [10 points] Counter-clockwise by 90 degrees
Problem 2-3. Reshaping reality (kind of) [40 points]
(a) [15 points] Take any image, a point P=(x, y), and two values w and h and
produce a cropped image, where the top left corner is P, and which has width
w and height h.
(b) [15 points] Additionally, take two more values displayW and displayH and
produce a stretched/squeezed image. That is, the cropped bit of the image of
width w and heigh h, should now be stretched/squeezed into a new image of
width displayW and height displayH.
(c) [10 points] Take a note of all the safety checks/edge cases that you have implemented.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add LaTeX formatted README for homework modifications Add LaTeX-formatted README for ICSP homework problem set Mar 29, 2026
Copilot AI requested a review from worldmake March 29, 2026 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants