Vectors in Mathematics anything like vector graphics?

Davidh373

Platinum Member
Jun 20, 2009
2,428
0
71
Does Vectors in Trigonometry have anything to do with Vector graphics? If so, how?
 

CycloWizard

Lifer
Sep 10, 2001
12,348
1
81
I don't know how vector graphics are set up, but based on the name, I always assumed they were based on vector math. Since vector graphics are scalable, they should simply specify direction and relative magnitude of each vector. The relative magnitudes would all then be multiplied by a constant factor for instant scaling.
 

Paperdoc

Platinum Member
Aug 17, 2006
2,438
344
126
The math vectors have EVERYTHING to do with Vector Graphics! In a Vector Graphics environment (for example, I use Corel Draw!), every item is specified as a particular type of mathematical entity, such as a straight line, a circle, an ellipse, a Bezier curve, etc. Each type of graphic element has a small number of parameters that completely define it in space. For example, a straight line in 3D space is defined by its start point (x1, y1, z1) and its end point (x2, y2, z2). Those six parameters, plus the note that the element is a straight line, are all that is needed. Each of the six parameters can be a floating-point number of any precision the software uses. Complex things like Bezier curves have more parameters to define them, but still a modest number.

Now, how do we see those things? On a computer screen the picture is ALWAYS a bitmap graphic. That is, the screen is divided into a finite number of pixel locations (say, 1680 across x 1050 down), each with three possible colors (usually red, green and blue), and each of the colors having a possible finite number of brightness levels (typically 256). When Vector Graphics software is told to display the picture it has with all its vector elements, the first thing it does is check how the screen is set up and compare that to the zoom level the user is using and the point of view. Then it uses the vector equations for each element, plugging in the particular parameters for each one, and reduces the information to exactly which pixels should be turned on (and to what brightness level) to represent the vectors within the viewing area. That info, pixel by pixel, is fed to the RAM of the video card so you can see it on your monitor. This is all done by the rendering engine part of the software. If you change the area you want to see, or the zoom factor, it all gets re-done to fit. If you zoom in enormously, the precision of the vector math calculations means the curves etc. will still look smooth because the fine detail can be calculated and displayed. You can re-scale to your heart's content, because that just means multiplying every graphic element's parameters by a constant or two to get new parameters.

In bitmap graphics drawings, all the elements of the picture are simply the exact specifications for which pixels are turned on, and to what brightness, for ONE fixed picture dimension. There is no knowledge of shapes of sizes, nor any relationships to what is being represented by the pixels. A digital photograph is a good example of one of these. If you zoom in on a part of it, all the display system can do is make bigger blocks of the same color to represent one pixel in the drawing by, say, a block of 100 x 100 pixels if you zoomed in by a factor of 100. You can't really re-scale anything very well.
 

Davidh373

Platinum Member
Jun 20, 2009
2,428
0
71
Excellent answers guys. We are going over vectors in my MA 108 (Trigonometry) class and I asked my instructor but he didn't know. He said he was interested in the answer though. Thank you! :)
 

exdeath

Lifer
Jan 29, 2004
13,679
10
81
Yes and no. Math is not restricted to 3-4 elements and real numbers. But 3D graphics are entirely built upon trig and linear algebra, but a very small and limited subset. If you go into real time curved surfaces you get to see alot more of the math (partial derivatives, volume integrals, etc). It's possible to learn 3D graphics and homogenous projection without having to derive those things or understanding the math behind it.
 
Last edited:

Throckmorton

Lifer
Aug 23, 2007
16,829
3
0
No. There's no math involved in vector graphics, aside from the algorithms used to figure out how to display vectors.

"Vector" refers to the fact that data is stored as points, lines, polygons, curves, etc.

It's like asking if raster graphics are anything like matrices. Well a raster is a matrix of pixels, but the two things have nothing to do with each other.
 
Last edited:

Hacp

Lifer
Jun 8, 2005
13,923
2
81
No. There's no math involved in vector graphics, aside from the algorithms used to figure out how to display vectors.

"Vector" refers to the fact that data is stored as points, lines, polygons, curves, etc.

It's like asking if raster graphics are anything like matrices. Well a raster is a matrix of pixels, but the two things have nothing to do with each other.

Ya, I'm sure there is no math involved. I mean, the object is just rotating on its own without having any operations operating on the vector. Yep yep yep.
 

Throckmorton

Lifer
Aug 23, 2007
16,829
3
0
Ya, I'm sure there is no math involved. I mean, the object is just rotating on its own without having any operations operating on the vector. Yep yep yep.

Why is a vector graphic rotating? And what vector operations are being done on it?


I'm making GIS vector data right now, watersheds and drainage lines, and I haven't done a single vector math operation all day.
 

Davidh373

Platinum Member
Jun 20, 2009
2,428
0
71
I'm making GIS vector data right now, watersheds and drainage lines, and I haven't done a single vector math operation all day.

You ever think the computer might be using vector math calculations to display it? That's what I was thinking...
 

Hacp

Lifer
Jun 8, 2005
13,923
2
81
Why is a vector graphic rotating? And what vector operations are being done on it?


I'm making GIS vector data right now, watersheds and drainage lines, and I haven't done a single vector math operation all day.

Why is the graphic rotating? Maybe because you want it to rotate in a game?

Linear algebra is used all the time when dealing with computer graphics. As an example, I know you can check for collisions of objects through linear algebra.
 

CycloWizard

Lifer
Sep 10, 2001
12,348
1
81
Why is a vector graphic rotating? And what vector operations are being done on it?


I'm making GIS vector data right now, watersheds and drainage lines, and I haven't done a single vector math operation all day.
*facepalm* What program are you using to do it? Ever think that maybe it's doing the math for you?
 

gorobei

Diamond Member
Jan 7, 2007
3,907
1,391
136
OP, you should really define vector graphics in this case as some people are getting confused.

Traditionally 2d drawings from programs like illustrator/cad/flash that result in eps/svg/postscriptsfonts are known as vector graphics. Technically these are polynomials defining a path where any location on the curve can be solved. Polynomials are not traditionally associated with school math trigonometry or vectors. However the transforms that occur when you stretch rotate skew or scale a shape in the program are a vector calculation.

3dCG is entirely vector math, but from a hardware side there is a connotation to the term "vector graphics" that is associated with the circuits inside a graphics card that is dedicated to floatingpoint xyz transforms (madd msub etc). 2d graphic software has not traditionally tapped into those functions/circuits until the last few years as most of it was cpu dependent.

@Throckmorton: any stretch or sizing of a shape is a Scalar Vector operation.
 

Borealis7

Platinum Member
Oct 19, 2006
2,901
205
106
its all about Matrix Multiplications and algorithms used to implement that multiplication.
if you want to draw a line between two points in 3D space you define a vector between those points. that vector is composed of 3 base vectors. you then want to look at that vector from a different angle, so you build the "spinning" matrix and multiply your vector (on the right side) to get the new vector which represents the original vector but form a different angle (different base vectors).

then you have to render a 2D image out of the 3D data so you again multiply with the Projection matrix. but don't worry, your 3D application SDK can do all that for you.

IIRC, the LU Decomposition method is used to quickly solve matrix multiplications and equations in most 3D renderers.
 

Farmer

Diamond Member
Dec 23, 2003
3,334
2
81
Since the OP is still in high school, just to open his eyes...

Beyond computer graphics, whose basis is pretty much the rotation and translation of vectors by means of matrix transforms, vectors and the more abstract concept of "vector space" finds applications in virtually every technical field. This includes highly applied techniques like solving sets of linear algebraic equations (the most fundamental application of what is called linear algebra), performing things like error-minimized regression in statistics, numerical methods like "finite element analysis," to more abstract applications like quantum mechanics, where the the "state" of some system is represented as a vector which lives in an abstract space with certain properties ("Hilbert space"). This is only a few of the countless applications which you will no doubt encounter in the future.

A good introduction to vectors and vector spaces, with many applications, is Strang's "Linear Algebra." I remember he explains something as obscure as the Heisenburg Uncertainty principle using nothing but simple results derived from linear algebra.
 

Davidh373

Platinum Member
Jun 20, 2009
2,428
0
71
Since the OP is still in high school, just to open his eyes...

I'm in the DAGD (Digital Animation and Game Design) Program at Ferris State University... 3 1/2 years of college... I however, do not need past Trigonometry for my degree. I'm not necessarily insulted by your comment, just clarifying.

On another note, I would love to get into Quantum Physics and Mechanics. It all fascinates me, but the sheer number of courses I would need to take to do so makes me cringe...
 

Farmer

Diamond Member
Dec 23, 2003
3,334
2
81
No offense intended, I assumed trig was a late HS class, my apologies.
 

Throckmorton

Lifer
Aug 23, 2007
16,829
3
0
*facepalm* What program are you using to do it? Ever think that maybe it's doing the math for you?

There is no math involved in the data storage.... The only math that happens is trigonometry and algebra to place a point from my cursor geographically while editing. That's not vector math.
 

mpo

Senior member
Jan 8, 2010
458
51
91
There is no math involved in the data storage.... The only math that happens is trigonometry and algebra to place a point from my cursor geographically while editing. That's not vector math.
ESRI doesn't agree with you: "A shapefile stores nontopological geometry and attribute information for the spatial features in a data set. The geometry for a feature is stored as a shape comprising a set of vector coordinates."

A geodatabase does the same thing, except with topology.

Raster is a non-vector way of storing data.
 

Throckmorton

Lifer
Aug 23, 2007
16,829
3
0
ESRI doesn't agree with you: "A shapefile stores nontopological geometry and attribute information for the spatial features in a data set. The geometry for a feature is stored as a shape comprising a set of vector coordinates."

A geodatabase does the same thing, except with topology.

Raster is a non-vector way of storing data.

Right, vector data, meaning it's stored as a series of coordinates for each vertex. The lines between vertices are "vectors". No vector math. And the lines/polygon sides aren't even stored as vectors. They're stored as a beginning and end point. If they were, lines would no longer meet up after reprojecting data.

Maybe I just don't know what vector math is... I remember learning that stuff in algebra and physics and I don't see how any of it relates to vector graphics or geographic vector data.
 
Last edited:

CycloWizard

Lifer
Sep 10, 2001
12,348
1
81
There is no math involved in the data storage.... The only math that happens is trigonometry and algebra to place a point from my cursor geographically while editing. That's not vector math.
You surely realize that most trigonometry is simplified vector algebra, right? You also surely realize that this thread is about vector graphics rather than data storage?
 

Throckmorton

Lifer
Aug 23, 2007
16,829
3
0
You surely realize that most trigonometry is simplified vector algebra, right? You also surely realize that this thread is about vector graphics rather than data storage?

The "vectors" in vector graphics aren't the trigonometric operations used to display them in 3D or spin them or whatever display stuff you're talking about. They're the lines and points used to make up the shapes, the defining characteristic of vector graphics, which are unrelated to vector math.

You might as well say that raster graphics are like vector math because when you rotate an image trigonometry is used to calculate the new pixels
 
Last edited:

Davidh373

Platinum Member
Jun 20, 2009
2,428
0
71
The "vectors" in vector graphics aren't the trigonometric operations used to display them in 3D or spin them or whatever display stuff you're talking about. They're the lines and points used to make up the shapes, the defining characteristic of vector graphics, which are unrelated to vector math.

You might as well say that raster graphics are like vector math because when you rotate an image trigonometry is used to calculate the new pixels

The great thing about Vector graphics is you can scale any sized shape to an unlimited size without losing quality. Vector graphics aren't limited to pixels as far as I can recall. Based on the vocabulary I'm reading, you might not know the difference between vector graphics and raster graphics. As far as I can tell from my Trig class, Vectors aren't limited to any specific number of dimensions either.
 

silverpig

Lifer
Jul 29, 2001
27,703
12
81
The "vectors" in vector graphics aren't the trigonometric operations used to display them in 3D or spin them or whatever display stuff you're talking about. They're the lines and points used to make up the shapes, the defining characteristic of vector graphics, which are unrelated to vector math.

You might as well say that raster graphics are like vector math because when you rotate an image trigonometry is used to calculate the new pixels

Actually they are. Or they should be. I haven't done any serious vector programming, or written a vector graphic application, but a simple scaling operation in a vector program should probably be done by multiplying all the vector information by a scaling matrix. Translation is the same. Rotation too.

I wrote a galaxy collision physics simulator in fortran for school several years ago. All the stars were stored as points in 3D (thus, vectors). They moved with some fancy physics differential equations code, and were then projected into a 2D image using vector math. I could translate or rotate the entire "universe" by multiplying all the vectors by some appropriate matrix.
 

CycloWizard

Lifer
Sep 10, 2001
12,348
1
81
The "vectors" in vector graphics aren't the trigonometric operations used to display them in 3D or spin them or whatever display stuff you're talking about. They're the lines and points used to make up the shapes, the defining characteristic of vector graphics, which are unrelated to vector math.

You might as well say that raster graphics are like vector math because when you rotate an image trigonometry is used to calculate the new pixels
It's amazing that, even in a topic with objective truths, you still try to pull the same FUD you use in P&N. You don't know what you're talking about, so slowly back out of the thread.
Vector graphics is the use of geometrical primitives such as points, lines, curves, and shapes or polygon(s), which are all based on mathematical equations, to represent images in computer graphics.

Source
 

Soleron

Senior member
May 10, 2009
337
0
71
On another note, I would love to get into Quantum Physics and Mechanics. It all fascinates me, but the sheer number of courses I would need to take to do so makes me cringe...

Have you tried popular science books? The best ones are the same concepts explained just without the equations.

For example, In Search of Schrodinger's Cat by John Gribbin.

If you're looking into it seriously, the maths is the highest priority. Calculus, then differential equations, matrices and complex numbers.