Points and Vectors

by Roberto Lot

> restart: libname := libname, "C:/MBSymba": with(MBSymba_r6):

MBSymba release 6 - Copyright (C) 2011 by R. Lot, M. Massaro - University of Padova (Italy)

Definition of a POINT

The function make_POINTdefines a point P of coordinates x,y,z in a reference frame defined by T;
showis the function which displays the characteeristics of the point.

Define the reference frame:

> T := translate(a,0,0) * rotate('Z',psi);

Define the point:

> P := make_POINT(T , x,y,z): show(P);

Function project is used to project the point P into another frame.

> project(P,ground): show(%);

definition of a VECTOR

(while a point is fixed in the space, a vector is defined only in direction and magnitude, it can be moved everywhere in the space)
we use the function make_VECTORwhich defines a vector with components vx,vy,vz in the reference frame defined by the 1st argument of the function [e.g. "rotate ('X', phi)"]

> v := make_VECTOR(rotate('X',phi), vx,vy,vz): show(v);

projection of the vector v into another frame

> project(v,ground): show(%);

Definition of a vector from two points

point in the ground frame

> P := make_POINT(ground,xP,yP,0): show(P);

point Q in a rotated frame defined

> T1 := rotate('Z',alpha):
Q := make_POINT(T1,a,b,0): show(Q);

The vector is then defined as the conjunction of the two points

> PQ := join_points(P,Q): show(PQ);

before subtracting the coordinates of P1 from P2, the vector P2 is projected on the frame of point P1.

vector P1P2 on the ground frame

vector PQ in the reference frame T1

> project(PQ,T1): show(%);

Geometric operations

> v := make_VECTOR(rotate('Z',beta), L,0,0): show(v);

If you think about either to vectorial geometry or to algebra operations of colum matrix

1. The sum of two vectors yields a vector too (the fourht element is 0+0 = 0, i.e. a vector)

> w := v + PQ: show(w);


> w := PQ + v: show(w);

2. A vector plus point yields a point (the fourht element is 1+0 = 1, i.e. a point)

> R := P + v: show(R);

> R := v + P: show(R);

>

3. The sum of two points does not make any sense (the fourht element would be 1+1=2)

> show( P + R );

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>