graphics

Rotating coordinates around an axis

I'm representing a shape as a set of coordinates in 3D, I'm trying to rotate the whole object around an axis (In this case the Z axis, but I'd like to rotate around all three once I get it working). I've written some code to do this using a rotation matrix: //Coord is a 3D vector of floats //pos is a coordinate //angles is a 3d vector...

How to transition between two images using a grayscale transition map

Imagine you have two images A and B, and a third grayscale image T. A and B contain just about anything, but let's assume they're two scenes from a game. Now, assume that T contains a diamond gradient. Being grayscale, it goes from black on the outside to white on the inside. Over time, let's assume 256 not further elaborated on "ticks...

Podcast Focusing on XNA or Game/Graphics Programming in General

I realize there are a number of podcast related questions, but I'm specifically looking for XNA oriented podcasts. I've Googled around a little bit, but I have been unable to find any current podcasts. I'm just wondering if anyone else knows of any interesting ones. I'd guess if Google can't find them, they don't exist but I thought I...

Generating graphics at runtime with Cocos2D - How to display?

I'm trying to create dynamic graphics for my game, which I'm building with Cocos2D. The graphics generation will occur at predictable, finite points, such as level loading. I'm having a hard time figuring out how to actually draw this at runtime. From what I can tell, the easiest way would be to draw into a PNG file at runtime and then l...

Ruby library/gem for game graphics?

I am creating a simple Blackjack game in Ruby, and I have finished all the game logic stuff (finally!) and currently have it running through the command line. It is all working, so now I need a library or gem that will make the whole graphics side of things easier. Any ideas? Thanks. ...

Graphics library in C

I was wondering if there were any good free graphics libraries for C that are easy to use? It's for plotting 2d and 3d graphs and then saving to a file. It's on a Linux system and there's no gnuplot on the system right now. Or would it just be simpler to switch to another language, and if so which one would be easy to learn? ...

Sutable plotting lib for comet tecnique?

Could you recommend me the best plotting lib for this task? It should run on a browser (javascript or flash) and It have to let me add points from javascript code in a way like: myPlot.add([x,y]) so I can push data from the server and have real time graphics. Today I'm using flot (jQuery based). Where the task is not as straight as m...

BlackBerry - ButtonField with centered Bitmap

Hi, I have a class that extends from ButtonField : class BitmapButtonField extends ButtonField { private Bitmap _bitmap; private int _buttonWidth; private int _buttonHeight; BitmapButtonField(Bitmap bitmap, int buttonWidth, int buttonHeight, long style) { super(style); _buttonWidth = buttonWidth...

Mask white color out of PNG image on iPhone

I know that there are already 2 relevant posts on that, but it's not clear... So the case is this...: I have a UIImage which consists of a png file requested from a url on the net. Is it possible to mask out the white color so it becomes transparent? Everything I have tried so far with CGImageCreateWithMaskingColors, returns a white i...

how to make a spiral galaxy image based on data points?

I'm trying to plot points from a very large array into an image using Ruby. Such that the array items are represented by a point or dot of the appropriate colour, and the dots together form the shape. Since the dots are from the array they are not random in colour or location to each other, so I'm confused how to begin. I want to even...

Blend mode on a transparent and semi transparent background.

In general, the "normal" blend mode equation looks like this: D = Sa * S + D * (1.0 - Sa) where D is destination color, Sa is source alpha and S is source color. Now, this works fine with fully opaque destination but I'd like to know how you would handle that with semi and fully transparent destination. When blending the source over...

Determine VRAM size on windows

I need to determine roughly how much VRAM a system's graphics card has. I know all the reasons why I shouldn't but I do. It doesn't need to be perfect (some cards lie etc.) but I need a ballpark. On mac it's fairly easy through core graphics and IOKit to just politely ask how much VRAM is attached to a display, but I haven't a clue on wi...

Smooth movement of icon displayed on a Panel

Hi there! I'm coding an app where I display a System.Drawing.Icon object on a System.Windows.Forms.Panel using a code that goes something like so: Graphics g = _panel.CreateGraphics(); g.DrawIcon(this.NodeIcon, _rectangle); I have code to move the icon around using drag-n-drop. My problem is that when the user move the icon around, i...

Terrain minimap in OpenGL?

Hello, So I have what is essentially a game... There is terrain in this game. I'd like to be able to create a top-down view minimap so that the "player" can see where they are going. I'm doing some shading etc on the terrain so I'd like that to show up in the minimap as well. It seems like I just need to create a second camera and s...

Looking for a Java Graphics alternative

Any time I embark on a project that requires some rendering of primitive shapes and lines, I usually turn to Java because it's just so easy. For my latest project, I decided I might like to learn another API similar to but not Java Graphics2D. I would preferably like something that will work with C++ on Linux. Does anybody have any go...

Radial plotting algorithm

Hi there, I have to write an algorithm in AS3.0 that plots the location of points radially. I'd like to input a radius and an angle at which the point should be placed. Obviously I remember from geometry coursework that 2(pi)r will give me an x on the point at the radius distance. The problem is I need to produce the x, y and the calcul...

Prerequisite for learning directx

Hi All, I am from .net C# background and I want to learn DirectX. I have knowledge of C++ but I am fairly new to graphic world. I am little confused about how to start learning directx, should I start learning direct directly or buy a basic graphic book like hern and baker and then jump to directx. Which is the recommended book for l...

Java AWT/SWT/Swing: How to plan a GUI?

hello I've already realized some applications with a small graphical user interface. Nothing complex, but I've encountered several problems that components aren't displayed or just not behaving as expected. Now my question: How do you plan those user interfaces? What do you do when you need to make changes? How do you debug strange be...

Why and when should you use hoops 3d graphics?

My company needs 3D visualization for our commercial applications (CAD, mesh manipulation, computational geometry). We are tired of true vision 3D (tv3d), which we've been using for years (poor support, compatibility problems). Our manager wants to use hoops 3d from tech soft 3D for software development. While I have no experience of i...

How do I interpolate normals on Catmull-Clark Subdivision Surfaces

I'm using CCSS to generate smooth surfaces. I've been using the regular subdivision rules to interpolate the surface/vertex normal, but I think this may be wrong. Are there different stencils to interpolate normals? ...