Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

106 lines (96 sloc) 4.527 kb
<!DOCTYPE html>
<html data-require="math graphie graphie-helpers math-format">
<head>
<meta charset="UTF-8" />
<title>Complex number polar form intuition</title>
<script src="../khan-exercise.js"></script>
<style>
.info-box .mini-button {
margin: 0px 10px 0px 0px;
padding: 0px 5px;
width: 25px;
height: 18px;
}
#number-label {
clear: both;
margin: 0px 0px;
padding: 14px 0px 0px 0px;
}
</style>
</head>
<body>
<div class="exercise">
<div class="problems">
<div>
<div class="vars">
<var id="DENOMINATOR">12</var>
<var id="ANGLE">randRange( 0, DENOMINATOR - 1 )</var> <!-- the angle of the complex number is ANGLE * (2 * DENOMINATOR) pi -->
<var id="RADIUS">randRange( 1, 10 )</var>
<var id="REAL">cos( ANGLE * PI * 2 / DENOMINATOR ) * RADIUS</var>
<var id="IMAG">sin( ANGLE * PI * 2 / DENOMINATOR ) * RADIUS</var>
<var id="REP">complexNumber( roundTo( 2, REAL ), roundTo( 2, IMAG ) )</var>
</div>
<p class="question">
Adjust the angle and radius of the <span class="hint_orange">orange</span> plotted complex number
to match the <span class="hint_blue">blue</span> plotted complex number <code><var>REP</var></code>.
</p>
<p>
How do these numbers affect the complex number they represent?
</p>
<div class="graphie">
graphInit({
range: [[-10, 10], [-10, 10]],
scale: 20,
tickStep: 1,
axisArrows: "<->"
});
drawComplexChart( 10, DENOMINATOR );
circle( [REAL, IMAG], 1 / 4, {
fill: KhanUtil.BLUE,
stroke: "none"
});
graph.currComplexPolar = new ComplexPolarForm( DENOMINATOR, 10 );
redrawComplexPolarForm();
</div>
<div class="solution" data-type="custom">
<div class="instruction">
<div>
<div style="float: left;">Radius: <span id="current-radius"><code>1</code></span></div>
<div style="float: right;">
<input type="button" class="simple-button mini-button" value="-" onclick="updateComplexPolarForm(0, -1)" />
<input type="button" class="simple-button mini-button" value="+" onclick="updateComplexPolarForm(0, 1)" />
</div>
</div>
<div style="clear: both;">
<div style="float: left;">Angle: <span id="current-angle"><code>0</code></span></div>
<div style="float: right;">
<input type="button" class="simple-button mini-button" value="-" onclick="updateComplexPolarForm(-1, 0)" />
<input type="button" class="simple-button mini-button" value="+" onclick="updateComplexPolarForm(1, 0)" />
</div>
</div>
<div id="number-label">1</div>
</div>
<div class="guess">[
graph.currComplexPolar.getAngleNumerator(),
graph.currComplexPolar.getRadius()
]</div>
<div class="validator-function">
var angle = guess[0];
var radius = guess[1];
if (angle === 0 &amp;&amp; radius === 1) {
return "";
}
return angle === ANGLE &amp;&amp; radius === RADIUS;
</div>
<div class="show-guess">
redrawComplexPolarForm(guess[0], guess[1]);
</div>
<div class="show-guess-solutionarea">
redrawComplexPolarForm(guess[0], guess[1]);
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.