Relative Content

Tag Archive for graphics

Encapsulate bitmap (*.bmp) as C++ class

How would you implement / design a class which has to represent a bitmap?
I’m stuck at handling the different possible color modes and I keep thinking that this should be somehow implementable using templates / design patterns in an elegant AND efficient way:

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 using CoreGraphics, but it didn’t perform adequately for my purposes. I then discovered that there was a Khronos standard for hardware-accelerated vector graphics called OpenVG, and thankfully a kind soul had written an OpenGL ES semi-implementation called MonkVG.

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 solving a few linear equations. But due to the fact that the vertices of a triangle could have the same x, y or z coordinates, some of the coefficients in the equations would be 0, and this caused numerical error in my initial implementations. So, is there a systematic approach to find the barycentric coordinates in a more efficient way? Or I have no choice but to brutally check each possibility one by one?

Design pattern for complex view creation in sheet music

I’ve got a bunch of Note-Models with properties like pitchand duration. In music notation, these notes must now be placed into a certain bar on a certain line on a certain page, and so on. Many more factors influence the positioning of these notes like the notes that are placed in the same bar before them.

Design pattern for complex view creation in sheet music

I’ve got a bunch of Note-Models with properties like pitchand duration. In music notation, these notes must now be placed into a certain bar on a certain line on a certain page, and so on. Many more factors influence the positioning of these notes like the notes that are placed in the same bar before them.