Computer Graphic algorithm experiments using p5.js.
- DDA Line Drawing
- Bresenham Line Drawing
- Bresenham Circle Drawing
- Midpoint Circle Drawing
- Cohen Sutherland Line Clipping
- Region Filling
- Transformation
- Create a new file in the
algorithmsfolder. - Write a function for the algorithm with
display: Displayas a parameter. - Use
display.setPixel(x, y)to set a pixel on the canvas. - Call the function in the
drawfunction insrc/main.ts.
Installed necessary packages:
yarnTo run the development build:
yarn devTo run the production build:
yarn buildTo preview the production build:
yarn preview