# Fun with vectors

No replies to this topic

### #1 pan.gejt

pan.gejt

Casio Freak

• Members
• 199 posts
• Gender:Male
• Location:CZ

• Calculators:
.

Posted 02 May 2017 - 08:59 AM

Classpad II only, maybe will works on Classpad 300/330 if the command for colors are omitted

On one lazy rainy afternoon I was playing with vectors and I created a very simple program for educational purposes.

The program calculates lengths (magnitudes) of all three vectors, angle between two entered vectors, angle between final vector and x-axis, end point of final vector and graphical representation. The start point is always at [0,0]. The angles are in degrees.The command Pause is included in this program so you need to tap the icon with arrow on the green background ( bottom right) to view the graphic result.

The input:

coordinates of 2 vectors [x1,y1] and [x2,y2]

The coordinates can be entered directly or as r*cos(alpha) for x-coordinates and r*sin(alpha) for y-coordinates if you know the magnitude and angle

Ex.1

a=[-3,8], b=[2,9]

The results:

8.54                      (magnitude of the 1st vector)

9.22                      (magnitude of the 2nd vector)

33.08                    (angle between entered vectors)

[-1,7]                    (end point of final vector)

17.03 <93.37         (magnitude and angle of final vector)

Ex.2

a=30 <60° (30*cos(60), 30*sin(60))

b=8 <22°   (8*cos(22), 8*sin(22))

The results:

30

8

38

[22.42,28.98]

36.64 <52.27

https://app.box.com/...27laaa0jwdgmkka

Edited by pan.gejt, 02 May 2017 - 09:02 AM.

#### 0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users