Copyright © University of Cambridge. All rights reserved.
'Plex' printed from http://nrich.maths.org/
This text is usually replaced by the Flash movie.
A Quick User Guide for the Curious
This resource has a few rough edges. It was used as a test bed in the development of other NRICH materials. You have been warned!
In Plex, you see a representation of the Complex Plane, also known as an Argand diagram.
Pressing the Edit button reveals a script that allows you to adjust what will be displayed
when you press Run. I'll explain the script and give other examples on the way.
- Defines the complex variable z, and gives it the value 1. It will initially be plotted at the point (1,0).
- z paints 0x99
- This gives z the colour 0x99. Colours are encoded in the normal hexadecimal 0xrrggbb way where rr, gg, and bb are hexadecimal numbers between 0x00 and 0xff. 0x00 means the colour component is off; 0xff means it is full on. 0x99 is the same number as 0x000099 and is interpreted as a dark blue.
- z useMouse
- This tells z to follow the mouse. The position and value of z will change as the mouse moves. Also, if the mouse is pressed and dragged, z will leave a trail behind. Other drawModes are
- This defines a new variable w, giving it the complex value z*i. If z is at (x,y) it has the
value x+i*y. w=i*z has the value x*i+i*i*y = -y+i*x and will therefore be drawn at (-y,x) - the point obtained by rotating z through 90 degrees around the origin. You can have a lot of fun by defining functions of z in this way. Try things like w=-z, w=~z, w=25/z or better w=25/~z, w=sin(z),w=exp(z), w=sqrt(z), w=z^3
- w drawLike z
- This tells the program to draw w in the same way as it draws z i.e. using the same drawMode as z, and leaving trails behind whenever z leaves a trail.
- w paints 0x660066.
- Assigns a dark magenta colour to w.
I hope that explains the basics. Clicking on a variable will popup a box where you can adjust its definition, colour, and drawMode. You may define quite a few variables and explore the point geometry of the complex plane in some detail. Try adding a couple more points such as: u=w*i and v=u*i. Can you predict the result? What about w=sqrt(i)*z, v=sqrt(i)*w,... ?
Plex uses a syntax for defining functions which is commonly used in mathematical emails.
- Binary Operations
- +, -, /, * for times, ^ to raise to a power
- Unary Operations
- - negate, ~ complex conjugate
- abs(z) absolute value/modulus, arg(z) the argument of z, exp(z). Similarly sin(), cos(),
tan(), sinh(), cosh(), tanh(), asin(), acos(),
atan(), asinh(), acosh(), atanh(), ln() natural logarithm, sqr() or sqrt(), round().
- Special Constants
- e and pi are predefined constants.
Once you are confident with Plex, try Plex2.