# Tag Info

Accepted

### World coordinates, Normalised device coordinates and device coordinates

World coordinates are at the bedrock of your game world. The 3D positions of all objects are ultimately specified in world space, either directly or through a node hierarchy. The ground, buildings, ...
• 23.7k

### How to produce simple 2D illustrations to accompany geometry answers?

I use a variety of tools depending on the particular needs of the moment. I have a bias toward free tools, as I don't have access to things like Illustrator or Mathematica. For general vector art ...
• 23.7k

### How to produce simple 2D illustrations to accompany geometry answers?

Personally my choice of poison is Adobe Illustrator. Other apps such as inkscape, Corel Draw, Xara Designer will also do. In a pinch even PowerPoint will work. Though I do not personally recommend ...
• 8,159
Accepted

### Understanding Jump Flooding Algorithm (JFA) for Voronoi Diagrams

I think that there is a bit of confusion in terminology. My understanding is that only the initially colored points, before step 1, are called seeds. Maybe this helps clarify the algorithm as well. ...
• 306
Accepted

### How to invert an affine matrix with small values?

I found a solution to my specific problem. Instead of computing the determinant and hitting the precision wall, I use the Gauss-Jordan method step by step. In my specific case of affine ...
• 241
Accepted

### Generate this kind of 2d burst or pulse algorithm?

Rather than using an image, I would suggest doing this kind of effect using a shader. I'm not familiar with Cocos2d-x, but some quick googling suggests that it can work with shaders. You'd use a pixel ...
• 23.7k
Accepted

### How to calculate matching roundness of two offset rectangles?

What you (probably) want to achieve is something like this: When having a closer look at one of the corners and add a few lines, we see this: The black lines indicate that the center points of the ...
• 1,200

### Fundamentally, how are 2D bitmaps rendered?

You have to distinguish the text and graphical modes of the graphics board of your machine. In the old days, mostly the text mode was supported. In this mode the board took care of storing the bitmap ...
• 465
Accepted

### Different types of Gaussian blur?

From the GIMP docs: IIR IIR stands for “infinite impulse response”. This blur works best for large radius values and for images which are not computer generated. RLE RLE stands for “run-length ...
• 5,872

### How to produce simple 2D illustrations to accompany geometry answers?

I just use Powerpoint to make such diagrams and it works great as soon as you're comfortable with its basic primitives. It supports all simple operations like rotation, translation, etc. and recent ...
• 1,944

### How to produce simple 2D illustrations to accompany geometry answers?

PostScript+ps2eps+mogrify For the Affine Transformations answer, I wrote a very small postscript program and then saved several copies under different names and edited each one to do each different ...
• 1,088
Accepted

### Why map Hammersley 2D set's (u,v) to sphere's (θ, φ) coordinates (and not to (φ, θ) )?

You can of course, as you suggested, map (u, v) to (φ, θ). Unfortunately, it does not solve the problem for 5 points: I've changed Holger Dammertz' code a bit (switched u and v), and you see that the ...
• 2,221

### Image rotation algorithm

It speed does not matter, I suggest to use a truncated sinc or a Lanczos isotropic kernel: to compute a target pixel, you back-rotate the filter and convolve it with the image. Since it is isotropic, ...
• 1,299

### How to produce simple 2D illustrations to accompany geometry answers?

Not the definitive toolbox you might be looking for, but just an extra tool I use myself: for 3d graphics, Blender might come in handy. Especially if you use the Export_SVG plugin (available from http:...
• 141
Accepted

### If you can use subdivision surfaces for 2D curves

Subdivision can be used for curves in 2D just as easily as for surfaces in 3D. Usually the subdivision algorithms applied to 2D are called subdivision curves. Subdivision curves do not suffer from the ...
• 967

### What technique would I use to create fake 3d walls as seen in Realm of the Mad God

What they're using in this game is called an orthographic projection. It is a special type of a projection, which does not bend objects, it does not mean that they are not using 3D. Now, of course ...
• 213
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 ...
• 8,159

### Skia example code not writing an image

This never writes anything to the output file because you haven't included any code to write to the output file. The only time you touch the file after opening it is in the line ...
• 6,440

### How to get polygon coordinates in screen space

Edit: This answer is only helpful in 3D If you want to do it geometrically... The inverse of the view-projection matrix, $K^{-1}$ is the matrix you want. Where $K = View * Projection$ If $\vec{v}$ ...

### Calculating intersection of polyline and line

Given that you want to test for intersection against rays with many different starting points and directions, it's worth investigating raytracing-style acceleration structures, such as the bounding ...
• 23.7k

### Linear independence of three points

Normalize $v_a$ and $v_b$ and your algorithm should no longer depend on the length of the edges, unless you consider numerical stability. As for the "best way", I'm not sure there's a much better ...
• 1,575
Accepted

### Why is pixel 0,0 at the top left of some formats and bottom left of others?

It comes down to history. The original interfaces for drawing stuff on the screen were for text, not images. Since the people who designed those early computers spoke languages that are read left-to-...
• 6,440
Accepted

### What is the difference between world coordinate, viewing coordinate and device coordinate in computer graphics?

The 2D pipeline involves ... [coordinate transformation terms] Can someone give me the detail differentiation among these? This is something I very recently learned while trying to understand how ...
Accepted

### Area-light approximation in 2D

Found a solution—it may not be strictly accurate for 2D, but it produces the look that I’m after. “Linear Light Shading with Linearly Transformed Cosines”, in section 1.3, describes a closed-form ...
• 2,012
Accepted

### $P^2$ vs projection plane

In computer graphics the projection plane is most commonly defined as a plane perpendicular to the camera at a specific distance from the camera (the distance is often labeled $g$). It is the plane ...
• 2,074

### Hardware-accelerated drawing of curved shapes

You can use OpenGl 4.x tessellation shaders to convert Bezier control points into polygons. A google search for "tessellation shader bezier" found this outline describing the tessellation of Bezier ...
• 121

### 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,...
• 46

### How to prevent moire artifacts in this light casting algorithm?

In principle you avoid using scatter (casting) behavior with GPU. They have offered random output coordinate write out since only shader model 5 as a need for extreme situations. But you should as ...
• 613
Accepted

### What part of the graphics chain rotates computer displays when in portrait mode?

On typical GPUs today it's option B: monitor rotation is done by the video output hardware ("display engine") during scan-out. In addition to rotating/flipping, the display engine can also scale the ...
• 23.7k