I'm drawing a flat disk using gluDisk() in my scene. gluDisk() draws the disk facing the positive Z axis but I want it to be facing some arbitrary normal I have.
Clearly I need to use glRotate() to get the disk facing properly but what should be the rotation? I remember this can be calculated using Quaternions but I can't seem to remembe...
So I have extended the PlotChart that comes with Flex to have the ability to draw trend-lines. To do this, I have to get pixel positions. How can I convert (100px,100px) in pixels to a point on the graph, such as (0.7,1.0)?
...
I am attempting to rotate some text within a label. I have a cusom label which allows me to have control over the text rendering process.
protected override void OnPaint ( PaintEventArgs pe )
{
Graphics g = pe.Graphics;
g.RotateTransform( angle );
g.drawString( text );
g.ResetTransform();
}
The problem I am having i...
Although it's pegged as a 3D graphics framework for the browser, could Google O3D be used as an RIA framework similar to GWT, Flex or Rails?
...
I'm writing a comparatively straightforward raytracer/path tracer in D (http://dsource.org/projects/stacy), but even with full optimization it still needs several thousand processor cycles per ray. Is there anything else I can do to speed it up? More generally, do you know of good optimizations / faster approaches for ray tracing?
Edit:...
For a Java application, can I set the RenderingHints on a global basis? Currently, I've defined these in the paintComponent method as shown below. I would prefer, however, to set them once when the application starts and have them persist throughout the session.
@Override
protected void paintComponent(Graphics g)
{
super.paintComponent(...
Some of us programmers have to deal with graphic files every once and awhile...
Making quick fixes to existing graphics
Throwing together a quick sprite as a prototype
Create an icon because the designer is too busy
I don't think anybody should ever be editing web graphics (jpg / gif / png) directly. They should edit the master file...
Rasterisation (triangles) and ray tracing are the only methods I've ever come across to render a 3D scene. Are there any others? Also, I'd love to know of any other really "out there" ways of doing 3D, such as not using polygons.
...
At some long-ago Flash conferences I recall seeing a demo of a Flash app that had a color picker. Based on the user's color choice the app would show the user a set of images within the approximate range of that color: a bunch of mostly red images, a bunch of mostly blue images, etc.
I'm looking for two things:
1) A link to a demo of ...
I want to play around with some graphics stuff. Simple animations and things. I want to fool around with raytracing too. I need help finding a library that will help me do these things. I have a few requirements:
Must be able to do raytracing
Must be for a high level language (python, .NET, etc.). Please no C/C++
Must have good documen...
I have an array of raw rgb data.
I would like to know how can I draw this pixels on the screen in Windows OS?
Now I use API function DrawDIBits, but I must turn up my image data.
...
Hey there,
I created a graphic in Flash CS4 that contains text. I embedded the appropriate characters then saved it as a MovieClip into my library. I then exported it to an SWC file.
In my AS3 code (using Flex SDK/notepad), I then import the movieclip and assign it some mouse events so I can use it as a button.
Unfortunately, all the ...
I'm making a turn-based top-down game in C#. The graphics requirements are pretty simple: it's entirely 2D, requires drawing some images taken from graphics files (perhaps rotating them first), line drawing to make a hex grid and the ability to place text at any position on the screen.
I'm wondering what the best API is for doing these ...
I'm currently thinking of a new pet project, an "editor" for MIDI-enabled synths. I've got the MIDI side covered, I suppose, but what I'm looking for right now is something that can pass for nice "dials" and "knobs" like you see in Ableton Live, Reason, Reaktor, and so forth.
Putting my form full of trackbars, is sort of wasteful, y'kno...
Hi, i have a 1024 x 1024 image I use for a texture in my game for the background.
Im wondering if their is a proper way to handle drawing a large background texture.
How I am doing it currently:
texCoord { 0,0,1,0,0,1,1,1 }
vertice { 0,0,0,height,width,0,width,height }
texCoordPointer(texCoord)
vertexPointer(vertice)
bind the texture...
Any know how to recreate a cross hashing texture in Java? The C# code belows shows how to accomplish this for the .NET framework. The Java snippet is close, but I've been unable to correctly rotate the lines by 45 degrees.
C#
HatchBrush crossHatch =
new HatchBrush(HatchStyle.Cross, somecolor, somecolor);
Java
BufferedImage b...
I'm looking for a 3D graphics library for a Java web app. Could use some recommendations - only open source, though.
Edit: I don't really care how the graphics are output - Javascript/applets/canvas/flash but I want to write the graphics logic in Java.
...
As part of a print procedure of my application I'm trying to print a list of images scaled down to a specified width and placed one below the other. The problem is I can not figure out how to transform the height in pixels of the images to the height in the units used by the graphics object during printing. How do I calculate the imageHe...
I have a WebBrowser control with a transparent panel over the top of it, what I am trying to do is draw a rectangle on the transparent panel around the element in the page that the mouse is hovering over.
So far I have everything working except the panel is not being cleared before drawing the next rectangle so I end up with rectangles ...
From time to time you can see smooth animated transition displayed for resizing, expanding and appearing graphical controls. Not just some tail-wagging file search dog, but animation of widget configuration changing it's state structurally and/or geometrically.
I haven't used Windows Vista much, but sure know that on XP you can set this...