28 votes
Accepted

What is Tessellation in computer graphics

Tesselation is a technique that allows you to generate primitives (triangles, lines, points and such) on the graphics-card. Specifically, it lets you repeatedly subdivide the current geometry into a ...
Dragonseel's user avatar
  • 1,810
11 votes
Accepted

Why does checkerboard pattern on a computer screen appear with a yellowish tint?

Because your monitor is not properly calibrated. On my screen at home the top and bottom parts have the same hue. At my office though, the top part tends to looks a bit yellow compared to the bottom ...
Julien Guertault's user avatar
8 votes

How does a computer upscale 1024x768 resolution to 1920x1080?

In essence a image is a group of point samples (read A pixel is not a little square3). When you transform or scale the image you need to resample it. So what you do, theoretically, is take the point ...
joojaa's user avatar
  • 8,397
7 votes
Accepted

How does the Painter's Algorithm handle transparency?

The common way to render transparent polygons in a rasterizer is by use of Alpha Blending, which basically combines the colour of the supposedly transparent pixel with the colour of the background at ...
Christian Rau's user avatar
6 votes

What is Tessellation in computer graphics

It activate 3 stages in the pipeline. The first is the tessellation control shader (hull shader in D3D) which looks at a set of vertices and then outputs how it should be divided up in separate ...
ratchet freak's user avatar
5 votes

How does a computer upscale 1024x768 resolution to 1920x1080?

There are numerous upscaling and downscaling algorithms available to scale images from any resolution to any other arbitrary resolution. Each algorithm typically involves a trade-off between ...
EvilTak's user avatar
  • 151
4 votes

Get screen size and then resize image accordingly

The OS does not, in many or most cases, know the physical screen size! Often the only thing you can glean is the make and model, sometimes not even that. So if you do not want to have a database then ...
joojaa's user avatar
  • 8,397
4 votes

vertical or horizontal line test

It is not generally useful to try to optimise small parts of a program before you have profiled the program to see where the most benefit can be gained by optimisation. Make sure everything is correct ...
trichoplax is on Codidact now's user avatar
4 votes

Difference in pixels between different monitors' sizes

The answer to both your questions is the same: the physical size of the monitor makes no difference at all. If your screen is 1920x1080 pixels, and you display a 960x540 image without any scaling, the ...
Dan Hulme's user avatar
  • 6,700
3 votes

How does the Painter's Algorithm handle transparency?

I would like to add that Painters' algorithm can be run from front to back with transparency provided your blending operations are associative. I would recommend reading Jim Blinn's "Compositing, Part ...
Simon F's user avatar
  • 4,181
3 votes

Algorithm for thinning a thick line

the canny algorithm is a great start. it takes a sobel input like so. Computes its gradient. Then depending on the gradient orientation it compares all neighbouring pixels aligned with it. If its a ...
Paul Goux's user avatar
3 votes
Accepted

Why do some videos look smoother and others don't on the same monitor

As you have now mentionned that your computer can actually keep up (at 150 fps no less), I suspect you have a case of temporal aliasing. The problem is that 150 is not a multiple of 60. Let's say we ...
Olivier's user avatar
  • 1,585
3 votes
Accepted

library / tool for implementing algorithms

If you're completely new to graphics programming I would start with Processing. It's based on Java and JOGL but comes with a whole bunch of drawing commands built in, and its own basic IDE. It's very ...
russ's user avatar
  • 2,372
3 votes
Accepted

Thick Line segment

The main part of it is simply Pythagoras's Theorem. The square root gives the length of the central line segment (which is the hypotenuse of a triangle formed by the change in x and change in y). The ...
Dan Hulme's user avatar
  • 6,700
3 votes
Accepted

human visual: relation of Distance and DPI

According to a review by Legge & Bigelow the arc or degrees of visual angle ($\alpha$) is, $$ \alpha = 57.3 \times S/D, $$ where S is height of object and D is distance to object. [1] $S/D$ is ...
joojaa's user avatar
  • 8,397
2 votes

What is this technique called and how can I reproduce it algorithmically?

I've done something similar. The way I did it was by using a height map image to change the positions of vertices in a grid in a vertex shader. I generated a 2D grid of vertices that were evenly ...
user1118321's user avatar
  • 3,401
2 votes

Calculate set of rectangles covering pixel diffs?

I would say it’s a weighted set covering problem. In specific, the cost for a set of points is the number of extra pixels in the bounding rectangle of this set. If the number of diff points is small,...
mushin's user avatar
  • 46
2 votes

Get screen size and then resize image accordingly

Back in the days, MSDN defined a couple of values which in most cases are useless (total crap): https://msdn.microsoft.com/en-us/library/windows/desktop/dd144877%28v=vs.85%29.aspx ...
Alexis Wilke's user avatar
2 votes

Which technique is fast to generate real-time reflections?

Usually modern game engines use Screen Space Reflections which is some kind of screen space raymarching. Basically, a simple way to achieve this is to shoot rays from the G-buffer. This means you use ...
CpCd0y's user avatar
  • 176
2 votes

Bresenham's Algorithm not drawing horizontal lines

e = (float)(delta_x / delta_y) - 1.0; e += (float)delta_x / delta_y; Either of these lines will cause a divide-by-zero error when ...
Dan Hulme's user avatar
  • 6,700
2 votes

Purpose and workflow of wireframe models

Regarding wireframes as an edge list. Wireframe models are used in engineering and CAD they provide several benefits. The Wikipedia page you linked has some benefits, this AutoCAD page has some more. ...
pmw1234's user avatar
  • 3,030
2 votes
Accepted

Purpose and workflow of wireframe models

Why are wireframes used? Games don't really use wireframes much, but they might be useful for HUD items etc. Asset creators, designers and engineers use wireframes to see whats inside objects. TO ...
joojaa's user avatar
  • 8,397
1 vote

Why does a game at 1080p look better on a 1080p display than 1440p display of the same size

I just went through this with a new 4k monitor under Windows 10 (but have repeated it many times with many different monitors): The On Screen Display (OSD) of the monitor should have an info page that ...
pmw1234's user avatar
  • 3,030
1 vote

wall clock using bresenhams circle drawing algo

The usual method is to just draw over the circle with your lines. The clock is behind the minute hand and the minute hand is behind the hour hand so the drawing order would be. Draw the clock face, ...
pmw1234's user avatar
  • 3,030
1 vote

Why do some videos look smoother and others don't on the same monitor

Humans don't really see anything beyond 20-25 fps. Even less is often sufficient; animation at 12 frames a second work quite well too. So when you watch TV, the fps of your image is 25-30, and yet ...
joojaa's user avatar
  • 8,397
1 vote

How can I draw a filled circle on a grid with the less rectangle as possible?

To get a proper circle, you can use a transformation matrix to transform your cell coordinates into equally spaced cartesian coordinates. In the case of your 50 x 100 pixel cells, your transformation ...
user1118321's user avatar
  • 3,401
1 vote

Convert RGB image to YUV420 using a hlsl shader

The problem here is that you're not storing the YUV values of a pixel at the same place in the result image. What you seem to be doing is first storing the full size Y image and after that the quarter-...
Christian Rau's user avatar
1 vote

Confused about graphic art and what software is used to create the environment of it?

This would be considered isometric. Isometric graphics were originally used to give a 3D look, when computers could not handle actual 3D graphics. The creation of this image, however, is different ...
bram0101's user avatar
  • 1,595
1 vote
Accepted

How to raytrace triangular faces when camera is not at origin?

Wow I'm stupid, the whole problem was I thought it was 1/t and it is actually 1-t in parametric form. Hope this helps someone ...
PolymorphismPrince's user avatar

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