Questions tagged [graphics]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
91 views

How 3D assets are managed in real time configurators?

We see a lot of 3D configurator web applications on the web and even other type of configurators in embedded systems, such as LED Totem displays. From real time car configurators which every major car ...
2 votes
1 answer
286 views

Best way to type-differentiate a Point and Vector?

I'm writing a ray-tracer in C++, and while writing a constructor for the Ray class: class Ray { public: Ray(const glm::vec3& origin, const glm::vec3& direction) : o{origin}, d{direction} {} ...
32 votes
7 answers
10k views

Writing in C for Performance? [closed]

I know I have quite frequently heard that C typically has a performance advantage over C++. I didn't really think anything else of it until I realized that MSVC doesn't even seem to support the newest ...
97 votes
2 answers
20k views

Why have hardware-accelerated vector graphics not taken off?

I'm working on an app that involves real-time manipulation of vector paths at 60fps, and I'm very surprised by how little information there is on the subject. At first, I tried to implement my idea ...
3 votes
4 answers
3k views

What are the advantages of matrix multiplication over individual variables (graphics)?

I am learning OpenGL and the tutorials (1, 2) I'm reading teach me that to scale/rotate/translate an object you have to know matrix multiplication. Why? Instead of 3x3 matrix you can use 6 floats: ...
26 votes
5 answers
7k views

The perfect crossfade

I find it hard to describe this problem in words, which is why I made a video (45 seconds) to illustrate it. Here's a preview of the questions, please have a look at it on Vimeo: http://vimeo.com/...
-3 votes
2 answers
286 views

What is YIQ color model? [closed]

As we know that RGB monitors requires separates signals for red, green, and blue components of the image but television monitors uses single composite signals. For this composite signal use YIQ color ...
2 votes
4 answers
3k views

Specific reasons why a top left origin is better/worse than a bottom left origin for computer graphics

I have been researching why the origins for most graphic applications are located in the top left corner of the screen. From everything I have read, they are located there because that is where the ...
6 votes
2 answers
761 views

Automated testing of programs with graphical output

I am a lecturer for a post-graduate module where I expect my students to write Python code that replicates examples from the textbook. The project has been running for a couple of years and this year ...
-5 votes
1 answer
206 views

What is the ideal data structure for 2D and 3D graphics in WebGL or Metal? [closed]

I have been thinking about this here and there for several years but haven't gotten around to having the time to actually implement it. I am getting closer to being able to implement a graphics ...
4 votes
1 answer
3k views

DirectX11: Where exactly does the buffer swapping happen in the 'Swap Chain'?

I've read up on the theory/reasoning behind a swap chain in Graphics. Everywhere I've read, they talk about pointers to the front and backbuffer(s) which are swapped instead of actual data exchange. ...
2 votes
1 answer
4k views

OpenGL programming vs Blender Software, which is better for custom video creation? [closed]

I am learning OpenGL API bit by bit and also develop my own C++ framework library for effectively using them. Recently came across Blender software which is used for graphics creation and is in turn ...
62 votes
1 answer
90k views

Treating a 1D data structure as 2D grid

I am working with a native class that represents a 2D image as a 1D array. If you want to change one pixel, for example, you need to now how to derive the index from the x,y coordinates. So, let's ...
2 votes
1 answer
148 views

How to create a T-shirt or book displacement map in practice?

So I learned that the feature I am interested in is called a "displacement map". This makes it so you can take a blank t-shirt (with all it's curves and subtle textures), and apply an image to it so ...
13 votes
3 answers
8k views

Low level Linux graphics

For educational purposes, I'd like to write an application on a Linux environment that can process keyboard events and draw graphics without huge dependencies like X or SDL. I presume that this must ...
6 votes
2 answers
269 views

How does the Arabic typographic layout system work at a high level?

I have some Arabic content that is justified according to western conventions. I justified it because it is justified in ancient sources: However, the way Arabic text justification works is by ...
0 votes
3 answers
4k views

How to import an image using openGL [closed]

I am new to openGL C++ and what I wanted to know is if there was a pre-existing function in the OpenGL library that would allow me to import a 3d or 2d model? For example, if I make a 3d image ...
8 votes
2 answers
18k views

Why use SDL and OpenGL instead of just OpenGL?

I've been seeing people combine SDL2 and OpenGL (glfw.h or glut.h) for a while now, I've done some research and found out SDL2 runs on OpenGL. So why does people combine these two? Some people ...
2 votes
1 answer
248 views

Good way to do 3D vector math in language without operator overloading

I would like to make a simple web application (a static website where all computation happens on the client) that generates a mesh and displays it. I have a working prototype in Unity and now I'm ...
7 votes
2 answers
287 views

The programming paradigm behind beginFill/endFill

The only place I have really noticed this sort of programming style is with the graphics engines. Essentially like this: graphics.clear() graphics.setStrokeStyle(myStrokeWidth) graphics.beginStroke(...
2 votes
3 answers
1k views

Convention for labelling coordinate axes in 3d graphics

When I recently started doing some 3d graphics, I carefully (tried to be careful, anyway) decided to use the conventional mathematical standard for labelling axes, which was much more convenient for "...
5 votes
2 answers
2k views

OpenGL and global state

It is generally understood in software engineering that global state is bad. However, OpenGL has been designed very much embracing the concept of global state. many of the things you modify will ...
2 votes
2 answers
168 views

Primitive type conversion in computer graphics

I have been repeatedly told that explicit type conversions are an indicator of bad code and they should be avoided. Now in all honesty I have been annoyed a bit by these claims due to the nature of ...
1 vote
1 answer
879 views

How to compute barycentric coordinates in a systematic and efficient way?

As part of a ray tracer implementation, I need to compute the barycentric coordinates in a triangle in 3D in order to decide if a ray hits the triangle or not. In theory this could be done by simply ...
14 votes
1 answer
26k views

GLSL: defining PI as '3.14159265...' or just as 'radians(180)'

I see a lot of shader code on the internet where PI is simply defined as an approximate decimal near the top of the code. In general I try to let computers take care of doing math for me instead of ...
1 vote
2 answers
27k views

Bresenham Vs Midpoint Circle drawing algorithm

Can somebody explain the difference between Bresenham and Midpoint Circle drawing algorithms? All I am able to understand is that in both algorithms we compute coordinates of an octant instead of ...
2 votes
1 answer
168 views

How did graphics programming evolve over time? [closed]

There isn't a single blog/site out there that shows how graphics technologies evolved over time, how and why they became what they're now. If anyone can shed some light on it, it would be great. See, ...
1 vote
2 answers
2k views

How is a quadtree stored in a file?

I'm trying to understand how a 2d or 3d map would be saved, and I'm trying to figure out quad trees. So like is each node represented by characters in a file and inside of that is the next one? What ...
8 votes
6 answers
4k views

Drawing concentric circles without gaps

I want to fill a circle with alternate colors like a lollipop by drawing circumferences of increasing radius on a Cell matrix. I am currently using the Midpoint circle algorithm to get the points. The ...
7 votes
0 answers
194 views

Incorporating existing 2D OpenCL/OpenGL application in 3D scene

There is an existing real-time, scientific visualization application that uses OpenCL and OpenGL to render complex 2D graphs. My goal is to incorporate this application into a 3D rendered scene. At ...
1 vote
0 answers
375 views

Canvas-like drawing interface for SVG?

There's lots of stuff out there comparing the HTML elements SVG and Canvas, but I'm still a little confused. I'm looking for a way to draw an arbitrary shape (like, I have a description of a shape, ...
6 votes
2 answers
7k views

What is GLFW in relation to OpenGL

Now this question might sound (/ is) stupid, but I'm just getting into OpenGL. So I installed GLFW source and I'm looking at some easy examples. What I'm noticing is, that the code still contains "...
2 votes
2 answers
100 views

Should I provide as less optional size app icons as possible?

When submitting an app (especially iOS and android), there are some different size of app icons need to add into the app. Among of them, some sizes are optional, is it a good practice that I just ...
3 votes
1 answer
204 views

How to efficiently render objects in a database?

My application is similar to a very simple CAD program. The user can create and modify a database of several thousand, simple 3D objects (e.g. cubes and spheres). Each object has a position, ...
4 votes
1 answer
4k views

Is OpenGL just badly designed?

I have been using OpenGL and OpenGL ES for a long time, and I know them pretty well. They're also really, really annoying to use, and I haven't really seen this discussed anywhere. Here are some ...
7 votes
1 answer
481 views

Marking grid points within a small circle on a sphere

I have a small circle (on a sphere) with given center and radius and I want to mark grid points which are within the small circle. The grid itself is discretised in evenly spaced longitude and ...
7 votes
1 answer
4k views

What is zfreeze and what made it so hard to emulate?

I've been looking at the Dolphin 5.0 release trailer. They made a big deal about "zfreeze" fixes, and proceeded to show a few comparisons between the old and new versions. They keep mentioning how it ...
0 votes
0 answers
37 views

Whose responsibility is an element's margin?

I'm working on a graphics library that works a bit like the Android-type libraries and I ran into a question regarding the topic of margins and whose responsibility they should be. It seems very ...
6 votes
2 answers
1k views

Data structure for determining intersection between line and polygon in 3D

I have a collection of non-self-overlapping simple polygons P. In actuality, they are 2D triangles in 3D-space. I'm looking for a data structure which, given a line L, has a relatively fast lookup ...
0 votes
2 answers
579 views

What is it exactly that makes programs platform dependent when they're using cross-platform APIs?

I understand that programming languages can either be run in a VM (Java, etc) on every OS that supports the VM natively or can be compiled to machine code (C, etc) for each platform. What I don't ...
1 vote
0 answers
579 views

Which 3D algorithms does Windows 10's "3D Builder" application use?

Windows 10 ships with "3D Builder", a Universal App that contains utility functions to prepare STL, OBJ, 3DS, and other files that represent geometries for 3D printing. The utility looks like this: ...
6 votes
2 answers
2k views

Image color/grayscale classification

I am trying to classify a set of images into grayscale or color groups. I have been using ImageMagic to do that, comparing the color image to a grayscale version of itself and then using the Peak ...
8 votes
3 answers
995 views

How do you write unit tests when you need the implementation to come up with examples?

I'm implementing the view transformation part of a graphics pipeline (basically a matrix which translates coordinates from world coordinates to camera coordinates given a camera position and direction)...
2 votes
2 answers
298 views

Generate pips on a die based on value

Is there an algorithm to generate the pips on a die or domino? I know that there is usually an odd number of columns and even number of rows (unless the max number of pips is not a perfect root). At ...
18 votes
2 answers
1k views

Getting a logo and graphics for an open source project [closed]

I have been working on an open source project for about 2 years. I would like to create a web site, but I am on essentially a zero budget. I also need a logo. My question: How should an open source ...
0 votes
1 answer
1k views

How to move a car around an environment with hills in C++? [closed]

I don't have any code for this since I don't know how I am meant to do this. I have a car and I am able to move it around on a flat plane and I have that working correctly. However, I want it to also ...
41 votes
6 answers
2k views

What's the right way to work with a graphic designer? [closed]

Recently, we worked with a graphic designer (arranged by the client) to provide the skin for a Django+Bootstrap application we had built. The designer provided a series of static images of the new ...
9 votes
7 answers
12k views

Rendering trillions of "atoms" instead of polygons?

I just saw a video about what the publishers call the "next major step after the invention of 3D". According to the person speaking in it, they use a huge amount of atoms grouped into clouds instead ...
1 vote
1 answer
207 views

C# intentionally flickering

i'm currently working on a project which must provide intentionally flickering of some part of UI (white rectangle which must change color to black). That changing of color must be done at some ...
2 votes
1 answer
87 views

Development approach for GUI application sharing on X

I'm curious about developing a simple system for GUI application sharing between users on a single computer, which uses Xorg (or perhaps any modern form of X11 display). I'd like user Alice to be able ...