Questions tagged [graphics]

Graphics are visual presentations. Questions using this tag should also be tagged with the appropriate language and graphics subsystem in use. For more general graphics questions, consider Computer Graphics Stack Exchange (computergraphics.stackexchange.com).

Graphics

The tag should be assigned to questions about constructing, displaying and manipulating visual presentations. Questions should also be tagged with the appropriate language and graphics subsystem in use. For more general graphics questions, consider Computer Graphics Stackexchange.

While historically there were two parallel developments of vector and raster (bitmap) systems, modern systems all implement the raster model at the hardware layer but may use extensive applications of vector graphics techniques at higher levels. The entire chain through the various levels to go from model to picture on screen is known as the pipeline.

The Borland Graphics Interface (graphics.h) has its own tag:

Examples

Construction:

  • How to turn raw data into a bitmap?
  • How to generate a chart, how to draw using vectors?
  • How to load a .3ds file and display the model?

Displaying

  • How to display a large bitmap scaled down?
  • How to use an image as a texture for a control?
  • How to ray-trace voxel data?

Manipulating

  • How to modify images using common effects such as filters?
  • How to create animations?

Counterexamples

  • How to draw using a paint program? --> too basic, not programming related
  • How to take a picture when there is not enough light? --> see Photography
  • How to scan a pencil drawing? --> software tools, see SuperUser
  • What graphics card should I buy? --> shopping questions are off-topic on most SE sites

Resources

Free Graphics Programming Books

20510 questions
6
votes
2 answers

How to force Mac window to foreground?

How can I programmatically force a mac window to be the front window? I have the window handle, and want to ensure that my window is displayed above all other windows. I can use both Carbon & Cocoa for this.
Thomi
  • 11,647
  • 13
  • 72
  • 110
6
votes
5 answers

Is it possible to change turtle's pen stroke?

I need to draw a bar graph using Python's turtle graphics and I figured it would be easier to simply make the pen a thick square so I could draw the bars like that and not have to worry about making dozens of rectangles and filling them in. When I…
Matt
  • 2,953
  • 3
  • 27
  • 46
6
votes
1 answer

Computing average grid size

I am trying to compute the average cell size on the following set of points, as seen on the picture: . The picture was generated using gnuplot: gnuplot> plot "debug.dat" using 1:2 The points are almost aligned on a rectangular grid, but not quite.…
malat
  • 12,152
  • 13
  • 89
  • 158
6
votes
2 answers

Draw a semicircle / half circle in WPF / C#

I need to draw a semicircle / half circle in WPF. Any idea how to do that? Thanks for any hint!
stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270
6
votes
1 answer

Java : VolatileImage slower than BufferedImage

I'm making a game in java and in used BufferedImages to render content to the screen. I had performance issues on low end machines where the game is supposed to run, so I switched to VolatileImage which are normally faster. Except they actually slow…
Norswap
  • 11,740
  • 12
  • 47
  • 60
6
votes
2 answers

Ray tracing - refraction bug

I am writing a ray tracer. So far I have diffuse, Blinn lighting and reflections. Something has gone wrong with my refractions and I have no idea what. I'm hoping someone can help me out. I have a big red diffuse + Blinn sphere and a small…
PEC
  • 593
  • 1
  • 5
  • 16
6
votes
1 answer

Is there an equivalent of soft pen in GDI+?

I need to draw a soft wide outline for my GDI+ GraphicsPath. Something like this: A path edge is shown in red. I'd like to use a wide pen which is smooth. I also need an ability to control smoothness of the pen. I tried to use a gradient brush with…
Lev
  • 730
  • 12
  • 32
6
votes
3 answers

Wrapper over Graphics APIs

I'm a huge fan of having a game engine that has the abilty to adapt, not just in what it can do, but also in how it can handle new code. Recently, for my graphics subsystem, I wrote a class to be overriden that works like this: class…
Joseph Pla
  • 1,600
  • 1
  • 10
  • 21
6
votes
3 answers

Reverse (remove) anti-aliasing filter

I have a set of anti-aliased greyscale PNG images. I need to know how to programatically revert the anti-aliasing effect and get sharp edges again. I'm using GDI+ but I am less interested in code. I need an algorithm. The greyscale images (should)…
6
votes
4 answers

Implementing undo redo in painter program

I'm writing a painter program, in which I want to implement the undo and redo of the basic operations like drawing lines, drawing ellipse, and so on. Is there any good methods to do that? What attributes should be included in one…
Philip Zhang
  • 627
  • 8
  • 17
6
votes
2 answers

Adaptive parameter for Canny Edge

I'm using a project using OpenCV for detecting a card that will be place on a atable. I have successfully detect it using Canny Edge. However, for different image the parameter must be tuned manually. I wish for my project to be worked with every…
IllSc
  • 1,419
  • 3
  • 17
  • 24
6
votes
5 answers

Resize PNG image

HI! Could you please tell me how to resize a .png image. Or better give an example. I've been searching for the answer for a long time and it seems that nobody knows how to resize a .png image and keep its transparency. :(
serhiyiv
  • 183
  • 1
  • 2
  • 10
6
votes
3 answers

How to plot single/multiple lines depending on values in a column with GNUPlot

I have a little problem using gnuplot. Here is my datafile: From Time Packets Jitter 127.0.0.1:53091 1 0 274 127.0.0.1:53091 2 0 417 127.0.0.1:53091 3 36 53 127.0.0.1:53091 4 215 55 127.0.0.1:53090 4 215 55 127.0.0.1:53091 5 215 33 …
DJunior
  • 63
  • 1
  • 3
6
votes
1 answer

Trouble with Phong Shading

I am writing a shader according to the Phong Model. I am trying to implement this equation: where n is the normal, l is direction to light, v is the direction to the camera, and r is the light reflection. The equations are described in more…
Babbu Maan
  • 149
  • 2
  • 3
  • 7
6
votes
1 answer

Special characters in knitr (cairoDevice doesn't work)

I have problem with special characters in my knitr document. Normal text works fine but the polish letters in the title or axis name on the picture doesn't. I tried to fix this with installing cairoDevice package. But it still doesn't work.…
jjankowiak
  • 3,010
  • 6
  • 28
  • 45
1 2 3
99
100