This repository has been archived by the owner on May 11, 2021. It is now read-only.
/
axis_of_symmetry.html
64 lines (62 loc) · 2.72 KB
/
axis_of_symmetry.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html data-require="math angles graphie graphie-geometry graphie-helpers">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Axis of symmetry</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars">
<var id="SYM">randRange( 0, 1 )</var>
<var id="SIDES">randRange( 3, 8 )</var>
<var id="SIDE">randRange( 0, SIDES - 1 )</var>
<var id="ANSWER">SYM ? "Yes" : "No"</var>
</div>
<div class="problems">
<div>
<p class="question">Is the blue line an axis of symmetry?</p>
<div class="graphie" id="main">
init({
range: [ [ -5, 5 ], [ -5, 5 ] ]
});
graph.polygon = new RegularPolygon( [ 0, 0 ] , SIDES , 3 );
if ( SYM ){
graph.split = graph.polygon.drawLineOfSymmetry( SIDE );
} else {
graph.split = graph.polygon.drawFakeLineOfSymmetry( SIDE );
}
</div>
<div class="solution"><var>ANSWER</var></div>
<ul class="choices" data-category="true">
<li>Yes</li>
<li>No</li>
</ul>
<div class="hints">
<p>Does the blue line split the shape into two parts which look like reflections of each other?</p>
<div>
<p>The orange line is one of two parts made by the blue line.</p>
<div class="graphie" data-update="main">
graph.half = graph.polygon.splitPath( graph.split ).graphiePath;
</div>
</div>
<p>If the blue line were a mirror, what would the orange line's reflection look like?</p>
<div>
<p>The pink line is the orange line's reflection.</p>
<div class="graphie" data-update="main">
var temp = [];
var i = 0;
for( i = 0; i != graph.half.length; i++ ){
temp.push( reflectPoint( graph.split.graphiePath, graph.half[ i ] ) );
}
path( temp, { "stroke-width": 5, stroke: KhanUtil.PINK } )
</div>
</div>
<p data-if="SYM">The blue line splits the shape into two equal halves, so it is an axis of symmetry.</p>
<p data-else>The blue line did not split the shape into two equal halves, so it is not an axis of symmetry.</p>
</div>
</div>
</div>
</div>
</body>
</html>