Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Straight line
1. Higher Unit 1
www.mathsrevision.com
Higher
Outcome 1
Distance Formula
The Midpoint Formula
Gradients
Collinearity
Gradients of Perpendicular Lines
The Equation of a Straight Line
Median, Altitude & Perpendicular Bisector
Exam Type Questions
www.mathsrevision.com
3. Distance Formula
Length of a straight line
Outcome 1
www.mathsrevision.com
Higher
AB =AC +BC
2
2
2
y
B(x2,y2)
This is just
y2 – y1
A(x1,y1)
Pythagoras’ Theorem
x2 – x1
O
C
x
5. Finding Mid-Point of a line
Outcome 1
www.mathsrevision.com
Higher
The mid-point between
2 points is given by
Simply add both x
coordinates together
and divide by 2.
Then do the same with
the y coordinates.
y
y2
A(x1,y1)
M
y1
O
x1 + x 2 y1 + y 2
M =
,
,÷
2
2
B(x2,y2)
x1
x2
x
7. Outcome 1
Higher
www.mathsrevision.com
Sloping left to right up has +ve gradient
m>0
Sloping left to right down has -ve gradient
m<0
Horizontal line has zero gradient.
m=0
y=c
Vertical line has undefined gradient.
x=a
www.mathsrevision.com
Feb 2, 2014
7
8. Outcome 1
www.mathsrevision.com
Higher
Lines with the same gradient
m>0
means lines are Parallel
The gradient of a line is ALWAYS
equal to the tangent of the angle
θ
made with the line and the positive x-axis
m = tan θ
www.mathsrevision.com
Feb 2, 2014
8
9. Collinearity
Outcome 1
Higher
www.mathsrevision.com
Points are said to be collinear
if they lie on the same straight.
y
C
The coordinates A,B C are
collinear since they lie on
the same straight line.
B
D,E,F are not collinear they
do not lie on the same
straight line.
A
E
F
D
O
x1
x2
x
10. Gradient of perpendicular lines
Outcome 1
Higher
→ B (-b, a)
www.mathsrevision.com
When rotated through 90º about the origin A (a, b)
mOB
a-0
a
=
=-b - 0
b
B(-b,a)
y -a
-b
-b
A(a,b)
O
mOA ×mOB =
a
mOA
b-0 b
=
=
a -0 a
x
b a
ab
×
== -1
a -b
ab
If 2 lines with gradients m1 and m2 are perpendicular then m1 × m2 = -1
Conversely:
If m1 × m2 = -1 then the two lines with gradients m 1 and m2 are perpendicular.
11. The Equation of the Straight Line
y – b = m (x - a)
Outcome 1
Higher
www.mathsrevision.com
The equation of any line can be found if we know
the gradient and one point on the line.
y
P (x, y)
y
m
b
O
A (a, b)
a
x–a
y-b
m=
(x – a)
y -- b
b
x
x
Gradient,
y–b=m(x–a)
m
Point
(a, b)
Point on the line ( a, b )
12. Typical Exam Questions
Outcome 1
www.mathsrevision.com
Higher
Find the equation of the line which passes through the point (-1, 3)
and is perpendicular to the line with equation 4 x + y − 1 = 0
Find gradient of given line:
4 x + y − 1 = 0 ⇒ y = −4 x + 1 ⇒ m = −4
Find gradient of perpendicular:
Find equation:
m=
1
(using formula m × m = −1)
1
2
4
y – b = m(x – a)
y – 3 = ¼ (x –(-1))
4y – 12 = x + 1
4 y − x − 13 = 0
13. Typical Exam Questions
Outcome 1
www.mathsrevision.com
Higher
Find the equation of the straight line which is parallel to the line
2 x + 3with 5
y = equation
and which passes through the point (2, –1).
Find gradient of given line:
2
3
3 y = −2 x + 5 ⇒ y = − x + 5 ⇒ m = −
Gradient of parallel line is same:
Find equation:
M = -2/3
y – b = m(x – a)
y – (-1) = -2/3 (x – 2)
3y + 3 = -2x + 4
3 y + 2x =1
2
3
14. Outcome 1
Higher
www.mathsrevision.com
Median means a line from vertex
to midpoint of the base.
A
A
B
D
C
D
Altitude means a perpendicular line
B
C
from a vertex to the base.
www.mathsrevision.com
Feb 2, 2014
14
16. Exam Type Questions
Outcome 1
www.mathsrevision.com
Higher
Find the size of the angle a° that the line
joining the points A(0, -1) and B(3√3, 2)
makes with the positive direction of the x-axis.
2 − (− 1)
3
=
=
Find gradient of the line: m =
3 3−0
3 3
m = tan θ
tan θ =
Use table of exact values
1
3
θ = tan
−1
1
θ = 30°
3
1
3
17. Exam Type Questions
Outcome 1
Higher
www.mathsrevision.com
A and B are the points (–3, –1) and (5, 5).
Find the equation of
a) the line AB.
b) the perpendicular bisector of AB
3
Find equation of AB 4 y = 3 x + 5
Find gradient of the AB: m =
4
Find mid-point of AB
(1,2)
4
Gradient of AB (perp): m = −
3
Use gradient and mid-point to obtain perpendicular bisector AB
4x + 3y = 10
18. Typical Exam Questions
Outcome 1
www.mathsrevision.com
Higher
π
The line AB makes an angle of
radians with
3
the y-axis, as shown in the diagram.
Find the exact value of the gradient of AB.
π π π
− =
Find angle between AB and x-axis:
2 3 6
π
m = tan θ
m = tan
6
Use table of exact values
1
m=
3
(x and y axes are perpendicular.)
19. Typical Exam Questions
Higher
Outcome 1
www.mathsrevision.com
A triangle ABC has vertices A(4, 3), B(6, 1)
and C(–2, –3) as shown in the diagram.
Find the equation of AM, the median from A.
x2 - x1 y2 − y1
,
Find mid-point of BC: (2, − 1) Using M
÷
2
2
Find gradient of median AM m = 2 Using m =
y2 - y1
x2 - x1
Find equation of median AM y = 2 x − 5 Using y - b = m( x - a )
20. Typical Exam Questions
www.mathsrevision.com
Higher
Outcome 1
P(–4, 5), Q(–2, –2) and R(4, 1) are the vertices
of triangle PQR as shown in the diagram.
Find the equation of PS, the altitude from P.
Find gradient of QR: m =
1
y -y
Using m = 2 1
2
x2 - x1
Find gradient of PS (perpendicular to QR)
m = − 2 (m1 × m2 = − 1)
Find equation of altitude PS
y + 2x + 3 = 0
Using y − b = m( x − a )
21. www.mathsrevision.com
Higher
Typical Exam
Questions
72o
Outcome 1
The lines y = 2 x + 4
63
and x + y = 13
o
45
o
135o
make angles of a° and b° with the positive direction of the xaxis, as shown in the diagram.
a) Find the values of a and b
b) Hence find the acute angle between the two given lines.
y = 2x + 4
m=2
Find a°
tan a° = 2 → a = 63°
x + y = 13
m = −1
Find b°
tan b° = − 1 → b = 135°
Find supplement of b
= 180 − 135 = 45°
Use angle sum triangle = 180° angle between two lines
72°
22. Higher
Exam Type
Questions Outcome 1
p
q
www.mathsrevision.com
Triangle ABC has vertices
A(–1, 6), B(–3, –2) and C(5, 2)
Find:
a) the equation of the line p, the median from C of triangle ABC.
b) the equation of the line q, the perpendicular bisector of BC.
c) the co-ordinates of the point of intersection of the lines p and q.
Find mid-point of AB
(-2, 2)
Find equation of p
y=2
Find mid-point of BC
(1, 0)
Find gradient of q
m = −2
Find gradient of p
m=0
1
Find gradient of BC
2
y = −2 x + 2
Find equation of q
Solve p and q simultaneously for intersection (0, 2)
m=
23. www.mathsrevision.com
Higher
Exam Type
Questions
l2
Outcome 1
l1
Triangle ABC has vertices A(2, 2), B(12, 2) and C(8, 6).
a) Write down the equation of l1, the perpendicular bisector of AB
b) Find the equation of l2, the perpendicular bisector of AC.
c) Find the point of intersection of lines l1 and l2.
Mid-point AB
( 7, 2 )
Find mid-point AC
Gradient AC perp.
Point of intersection
Perpendicular bisector AB
x=7
2
(5, 4) Find gradient of AC m =
3
3
m=−
Equation of perp. bisector AC 2 y + 3 x = 23
2
(7, 1)
24. www.mathsrevision.com
Higher
Exam Type
Questions
Outcome 1
A triangle ABC has vertices A(–4, 1), B(12,3) and C(7, –7).
a) Find the equation of the median CM.
b) Find the equation of the altitude AD.
c) Find the co-ordinates of the point of intersection of CM and AD
Mid-point AB
( 4, 2 )
Equation of median CM
Gradient BC
Equation of AD
m=2
Gradient CM (median)
m = −3
y + 3x = 14
Gradient of perpendicular AD
2y + x + 2 = 0
Solve simultaneously for point of intersection (6,
-4)
1
m=−
2
25. Higher
Exam Type
Questions
M
Outcome 1
www.mathsrevision.com
A triangle ABC has vertices A(–3, –3), B(–1, 1) and C(7,–3).
a) Show that the triangle ABC is right angled at B.
b) The medians AD and BE intersect at M.
i) Find the equations of AD and BE. ii) Find find the co-ordinates of M.
Gradient AB
m=2
Product of gradients
Gradient BC
2 × −
1
→ 1
2
1
m=−
2
Hence AB is perpendicular to BC, so B = 90°
1
Equation AD 3 y − x + 6 = 0
3
4
2, − 3 ) Gradient of median BE m = − Equation AD 3 y + 4 x + 1 = 0
Mid-point AC (
3
5
Solve simultaneously for M, point of intersection 1, − ÷
3
Mid-point BC ( 3, − 1)
Gradient of median AD m =