Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
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
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
5 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,820
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

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,437
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

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

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,251
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,392
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,820
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,437
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

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,421
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

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,820
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,437
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,219
2 votes

Difference in pixels between different monitors' sizes

Ad 1) Yes, if both monitors have the same resolution but different screen sizes, this means the pixels of the larger monitor are bigger. It could also mean the space between the pixels is different. ...
Paul Houx's user avatar
  • 140
2 votes
Accepted

How do I normalize all pixel values such that all pixel values are 'pulled towards' the mean?

Here are both images "cleaned" using simple luminance thresholding like I suggested in the comments. There was nothing special done to these images, a simple "is the luminance below ...
pmw1234's user avatar
  • 3,219
1 vote

undefined reference to `SDL_setRenderDrawColor'

Looks like a typo since the compiler isn't complaining about the other SDL function calls. You probably need to change SDL_setRenderDrawColor to ...
Joshua Kennedy's user avatar
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,437
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,219
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,219
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,605
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
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,421
1 vote
Accepted

Anti-aliasing - Controlling colour density of pixel that comes within the "rectangle" surrounding my line

You have a background color and the color of your line, an antialiased line has additional lines drawn on either side of the first that are simply part way between the color and brightness of your ...
Rob's user avatar
  • 256

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