Top "2d" questions

2D computer graphics is the computer-based generation of digital images—mostly from two-dimensional models.

2D tile map generation

I'm developing a 2D tile engine and at this moment I'm working on map generation algorithms. I tried the basic …

algorithm 2d tile procedural-generation
3d to 2d Projection Matrix

I have 3 points in a 3D space of which I know the exact locations. Suppose they are: (x0,y0,z0), (…

3d geometry matrix 2d projection
Android - How to draw an arc based gradient

I am trying to create an arc (variable number of degrees) that gradually goes from one color to another. From …

android graphics 2d geometric-arc
Inverse Bilinear Interpolation?

I have four 2d points, p0 = (x0,y0), p1 = (x1,y1), etc. that form a quadrilateral. In my case, the …

math graphics geometry 2d bilinear-interpolation
Function for rotating 2d objects?

Is it possible to write a function in python that could rotate any 2d structure with the arguments being only …

python function rotation 2d physics
Framebuffer FBO render to texture is very slow, using OpenGL ES 2.0 on Android, why?

I am programming an Android 2d game using opengl es 2.0. After I draw my sprites to the backbuffer I draw …

android 2d opengl-es-2.0 framebuffer render-to-texture
2d Array in Spiral Order

I'm trying to fill an array in spiral order. So far, I can print the array in spiral order, but …

java arrays 2d fill spiral
How to calculate both positive and negative angle between two lines?

There is a very handy set of 2d geometry utilities here. The angleBetweenLines has a problem, though. The result is …

math geometry 2d
Changing From Perspective to Orthographic Matrix

I have the scene with one simple triangle. And i am using perspective projection. I have my MVP matrix set …

opengl 2d glsl orthographic
R generate 2D histogram from raw data

I have some raw data in 2D, x, y as given below. I want to generate a 2D histogram from …

r 2d histogram raw-data