Routing is the process of calculating or modifying one step at a time, sometimes referred to as laying a "track" or contour. This is a professional term, and its meaning changes depending on the field of activity to which it belongs.
Trace in vector graphics
If we are talking about vector graphics, then tracing means the translation of a raster (pixel) image into a vector one (such where the image is described using mathematical formulas).
Tracing can be carried out both in automatic and manual mode. Some vector graphics editors have built-in automatic routing functions, but the result is a file with a lot of anchor points that is difficult to use. However, if you have a raster file that needs to be printed at a large size (for example, a regular photo to stretch for a poster on the wall of a building), then autorouting and then zooming in will be the only solution. Manual tracing is tracing the contours of the desired image using the tools available in the program for creating Bezier curves.
Tracing in programming
The step-by-step execution of a program, receiving a change in all parameters or stopping at each operation, is also called tracing. It is useful if you are debugging your own code. Sometimes the algorithm looks correct, but somehow it doesn't work. It is tracing that allows you to understand at what stage the error occurs. Also, the tracing method helps to understand someone else's code.
Ray tracing
Ray tracing, or path tracing, is a rendering technique (creating an image from a 3D model) in computer graphics, which belongs to geometric optics. It allows you to build an image based on knowledge of the laws of how individual rays of light interact with existing surfaces. In ray tracing, the program's algorithm sends rays from the "camera", and they are reflected from different surfaces until they are absorbed or scattered. The more rays have been traced, the better the result will be.
This rendering method allows you to build images of the best quality, but requires powerful computational resources. However, some effects are simply impossible to recreate with other rendering methods, so sometimes ray tracing is the only possible solution.
Tracing as building links
Trace also means finding lines that will connect the nodal points of a system. If you are designing a computer board (for example, a video card), then routing in this process is finding the lines that will connect the pins of the board elements.