12.010.lec03 - massachusetts institute of technologytah/12.010/12.010.lec03.pdf12.010 lec 03 input...

32
1

Upload: others

Post on 24-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

1

Page 2: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

2

Page 3: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

3

Page 4: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

4

Page 5: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

5

For option 2: Magnitude of the cross product of two vectors in a and b is |a||b| sin θ where is the angle between the two vectors. The cross product is simple the height by the base (it is a vector orientated out of the page).

Page 6: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

6

Even if the figure is like the shape on Page 25 case (b), this algorithm will work although some of the areas computed will be negative.

Page 7: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

7

Page 8: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

8

Page 9: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

9

Also on arrays, the index of the first element is different between languages (i.e., can be 0 or 1, and for some languages you can define what it is).

Page 10: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

10

Page 11: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

11

Page 12: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

12

Page 13: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

13

Page 14: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

14

Page 15: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

15

Page 16: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

16

Page 17: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

17

Page 18: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

18

Page 19: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

19

Page 20: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

20

Page 21: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

21

Page 22: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

22

Page 23: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

23

Page 24: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

24

These slides forward have been moved to lec04 (did not get to).

Page 25: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

25

Page 26: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

26

Page 27: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

27

Page 28: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

28

The difference between a standard object module (the result of compiling with the -c option) and a library (such as libraries.a above) is that only the modules that are needed are loaded from the library. When on object module (.o extent) or a Fortran module (.f extent) is included all the routines from these are linked to the program even if they are not needed.

Page 29: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

29

Page 30: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

30

Page 31: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

31

Page 32: 12.010.Lec03 - Massachusetts Institute of Technologytah/12.010/12.010.Lec03.pdf12.010 Lec 03 Input options In some cases, for an arbitrary set of coordinates the figure is obvious,

32