graphics

4 Colors gradient logic needed

I need to create 4 color gradient logic. One of the posts gave me the pattern to calculate 4 color gradient. However I am having difficutlties to implement it. I am able to calculate color of point E ( middle one) however I do not know how to develop the gradient from it MY code COLORREF NewColor = RGB(255,0,0); COLORREF NewColor2 ...

Asset tracking in "real-time" - how best to display in browser?

I am developing an asset tracking system, standard LAMP, and now am wondering how best to present the data to the user in the browser. I expect to track and most a few thousand items, and to refresh them every second or so. I want to draw a floorplan or map of the area and represent the assets the assets symbolically on that (with diff...

Emulating old-school sprite flickering (theory and concept)

I'm trying to develop an oldschool NES-style video game, with sprite flickering and graphical slowdown. I've been thinking of what type of logic I should use to enable such effects. I have to consider the following restrictions if I want to go old-school NES style: No more than 64 sprites on the screen at a time No more than 8 sprite...

Level of Detail for 3D terrains/models in Mobile Devices (Android / XNA )

I am planning to develop for WP7 and Android. What is the better way to display (and traverse) 3D scene/models in term of LoD? The data is planned to be island-wide (Singapore). 1) Real-Time Dynamic Level of Detail Terrain Rendering 2) Discrete LoD 3) Others? And please advice some considerations/algorithms/resources/source codes. som...

Streaming the map image like MKMapView does

I'm developing a map application for both iPhone OS and OS X. This uses Core Graphics to render a map, but rendering each frame is too slow to scroll in 60fps, and consumes the battery. So I want to cache the map with rendering the map on bitmap tiles(256x256), but what kind of bitmap should I use? (like CGImage) ...

LaTeX: How to make a fullpage vertical rule on every page?

I'm using LaTeX and I would like to have vertical rule along left side of page, topmargin to bottommargin, 0.5in from the left edge of the page. I want this on every page, so I assume that means it must somehow be tied to the header or the footer? I've made no progress at all, so I need help with (1) making the full-length rule itself ...

QPainter paints garbage

Fragment of program code: def add_link(Item0Num, Item1Num): global Mw, View # Mw - MainWindow if Item0Num != Item1Num and not link_exists(Item0Num, Item1Num): append( links_to(Item1Num), Item0Num ) append( links_from(Item0Num), Item1Num ) LinkGi = TLinkGi() Mw.Scene.addItem(LinkGi) LinkGi....

Options to create editable graph or scheme with Perl ?

Hi, I'm searching for a way to create complex/simple graph using Perl. The known modules/applications I've checked are: GraphViz, Graph-Easy, aiSee etc. Each way I walked, new problems appeared. If my need is to create graph dependencies that can be edited live have a directed compass mode work fine and are readable with massive data...

Shapes-tool creating a vector mask every time, cannot seem to fix in CS3?

Every time I create a shape using the shape tool, it places a vector mask on top of this. I don't know how I enabled this but it does not do it on my laptop version, only my desktop. I can seem to disable this problem I am having. Even reinstalling and restoring defaults I cannot seem to stop this. Very frustrating, anyone have a fix f...

extracting a quadrilateral image to a rectangle

BOUNTY UPDATE Following Denis's link, this is how to use the threeblindmiceandamonkey code: // the destination rect is our 'in' quad int dw = 300, dh = 250; double in[4][4] = {{0,0},{dw,0},{dw,dh},{0,dh}}; // the quad in the source image is our 'out' double out[4][5] = {{171,72},{331,93},{333,188},{177,210}}; double homo[3][6]; c...

Animate rotating SVG element on webpage

So I have an SVG file created in Inkscape embedded in a webpage, and I'd like it to rotate slowly. I've tried using Javascript and inserting animation commands directly into the SVG, but nothing works. I don't want to load in an entire JS library for this one task. This is what I have so far: <html> <body bgcolor="#333333"> ...

Visio Line Question

Visio Line Question How do you create a long curvy seamless line in Visio. WHenever I draw a line it seems to have only the ability to connect objects and that is all. What f I want to draw a loop that starts from one object and then swoops over the top of another object to make a 300 degree arc? I have tried this with lines drawn en...

Displaying bitmaps in relative positions

I'd like to put a couple images on a surfaceview. I understand that the screen sizes of android devices can vary, so I don't think I can just use an x y position or I might end up placing it off different screens. Say I want to put two boxes in the center of the screen, a blue one and a red one. The blue one is to the left of the red ...

Programming graphics and sound on PC - Total newbie questions, and lots of them!

Hello, This isn't exactly specifically a programming question (or is it?) but I was wondering: How are graphics and sound processed from code and output by the PC? My guess for graphics: There is some reserved memory space somewhere that holds exactly enough room for a frame of graphics output for your monitor. IE: 800 x 600, 24 bit...

elastic / snaking line algorithm

Hi everyone I am making a graphics application in which I can edit a polyline by dragging the control point of it. However, I'd like to make it a bit easier to use by making it elastic; When dragging a control point, instead of moving a single point, I'd like the points within a certain distance of that point to be moved as well, depend...

Python module for drawing functions graphics

Hi all, Which python module should I use for drawing simple functions graphics? E.g f: M -> M, f(x) = x ...

Drawing image at touch iPhone sdk

Hello, I would like to draw a image on the screen where ever the user touches. I can't figure out how to do it. Please help thank you! ...

Quality questionnaire php mysql graphipcs

Hi, i'm making a questionnaire about a service quality, its contains the options (poor, regular, good, very good). It's contains 6 questions (radio button) and a suggestion box (textbox). In the table of the database i created 6 rows for questions, 1 for suggestion and 1 for date (a friend of mine tole me to use this but i didn't get why...

draw a curve Sketchup using ruby

Below are some point 3d 15.733798,20.019757,23.006311 15.733798,19.847666,23.006311 15.723798,19.847666,23.006311 15.723798,20.019757,23.006311 15.733798,20.019757,23.006311 and this is a vector 0.0,0.0,-0.1 Is it possible to draw a curve from the information above in sketchup? Thank you ...

Where can I buy game sprites and tiles?

Yes, I'd prefer to buy them instead of using "free" or "free" with some kind of weird license. Tried Google, but no luck and my fav RF graphics sites don't have any... :( ...