4 votes

Determining the intersections of a line segment and grid

I suggest using a simple iterative method. Let's first find the places where it crosses a vertical grid lines. These are places where the line goes through a point $(x,y)$ where $x$ is an integer. ...
D.W.'s user avatar
  • 159k
3 votes

How is CPU different from GPU?

GPUs are highly specialized: they are very good at a very small number of things, but they are extremely bad at everything else. CPUs are general: they are mediocre at everything. GPUs are good at ...
Jörg W Mittag's user avatar
2 votes

Bresenham's line drawing algorithm guarantees

Yes, Bresenham line drawing algorithm guarantees that endpoints are drawn. The error accumulation is used for drawing and decreased after drawing a pixel, this is the core idea of the algorithm: ...
Evil's user avatar
  • 9,455
2 votes

How is CPU different from GPU?

The basic architecture of CPU and GPU are different. Modern CPU's consist of a set of cores. Each core has its own a set of registers, a ALU and a control unit with some private cache. In a CPU the ...
ajit's user avatar
  • 376
2 votes

can similarity transformation be linear transformation?

Linear transformations fulfill two criteria: T(A) + T(B) = T(A + B) and k T(A) = T(k A) (for any scalar k) What happens if A ...
DMGregory's user avatar
  • 338
1 vote

Video compression algorithm

You should check how JPEG works. For video compression, you have to implement how JPEG works on every frame. There is a great video on YouTube by Reducible on how JPEG works under the hood. It ...
0jas's user avatar
  • 26
1 vote

Ray tracing tree

Note: Questions like this may be a better fit on Computer Graphics SE. I assume that you're talking about reflective surface interactions only, and are ignoring transmission, subsurface scattering, ...
Pseudonym's user avatar
  • 22.1k

Only top scored, non community-wiki answers of a minimum length are eligible