Vectors: Difference between revisions

From Graal Bible
No edit summary
No edit summary
 
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
'''http://www.antiunixmad.com/
[[Category:Scripting Reference]]
'''Vectors''' are mathematical representations of any thing that has a length, or magnitude, and direction. Positions are also described using vectors which start at the origin of the coordinate system (0,0,0).


Viper's Graal Issues.
== Definition ==
In GraalScript, a vector is limited to three dimensions, however, mathematics allows for analyses of vectors in n-dimensions. Vectors do not have positions. Two vectors are said to be parallel if they have the same direction (u || v), and are said to be equal if they are parallel and have the same magnitude (u = v). Vectors are generally described by their terminal points with respect to the origin (0,0,0).


Hello everyone, as of late, many people have been attacking me on the issues and matters, trying to lie about things, bend the truth, and downright spin to make me and others of my cause look bad, in this text document i will discuss and lay to rest the issues that matter.
The basic format of a vector in GraalScript is {x,y,z} where x, y, and z are all floating points in reference to the axis to which they correspond. Built into GraalScript are several functions which can be used to analyze these vectors.


I have been involved graal for over three years now, and i used to really like Graal and its admins alot, then slowly after about a year Graal and its admins went in a bad downward spiral, i still stuck with graal in hopes graal would pull itself out of this hole and unixmad would go back to the right path, this however did not happen, instead unixmad and even stefan went fouler and lower than i could have imageined, First with fireing Pachuka and Fuitad, two of the BEST graal admins ever in my view for no other reason than disagreeing with his future plans, then if just fireing them was not bad enough, he threatend to sue them and kill they're families, this was so wrong and bad Fuitad even said he would punch unixmad in the face for saying that if he met him in real life, but that was just the beginning of the downward spiral unixmad foolishly invoked onto graal, he then blatantly STOLE a domain name graal.net from Owl Shimy which costed over 30$ US Dollars, and never gave it back to him and never paid him for the cost of the domain, he also threatend to sue Owl Shimy and kill his family although it was Unixmad which stole the domain from Owl Shimy, then around Graal1.3.1 he blocked off Gservers officially and threatend to sue anyone that ran the former Gservers, although they were released as "Freeware" and actually used to encourage people to use the Gservers, this was a blatant attempt to monopolise , threaten, and intemidate that players that actually helped graal and supported him, he then made claims he copyrighted "Graal" and would contact so called "Lawres" about anyone that used the name "Graal" or had "Graal Files" on there websites, although graal was distributed as "Freeware" or "Shareware" and had no official software copyrights related to it, and that the name "Graal" was actually the name of a holy sacred golden cup used in some religion, and in that he has commited blasphemy against whatever religion has the so called "Holy Graal", then later on Unixmad fired SuperNick, because of his country and his origion and called him an American Asian slut, this was the first sign of racism on the part of Unixmad, towards Graal1.4.1 Unixmad was secretly unwrapping his sadistic plans, he then started claiming credit and claiming to own the copyrights to graal, although unixmad has done nothing but host some stupid weak as servers, and yet Stefan Knorr has done all the real work for Graal, and was the one to make ZeldaOnline , GraalOnline in the first place and has written every bit of codeing for the Graal Client , Gserver, RC, ect, yet unixmad the worthless pile of trash that he is steals all credit for Graal, then in February 2001, Unixmad and Antago release Graal2001 and the start of the "Pay to Play" system, now i have no problem with the fact that it is pay to play, the issue is when you PAY for something you actually expect to get the worth while of your money in this product, but instead they got a shittily made level generated land that was 99% empty, the NPCs were and are laggy as hell, and there were no quests, and there is only two shitty things today for hearts that suck so much i refuse to even call them quests, and to add to that about 40% of everyone that paid and gave unixmad there credit card number NEVER got the accounts they paid 27$ or more for, and those that did clearly got chumped out by a cheap peice of crap that aint worth paying for, it sucked so badly that most people played on Graal Classic still, even those that foolishly paid for pay to play accounts, and in an attempt to "FORCE" people to pay for a shitty product they do not want against they're will Unixmad hired "Tyhm" to deface and ruin GraalClassic in an attempt to make it buggier and less fun than even Graal2001, about this time i was disgusted with unixmad and most of the other admins and decided to downright turn against Graal and for the most part stop playing the peice of crap in general. People starting getting angry, complaining, asking for help, and asking for refunds, of coarse unixmad gave noone a cash refund, and simply deleted and banned "PAID ACCOUNTS" of those who complained, asked for help, or asked for a refund these are PAYING CUSTOMERS, they have the rights of basic service that they PAID for, unixmad promises pay to play players a quality product and customer service, but instead gives them a grade F product and ripps off his customers and delete they're accounts that they PAID HIM money for, his excuse? Credit card fraud, when infact at least 90% of the people he bans for credit card fraud pay legitamately with there OWN credit cards or pay via paypal by check, and yet Unixmad has stolen and used others credit card numbers to buy things for himself on several occassions, he also claims he needs pay to play money to keep graal alive and running, yet there has been evidence that he makes at least 90% profit out of the monies he gets, and that he uses illegal porn ad banners and illegal cookie style web tracking and giveing email adresses of the players and even phone numbers of every player to spam and telemarketting companies without there permission, he even keeps personal player info, includeing email, adress, and phone number on unsecure servers which have already been leaked out, such info about people should not be on a public webserver accessable to the internet in anyway, then after all that Unixmad starts banning african american people, asians, koreans, and or people with images of people of that race from the Graal2001 forums and graal itself, yet again they are paying customers and this is another sickening act of racism on the part of Unixmad and GraalOnline, and then even more disgusting is what Stefan posts on the Graal2001 forums, he makes several anti american, racist, pro terrorist, pro nazi, and pro taliban comments on that post and goes on and on several pages bashing americans, this post was offense, obcene, and disgusting to many people includeing myself . If all that does not make you sick to your stomache or dislike unixmad yet, i am far from done, then Unixmad proceeds to illegally DDOS webservers of mafukie and make threats to him over the phone, and has phone assaulted me over 40 times a day between midnight and 5am, and has made threats to sue dozens of people, kill there families, and shut down innocent websites and servers, while hosting illegal stuff and doing illegal things himself with the use of his own wanadoo.fr servers, stuff which includes child porn, bestiality porn, DVD Piracy, DDOS Attacks, theft of copyrighted materials from gameing companies such as nintendo, Credit Card fraud, theft, spamming, phone harrassment, useage of illegal pirated corperate softwares, all this just to start the list of what Unixmad, Stefan, and they're servers are doing 24/7 for nearly 4 years now , anyone that likes unixmad or thinks he is a good person even after all this is clearly a fool, everything in this document is the truth and why i hate unixmad so much, if you like unixmad after all these sickening things he does, then you are no better than a KKK or Neo Nazi member and should go kill yourselfs, i do not tolerate facists, racists, or nazis, they are all bad people, and unixmad is one of the worst of the worst, and no person with any morales could tolerate or support such a person like Stephane Portha or Stefan Knorr. The people that spin, lie and bend the truth in support of unixmad will always exist, but i will always reveal the truth about unixmad, and EVERYTHING said in this document is true, despite what any assclowns try and say about this, and this supriseingly enough is only 1% of the bad things Unixmad has done, how some people even tolerate, none the less support such a bad person is beyond me... I fight against bad people like unixmad, why? Because unlike many others in this world i actually care about other people, and i will do everything in my power to stop unixmad from hurting graal or its innocent players, many say i want to destroy and kill graal, this is NOT true, i used to love graal, i only wish to stop unixmad's evil sadistic illegal actions and restore graal to the great game it used to be when it was "for the players, by the players" , but if i have to destroy GraalOnline in exchange to stop unixmad's tyranny, it will be regreteable, but sometimes some sacrifices have to be made for the greater good, lets just hope that unixmad drops dead and that sacrifice never has to be made... I love graal and lots of its players, and i wish to someday restore it to the grandness it once had, but bad people like unixmad must be gotten rid of if that is to be achieved...'''
In mathematics, vectors are often written
v = &lt;v<sub>1</sub>,v<sub>2</sub>,v<sub>3</sub>&gt;
for a vector in three dimensions. They can also be written as the sum of unit vectors, <b>i</b> = &lt;1,0,0&gt;, <b>j</b> = &lt;0,1,0&gt;, and <b>k</b> = &lt;0,0,1&gt; on the x, y, and z axes, respectively. In this case, the vector would be written as
v = v<sub>1</sub><b>i</b> + v<sub>2</sub><b>j</b> + v<sub>3</sub><b>k</b>
where the values of v are treated as scalars (numerical multipliers) of the unit vectors.
 
To denote the difference between a scalar and a vector, vectors are often written with a directional arrow above them, which looks like the top half of an arrow pointing right. In GraalScript, a scalar and a vector are impossible to confuse: a scalar is a floating point whereas a vector is a string.
 
=== Vector Length (Magnitude/Modulus) ===
Being as vectors are merely written by terminal point coordinates, there is no immediate way to determine the magnitude of the vector. Mathematically, the terminal point lies on a sphere that has the same radius as the vector's magnitude. Thus, we can use the equation of a sphere to calculate the magnitude.<br />
r<sup>2</sup> = x<sup>2</sup> + y<sup>2</sup> + z<sup>2</sup><br />
r = &radic;(x<sup>2</sup> + y<sup>2</sup> + z<sup>2</sup>)
where r is the magnitude. Generally, the magnitude is denoted as |v| or ||v||. This was chosen, because absolute value refers to distance from the origin, thus  the marks were suitable. In GraalScript, however, the magnitude of any vector can be calculated simply by plugging a vector string into the '''vectorlen({{graycourier|v}})''' function.
 
=== Unit Length ===
A vector is said to have "unit length" when it's magnitude is one. '''i''', '''j''', and '''k''' are each unit vectors because their magnitudes are each one. To make a vector of unit length, the vector must merely be divided by it's magnitude.
Let v be a vector and u be the direction (unit vector) of v.
v = <1,7,1>
|v| = &radic;(1<sup>2</sup> + 7<sup>2</sup> + 1<sup>2</sup>) = &radic;51
u = v/|v| = <1/&radic;51,7/&radic;51,1/&radic;51>
 
Graalscript has a built-in function, '''vectornormalize({{graycourier|1=v}})''',to perform such a calculation.
 
== Vector Modification ==
Along with vectorlen are a plethora of functions built into GraalScript all for the purpose of modifying vectors.
 
=== Vector Addition ===
[[Image:Vectors-addition.png|thumb|right|Vector addition]]
Given the vectors u and v, we could create a third vector that has the magnitude of u and v, were the two vectors to be placed tip-to-end. This is called vector addition and can be done with the function '''vectoradd({{graycourier|u}},{{graycourier|v}})'''. This takes the terminal coordinates and adds them together. to make a new vector: <br />
w = &lt;u<sub>1</sub>+v<sub>1</sub>, u<sub>2</sub>+v<sub>2</sub>, u<sub>3</sub>+v<sub>3</sub>&gt;.  
<br clear="all" />
 
=== Vector-Scalar Multiplication ===
[[Image:Vectors-scalar-multiplication.png|thumb|left|Vector-scalar multiplication]]
With a vector, v, and a scalar, s, we could make a new vector that is s times larger than v. This can be accomplished in GraalScript with the function '''vectorscale({{graycourier|v}},{{graycourier|s}})'''. The vector is thus extended in the following manner: <br />
s&#183;v = s&#183;&lt;v<sub>1</sub>,v<sub>2</sub>,v<sub>3</sub>&gt; = &lt;s&#183;v<sub>1</sub>,s&#183;v<sub>2</sub>,s&#183;v<sub>3</sub>&gt;.
<br clear="all" />
 
=== Vector Subtraction ===
[[Image:Vectors-subtraction.png|thumb|right|Vector subtraction]]
With these two properties, we find that vector subtraction is possible, and no longer a new idea. This is done in GraalScript with the use of the '''vectorsub({{graycourier|u}},{{graycourier|v}})''' function. <br />
u-v = u + (-v) = u + (-1)&#183;v
You can imagine this as the two vectors placed tip-to-end, but the second is facing the opposite direction.
<br clear="all" />
 
=== Distance Between Terminal Points ===
Without creating a third vector, it is simple in GraalScript to find the distance between the two points at which two vectors end. This function is '''vectordist({{graycourier|u}},{{graycourier|v}})'''. <br />
The return value would be
&radic;((u<sub>1</sub>-v<sub>1</sub>)<sup>2</sup>+(u<sub>2</sub>-v<sub>2</sub>)<sup>2</sup>+(u<sub>3</sub>-v<sub>3</sub>)<sup>2</sup>)
The mathematical operation is the pythagorean theorem (or a combination of two). As may be evident, the distance is the magnitude of '''u'''-'''v'''.
 
== Other functions ==
vectordot({{graycourier|u}},{{graycourier|v}}): see [[Dot Product]].<br />
vectorcross({{graycourier|u}},{{graycourier|v}}): see [[Cross Product]].

Latest revision as of 19:40, 5 April 2010

Vectors are mathematical representations of any thing that has a length, or magnitude, and direction. Positions are also described using vectors which start at the origin of the coordinate system (0,0,0).

Definition

In GraalScript, a vector is limited to three dimensions, however, mathematics allows for analyses of vectors in n-dimensions. Vectors do not have positions. Two vectors are said to be parallel if they have the same direction (u || v), and are said to be equal if they are parallel and have the same magnitude (u = v). Vectors are generally described by their terminal points with respect to the origin (0,0,0).

The basic format of a vector in GraalScript is {x,y,z} where x, y, and z are all floating points in reference to the axis to which they correspond. Built into GraalScript are several functions which can be used to analyze these vectors.

In mathematics, vectors are often written

v = <v1,v2,v3>

for a vector in three dimensions. They can also be written as the sum of unit vectors, i = <1,0,0>, j = <0,1,0>, and k = <0,0,1> on the x, y, and z axes, respectively. In this case, the vector would be written as

v = v1i + v2j + v3k

where the values of v are treated as scalars (numerical multipliers) of the unit vectors.

To denote the difference between a scalar and a vector, vectors are often written with a directional arrow above them, which looks like the top half of an arrow pointing right. In GraalScript, a scalar and a vector are impossible to confuse: a scalar is a floating point whereas a vector is a string.

Vector Length (Magnitude/Modulus)

Being as vectors are merely written by terminal point coordinates, there is no immediate way to determine the magnitude of the vector. Mathematically, the terminal point lies on a sphere that has the same radius as the vector's magnitude. Thus, we can use the equation of a sphere to calculate the magnitude.

r2 = x2 + y2 + z2
r = √(x2 + y2 + z2)

where r is the magnitude. Generally, the magnitude is denoted as |v| or ||v||. This was chosen, because absolute value refers to distance from the origin, thus the marks were suitable. In GraalScript, however, the magnitude of any vector can be calculated simply by plugging a vector string into the vectorlen(v) function.

Unit Length

A vector is said to have "unit length" when it's magnitude is one. i, j, and k are each unit vectors because their magnitudes are each one. To make a vector of unit length, the vector must merely be divided by it's magnitude. Let v be a vector and u be the direction (unit vector) of v.

v = <1,7,1>
|v| = √(12 + 72 + 12) = √51
u = v/|v| = <1/√51,7/√51,1/√51>

Graalscript has a built-in function, vectornormalize(v),to perform such a calculation.

Vector Modification

Along with vectorlen are a plethora of functions built into GraalScript all for the purpose of modifying vectors.

Vector Addition

Vector addition

Given the vectors u and v, we could create a third vector that has the magnitude of u and v, were the two vectors to be placed tip-to-end. This is called vector addition and can be done with the function vectoradd(u,v). This takes the terminal coordinates and adds them together. to make a new vector:

w = <u1+v1, u2+v2, u3+v3>. 


Vector-Scalar Multiplication

Vector-scalar multiplication

With a vector, v, and a scalar, s, we could make a new vector that is s times larger than v. This can be accomplished in GraalScript with the function vectorscale(v,s). The vector is thus extended in the following manner:

s·v = s·<v1,v2,v3> = <s·v1,s·v2,s·v3>.


Vector Subtraction

Vector subtraction

With these two properties, we find that vector subtraction is possible, and no longer a new idea. This is done in GraalScript with the use of the vectorsub(u,v) function.

u-v = u + (-v) = u + (-1)·v

You can imagine this as the two vectors placed tip-to-end, but the second is facing the opposite direction.

Distance Between Terminal Points

Without creating a third vector, it is simple in GraalScript to find the distance between the two points at which two vectors end. This function is vectordist(u,v).
The return value would be

√((u1-v1)2+(u2-v2)2+(u3-v3)2)

The mathematical operation is the pythagorean theorem (or a combination of two). As may be evident, the distance is the magnitude of u-v.

Other functions

vectordot(u,v): see Dot Product.
vectorcross(u,v): see Cross Product.