An open API service indexing awesome lists of open source software.

https://github.com/ostad-ai/computer-graphics

In this repository, we include algorithms that are in the field of Computer Graphics and related topics.
https://github.com/ostad-ai/computer-graphics

3d-graphics barycentric-coordinates chaos-game computer-graphics fractal intersection-points iterated-function-system perlin-noise perspective-transformation point-in-polygon python texture-mapping

Last synced: 4 months ago
JSON representation

In this repository, we include algorithms that are in the field of Computer Graphics and related topics.

Awesome Lists containing this project

README

        

# Computer-Graphics
Here, we provide programs related to the field of Computer Graphics
1) **Perspective Transformation** from scratch in Python.
2) **Hidden Surface Removal** with Back-Face Culling in Python.
3) **Illumination models** and surface reflections in Python.
4) **Triangle** and **Barycentric** Coordinates in Python.
5) **Barycentric** coordinates for triangle and **texture mapping** in Python.
6) **Point in polygon:** Even-odd rule for inside-outside test for polygons in Python.
7) **Texture mapping** for **quadrilaterals** using inverse bilinear interpolation in Python.
8) Two-dimensional **metaballs** in Python.
9) **Chaos Game** for **Iterated Function System** (IFS).
10) 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.
11) 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.
12) **Elementary cellular automatom:** Elementary CA is used to create some patterns which are interesting. Here, we review these types of CA with Python code.
13) **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.
14) **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.
15) **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.
16) **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.
17) **Intersection between line segments and circles:** This time we develop formulae to find the intersection between a *line segment* and a *circle*. The formulae are extendable to find the intersection between line segments and *spheres*. The Python code here is written for intersections between line segments and circles.
18) **Rose curves:** Rose curves are two-dimensional curves defined in *polar coordinates* by using sine of cosine fucntions. Here, we review those curves and display them with different parameters.
19) **Line-Plane Intersection:** Having a plane and a line in 3D, we are going to find at what point they intersect. A plane and a line may intersect at one point, or they are parallel. When they are parallel, if the line lies on the plane, we have countless intersections. On the other hand, if the parallel line to the plane does not lie on the plane, there will be no intersection. We demonstrate the mentioned topic with the Python code here.