graphics

Learning Graphical Layout Algorithms

During my day-to-day work, I tend to come across data that I want to visualize in a custom manner. For example, automatically creating a call graph similar to a UML sequence diagram, display digraphs, or visualizing data from a database (scatter plots, 3D contours, etc). For graphs, I tend to use GraphViz. For UML-like plots and 3D pl...

Inverse Bilinear Interpolation?

I have four 2d points, p0 = (x0,y0), p1 = (x1,y1), etc. that form a quadrilateral. In my case, the quad is not rectangular, but it should at least be convex. p2 --- p3 | | t | p | | | p0 --- p1 s I'm using bilinear interpolation. S and T are within [0..1] and the interpolated point is given by: bilerp(s,t)...

Threaded image-scaling sub still bogs down UI

I created an image-viewing control for my boss that incorporates panning, zooming via the mouse wheel, and drawing a box to zoom to. The control needs to support very large image files (i.e. several thousand pixels on each side). It all works, but whenever the code is scaling the image the control UI becomes unresponsive. My boss had ...

InterpolationMode.High

I am trying to figure out the difference between High and HighQualityBicubic InterpolationMode in .Net (System.Drawing.Drawing2D.InterpolationMode.High). Does High mean that it will pick the best algorithm based on the image and what you are doing with it? Is it just an alias for HighQualityBicubic? Something else? According to the MS...

Php Db schema diagram creator

Hello, Wondering if there is any php script out there which takes an sql db and diagramatically shows the entire thing (along with relationships)? Similar to what most mysql tools offer for desktop. Thank you very much. ...

Export JPanel to vector graphics

I would like to export the image in my JPanel to a vector graphics file so it can be edited and printed at a higher-than-screen resolution. Essentially I want its paint() function to be called with a destination Graphics that saves the drawing commands into a vector graphic file. What is a good, simple way to do this? What libraries a...

How to show a shape or graphic in java with no window frame?

Hi. I'm having a hard time trying to make a Java program with just a shape (e.g rectangle) as main window. I don't want the shape to be inside the 'OS-window' (with buttons to close and minimize etc..) ...

Is there any uncharted territory in Computer Graphics?

It seems to me as if anything is now possible with computer graphics. Is seems as if we can depict cloth, water, skin, anything, completely convincingly. Are there areas that are are still a challenge, or is the focus now on finding faster algorithms and cutting rendering times? ...

How to stop a UI from locking up when a second form is shown?

I have a Chat program written in Delphi7. As a special "effect" we display a few bullet holes when a particular gunshot sound file is played. We did this by drawing a new form in the shape of the bmp image file of the bullet hole, with a timed delay of a few secs for it to be visible and then fade away. All of this works, however, whil...

How to draw graphics/text on top of another application

I want to enhance an application, but there is no 3:e party API available. So basically the idea is to draw graphics/text on top of the applications windows. There are problems with z order, clipping, and directing mouse clicks either to my application or the other application. What is an elegant way of doing this? Example image here....

C/D line drawing package

I find my self in need of a line drawing package. I need to pop a window and draw lines and points. Text would be nice but I can live without it. Most importantly, I need something that is dirt simple to get running. I don't have time to dink around with libs (if I did have time I'd be willing but I'm already way behind as it is). I'd p...

Drawing an image in this method?

private void pictureBox1_MouseDown(object sender, MouseEventArgs e) { NumberOfBets++; if ((e.X >= 40 && e.X <= 125) && (e.Y >= 0 && e.Y <= 26)) { bettingStatus[0]++; for (int x; x < 10; x++) { Graphics graphic = (???) } } I'm trying...

What is the best way to scale images in Java?

I have a web application written in Java (Spring, Hibernate/JPA, Struts2) where users can upload images and store them in the file system. I would like to scale those images so that they are of a consistent size for display on the site. What libraries or built in functions will offer the best results? I will consider the following criter...

Overlapping and touching CoreGraphics rectangles have a .5px border

My core graphics fills are acting strange when the get close together, touching or overlapping. This issue is on the iPhone Simulator and iPhone OS 2.2. Here we have two labels and a custom view with two CGContextFillRect(): overlap problem When the blue and red are brought together they develop this irritating .5px merging line. I c...

OpenGL Collision Detection

I am currently working on designing my first FPS game using JOGL. (Java bindings for OpenGL). So far I have been able to generate the 'world' (a series of cubes), and a player model. I have the collision detection between the player and the cubes working great. Now I am trying to add in the guns. I have the gun models drawn correctly a...

How do I set the color of a single pixel in a Direct3D texture?

I'm attempting to draw a 2D image to the screen in Direct3D, which I'm assuming must be done by mapping a texture to a rectangular billboard polygon projected to fill the screen. (I'm not interested or cannot use Direct2D.) All the texture information I've found in the SDK describes loading a bitmap from a file and assigning a texture ...

.net onpaint vertical sync

I'm trying to implement some animation using winforms and gdi+, but I get a lot of tearing moving sprites inside a control. Is there a way in managed .net to have the overriden Control.OnPaint method wait for the vertical retrace of the monitor? ...

Performance-wise: A lot of small PNGs or one large PNG?

Developing a simple game for the iPhone, what gives a better performance? Using a lot of small (10x10 to 30x30 pixels) PNGs for my UIViews' backgrounds. Using one large PNG and clipping to the bounds of my UIViews. My thought is that the first technique requires less memory per individual UIView, but complicates how the iPhone handle...

Removing a JPanel from a JFrame

I am currently working on an intro screen for a game designed using JOGL. I want the intro to be a JPanel with a few buttons to alter options before starting the game. So, I have JFrame which I add a GLCanvas to. The GLCanvas also contains a GLEventListener. Finally, I add the JPanel. I have overridden the JPanel paintComponent method ...

Dynamic updates of objects in a Silverlight application?

Maybe I am just over thinking this and need to write some more prototype code, but I wanted to get some of your thoughts: Basically the application is going to be displaying up to several hundred custom visual objects in an X/Y "grid". The position and attributes of some of these objects may change between updates; the application will ...