Here, we provide programs related to the field of Computer Graphics
- Perspective Transformation from scratch in Python.
- Hidden Surface Removal with Back-Face Culling in Python.
- Illumination models and surface reflections in Python.
- Triangle and Barycentric Coordinates in Python.
- Barycentric coordinates for triangle and texture mapping in Python.
- Point in polygon: Even-odd rule for inside-outside test for polygons in Python.
- Texture mapping for quadrilaterals using inverse bilinear interpolation in Python.
- Two-dimensional metaballs in Python.
- Chaos Game for Iterated Function System (IFS).
- The Mandelbrot set is a well-known fractal, which is based on a recursive complex function. Here, we review the formulation. Then, two versions of implementing the set with Python are provided.
- The Julia set is another famous fractal, which follows the behaviour of iterated functions. Here, we display the Julia set for a quadratic complex function. The Python code has two versions: a slow one and a fast one.
- Elementary cellular automatom: Elementary CA is used to create some patterns which are interesting. Here, we review these types of CA with Python code.
- Two-dimensional cellular automata are mentioned here. 2D CAs are used for creating patterns and simulating some simple life forms. Here, Python codes are used to creating some patterns with CAs.
- Perlin noise from scratch: We review Perlin noise and then implement it in Python. Perlin noise is used in Computer Graphics for creating terrains, mountains, clouds, and etc.
- Line segments and their intersections: A line segment is a part of a line limited by two endpoints. Here, we review the parametric form of line segments and express the formulas to compute the intersection points of line segments.
- Circles and their intersections: Three forms for representing circles are mentioned here. Based on the Cartesian coordinates form of circles, we state the formulas to find the intersection points between circles.