![]() |
Aleph Zero Home |
![]() |
Introduction |
![]() |
The Ovals Explorer |
If we take all the points a given distance from a fixed point we get a circle. And it is not difficult to work out an equation that describes this circle. Similarly if the sum of the distances from two fixed points is given then we get an ellipse. It is not quite so easy to get an equation for the ellipse, but still relatively simple.
If instead of adding the distances from two fixed points, we multiply them together, we get a curve called a Cassini Oval. Again, there are known equations for these ovals.
But suppose we have three or more fixed points. Or perhaps we would like to apply weights to the fixed points.
Now it is more difficult to work out suitable equations, so I have taken another approach. For every point in my picture, I calculate distance, sum or product of distances. Then I colour the point in my picture depending on value at that point. I use a rainbow of 360 colours, spread evenly over the full range of numbers generated.
You can have up to 4 points. For each point you specify its X and Y co-ordinates. The origin is in the middle of the picture, and the scale depends on the choice of zoom factor.
Any point with a weight of zero or less is ignored. A weight of 1 has no effect, but other values for the weights change the importance given to the points.
The Zoom setting specifies how many pixels on the screen represent one unit of length in the picture.
You can also choose whether the distances should be added together or multiplied.
Finally, the Plot button will plot the picture with the current settings, and the Show Points button will draw the fixed points on the picture.
An additional feature, added as an afterthought, allows you to plot the contour through any point. All points with a value close to that of the chosen point will be coloured black. Press the Draw Contour button to draw the contour.
For each point in the picture, the distances to the fixed points are calculated. In the Addition mode, the distances are multiplied by the weights and then added together, to get a final score for that point. In the Multiply mode, the distances are raised to the power of the weights and then multiplied together.
In the Multiply mode, some further manipulation is carried out. This is because the numbers get big very quickly, and so there is very little detail near the fixed points where the scores become vanishingly small. I actually plot a modified reciprocal of the raw score, given by the formula k=1000 / (11+score)
With two fixed points (achieved by setting the weights on the other two points to zero) we get an ellipse or cassini oval.
Cassini ovals can be used to model the electic potential around two
straight wires carrying current in the same direction.
By changing the weights we can give more importance to one of the
fixed points. This can model the situation where the two currents are unequal.
![]() In Addition mode we get ellipses. |
![]() In Multiply mode we get cassini ovals. |
![]() By including weights we give more importance to one of the fixed points. |