FAQ Database Discussion Community


What does the terms Sampling,Scanline Mean in Raster Graphics(Bresenham's Algorithm)

algorithm,graphics,raster,vector-graphics
Im a novice when it comes to computer graphics.Im trying to learn Bresenham's Scanline algorithm. It says Pixels positions along a Line are determined by sampling at unit X intervals What exactly does this sampling mean,in layman's terms. Then it says Plot the pixel whose scan line value is closest...

Custom C++ Quaternion Rotation Not Working Correctly

c++,rotation,vector-graphics,quaternions
In my code, I have a quaternion that is used for rotation for a camera for the player. Rotation itself seems to work fine, but my directional vectors for moving and to rotate on do not rotate correctly. Quaternion Multiplication: Quaternion Quaternion::operator*(Vector3 other) const { float x_ = w *...

ps2pdf: preserve page size

pdf,ghostscript,vector-graphics,ps
I have myfile.ps with a vector image included. But when I run ps2pdf myfile.ps it seems that the output page size is A4: the vector image is too large and become cut away, so about one inch is lost. The following pseudo-header is printed in the output PDF file, in...

interior angles of irregular polygon with angles > 180

c++,math,vector-graphics
I'm trying to calculate the values shown in the picture in red i.e. the interior angles. I've got an array of the points where lines intersect and have tried using the dot-product but it only returns the smallest angles. I need the full range of internal angles (0-359) but can't...

Flash to Html5 Canvas: slow vector graphics

flash,html5-canvas,vector-graphics,fps,createjs
I'm a Flash developer and have many games developed in the past. Now I'm going to convert them (if possible) to HTML5/CreateJS. I've used CreateJS toolkit that is built into Flash CC to convert my game. Converted game performs good on my Desktop, but unacceptable slow on any mobile device...

QGraphicsView vector edit: update path when moving node – properly?

python,qt,pyqt,vector-graphics,qgraphicsview
I am creating a vector editing window. I add elements to a QGraphicsScene and display it. I am yet writing code so that when moving a node, it moves the underlying path as well. But how do I move the two joints of the path that lead to the point...

Vector drawables that are automatically converted to pngs

android,vector-graphics,android-build,android-icons
At Google IO, the Tools team briefly showed the possibility to define vector drawables with a specific suffix (e.g. ic_heart_48px.xml) that will then be converted to pngs of all necessary densities. Unfortunately I don't find any documentation about this feature besides the IO recordings. Is this a feature of the...