15 votes
Accepted

Performance of vector graphics versus bitmap or raster graphics

As TheBuzzSaw said, it does depend on lots of things, including implementations of the rasterized graphics vs the vector graphics. Here are some high performance vector graphics methods that are ...
user avatar
  • 7,361
12 votes
Accepted

What is Illustrator's vector rasterization process?

As as far as I can tell Illustrator has 2 or 3 different rasterizer. The onscreen preview is also prone to the same gap artifacting as your show though its tuned to minimize the effect. Your post ...
user avatar
  • 8,169
8 votes

Performance of vector graphics versus bitmap or raster graphics

There might be. Less technical answer: If you're building a website or another application where you have nothing to do with the graphics programming then the answer is probably yes. The underlying ...
user avatar
  • 80
7 votes
Accepted

How to calculate matching roundness of two offset rectangles?

What you (probably) want to achieve is something like this: When having a closer look at one of the corners and add a few lines, we see this: The black lines indicate that the center points of the ...
user avatar
  • 1,220
6 votes

What are forms of affine transformations?

Note: I have answered before the edit from trichoplax and I thought you were searching for other transformations other than the one you mentioned. The informations below are still useful so I will ...
user avatar
  • 2,468
6 votes

Performance of vector graphics versus bitmap or raster graphics

There are a few ways of rendering vector graphics. As TheBuzzSaw mentions, NVIDIA has an extension that can render general paths quite quickly (but of course it only works on NVIDIA GPUs). And Alan ...
user avatar
5 votes

What is Illustrator's vector rasterization process?

And just to add: it is called "conflation" artifact and this is what AntiGrain Geometry used the compound shapes rasterizer for, see: flash_rasterizer.png http://agg.sourceforge.net/antigrain.com/...
user avatar
  • 1,369
4 votes
Accepted

Bezier Curve Tool Controlled by Mouse

Instead of using cubic Bezier spline, you should use cubic Hermite spline. For cubic Hermite curve you specify the segment end points and tangents, which is what you then control in the tool. Hermite ...
user avatar
  • 3,566
4 votes
Accepted

What are the i,j,k components of a 3d mesh on plot.ly (online)?

Most mesh drawing tools use triangles to draw meshes, for technical reasons. You could simply specify the coordinates of the three vertices of each triangle, but that is a bit wasteful in terms of ...
user avatar
  • 206
3 votes
Accepted

Thick Line segment

The main part of it is simply Pythagoras's Theorem. The square root gives the length of the central line segment (which is the hypotenuse of a triangle formed by the change in x and change in y). The ...
user avatar
  • 6,490
3 votes
Accepted

adobe illustrator art brush, how does it work?

These rely on a transformation from global coordinates to path local coordinates, where the local axes are along and out (or more often u and v). In essence this all works on a principle similar to ...
user avatar
  • 8,169
3 votes

inside and outside region identification from 2D contour

In general, I recommend the book Real-Time Collision Detection. For your particular case, my first choice would be to use the 3D test for point-inside-mesh. I assume that the contour is a sequence of ...
user avatar
3 votes
Accepted

SVG opengl implementation - strokes overlap on transparency

You can use the depth buffer to ensure that the second time you get on a point the pixels aren't written. You start with the maximum depth value and each new path (that you want to add to the ...
user avatar
3 votes
Accepted

Finding the angle of any side of a polygon

Deducing the angle and rotating by that angle works quite well in 2D (describe in TLousky's post). This strategy, does not extend very well into three-dimensional realm. I will provide an alternative ...
user avatar
  • 8,169
2 votes

Finding the angle of any side of a polygon

This algorithm is based on this answer for finding the angle between vectors, and this answer for rotating polygon points. It's written in Python, and assumes you want to align an edge with the X axis ...
user avatar
  • 199
2 votes
Accepted

Choosing & Using a Projection Matrix

The values will only form a cube after performing the perspective divide, which I don't see happening in your code. That is, you take a vector $[x, y, z, 1]$ and transform it by the projection matrix,...
user avatar
  • 23.7k
2 votes
Accepted

First steps towards CAD standard curve fitting

Since you have a limited set of tools you are not actually doing a classical fitting. What you have is a discrete problem. And since you are looking for a somewhat easily drawn fit, no more than twice ...
user avatar
  • 8,169
2 votes
Accepted

Determining the 'outer' subpath in a compound SVG path

If you can assume the subpaths are non-intersecting (and non-self-intersecting), and that the fill rule is always the nonzero rule, the easiest way is probably to pick the first point on the first ...
user avatar
  • 6,490
2 votes

Vectorizing to polylines instead of paths

If you look at chapter 8 of the SVG Specification, it describes how to parse a path element. The short version is that you'll want to find the ...
user avatar
  • 3,331
2 votes

How to get the length of paths in an given font/character

The way I would approach this is to get the outline curves of the font and then break each one down into some fixed number of steps (like, say, 100), and make a series of very small straight lines. ...
user avatar
  • 3,331
2 votes
Accepted

Why inverse of an allignment matrix is the same as its transpose?

To align vectors, you are applying a rotation. If you consider a simple rotation matrix, e.g. rotation of angle $\theta$ around Z axis, then you will trivially see that its inverse matrix, a rotation ...
user avatar
  • 3,986
2 votes

Bresenham's Algorithm not drawing horizontal lines

e = (float)(delta_x / delta_y) - 1.0; e += (float)delta_x / delta_y; Either of these lines will cause a divide-by-zero error when ...
user avatar
  • 6,490
1 vote

Confused about graphic art and what software is used to create the environment of it?

This would be considered isometric. Isometric graphics were originally used to give a 3D look, when computers could not handle actual 3D graphics. The creation of this image, however, is different ...
user avatar
  • 1,575
1 vote
Accepted

How to make a translation relative to the line ax + by + c = 0, affine transformations

If I understand correctly, you want to draw 2 objects mirrored with respect to an arbitrary line. Then when you move 1 object you want the other (reflection) to move with respect to that reflected ...
user avatar
1 vote

How to make a translation relative to the line ax + by + c = 0, affine transformations

To mirror an object in relation to an arbitrary line, you first have to find the coordinates of that object in the frame of reference of that line. For convenience, we will define a frame of reference ...
user avatar
1 vote

how to build the feature curves of this algorithm?

The way I read it, you have a 2D cubic Bézier that defines the projections of the ridge line (or river bed, or whatever) onto the X/Y plane. In Figure 4, these are the dark purple lines. So that ...
user avatar
  • 3,331
1 vote
Accepted

Determining Vanishing Points of edges of Triangle using given Point

Vanishing points are "points at infinity" in projective geometry, which are represented by $w = 0$ in homogeneous coordinates. You can construct the vanishing point of a ray or line by taking its $xyz$...
user avatar
  • 23.7k
1 vote
Accepted

Hooke's Law vector form

If we sidestep your typo (the last term has one absolute too much), both formulations are correct. They just express different things. The $k$ in Hooke's law is for a particular spring. $k_s$ is the ...
user avatar
  • 8,169
1 vote

Fill an irregular region with 2D shapes

There is no general algorithm for packing problems. Only some of the special cases have known, and optimal, solutions. If you are packing one shape then finding a reasonable solution is possible. Like ...
user avatar
  • 8,169
1 vote
Accepted

How can I verify if a selection area is over a shape in SVG?

In pseudocode For each rectangle: If the rectangle overlaps the selection area, highlight the rectangle This is all that is required for a correctly working ...
user avatar
  • 5,902

Only top scored, non community-wiki answers of a minimum length are eligible