

Public Member Functions | |
| Locus (final OObject oobject, View view) | |
| Construct the locus from an OObject, Model and View. | |
| void | setup (View view) |
| Set or reset the information required. | |
| void | run () |
| Takes a view and updates the path from it using the OObject belonging to this. | |
| void | updatePath () |
| Update the path. | |
| void | stop () |
| Stop the thread as soon as possible. | |
| void | draw (Model model, View view, java.awt.Graphics2D graphics2d) |
| Draw the element on the view using the graphics object supplied. | |
Protected Member Functions | |
| OObject | substitute (double x) |
| Set substitution to variable = x. | |
| double | function (double x, Transformation t) |
| Get value of function at x if it is real and NaN otherwise. | |
Protected Attributes | |
| jscicalc.Substitution | substitution |
| We use substitution to substitute values for x. | |
Static Protected Attributes | |
| static final jscicalc.expression.Variable | variable = new jscicalc.expression.Variable( new jscicalc.pobject.Variable( 'x' ) ) |
| We substitute for variable x: so we need a variable. | |
| static final double | epsilon = 1e-32 |
| Limit point at which imaginary part is considered zero. | |
| static final double | delta = 1e-8 |
| Limit point for x distances. | |
Package Functions | |
| double | increment () |
| Get incrementValue. | |
Package Attributes | |
| java.util.concurrent.atomic.AtomicBoolean | restart |
| Flag to indicate that an update should restart as soon as possible. | |
Private Attributes | |
| double | incrementValue = 10 |
| The standard x increment (in view) for this locus. | |
| double | distance = 16 |
| The minimum distance between points. | |
| final OObject | oobject |
| The OObject represented by this locus. | |
| java.awt.geom.Path2D.Double | path |
| A path representing this locus. | |
| View | view |
| Used for finding the View. | |
| Thread | thread |
| Set thread to null to terminate it. | |
| Object | lock |
| Used to lock threads. | |
Classes | |
| class | FindResult |
| Internal class used by find() functions. More... | |
Construct the locus from an OObject, Model and View.
This initialises the locus of points to represent something sensible within the view.
References jscicalc.graph.Locus.incrementValue, jscicalc.graph.Locus.lock, jscicalc.graph.Locus.path, jscicalc.graph.Locus.setup(), jscicalc.Substitution.Substitution(), and jscicalc.graph.Locus.substitution.
| void jscicalc.graph.Locus.setup | ( | View | view | ) |
Set or reset the information required.
This should be done each time the view transformation of view size changes.
| view | The View |
References jscicalc.graph.Locus.restart, and jscicalc.graph.Locus.thread.
Referenced by jscicalc.graph.Locus.Locus().
| void jscicalc.graph.Locus.run | ( | ) |
Takes a view and updates the path from it using the OObject belonging to this.
References jscicalc.graph.PointList.addToPath(), jscicalc.graph.Locus.delta, jscicalc.graph.Locus.distance, jscicalc.graph.View.distance(), jscicalc.graph.Locus.function(), jscicalc.graph.View.getTransformation(), jscicalc.graph.Locus.increment(), jscicalc.graph.Locus.lock, jscicalc.graph.Locus.path, jscicalc.graph.Locus.restart, jscicalc.graph.Locus.thread, and jscicalc.graph.Locus.view.
| void jscicalc.graph.Locus.updatePath | ( | ) |
Update the path.
References jscicalc.graph.Locus.lock, jscicalc.graph.Locus.restart, and jscicalc.graph.Locus.thread.
Referenced by jscicalc.graph.Model.updatePaths().
| void jscicalc.graph.Locus.stop | ( | ) |
| OObject jscicalc.graph.Locus.substitute | ( | double | x | ) | [protected] |
Set substitution to variable = x.
| x | The value to be substituted |
References jscicalc.Substitution.add(), jscicalc.OObject.auto_simplify(), jscicalc.graph.Locus.oobject, jscicalc.OObject.substitute(), jscicalc.graph.Locus.substitution, and jscicalc.graph.Locus.variable.
Referenced by jscicalc.graph.Locus.function().
| double jscicalc.graph.Locus.function | ( | double | x, | |
| Transformation | t | |||
| ) | [protected] |
Get value of function at x if it is real and NaN otherwise.
Use view coördinates and transform to Model to do the calculation
| x | The value to be substituted | |
| t | The Transformation used when representing this Locus |
References jscicalc.graph.Locus.epsilon, jscicalc.complex.Complex.imaginary(), jscicalc.complex.Complex.real(), jscicalc.graph.Locus.substitute(), jscicalc.graph.Transformation.toModelX(), and jscicalc.graph.Transformation.toViewY().
Referenced by jscicalc.graph.Locus.run().
Draw the element on the view using the graphics object supplied.
Implements jscicalc.graph.Element.
References jscicalc.graph.Locus.path.
| double jscicalc.graph.Locus.increment | ( | ) | [package] |
Get incrementValue.
References jscicalc.graph.Locus.incrementValue.
Referenced by jscicalc.graph.Locus.run().
final jscicalc.expression.Variable jscicalc.graph.Locus.variable = new jscicalc.expression.Variable( new jscicalc.pobject.Variable( 'x' ) ) [static, protected] |
We substitute for variable x: so we need a variable.
Referenced by jscicalc.graph.Locus.substitute().
We use substitution to substitute values for x.
Referenced by jscicalc.graph.Locus.Locus(), and jscicalc.graph.Locus.substitute().
final double jscicalc.graph.Locus.epsilon = 1e-32 [static, protected] |
Limit point at which imaginary part is considered zero.
Referenced by jscicalc.graph.Locus.function().
final double jscicalc.graph.Locus.delta = 1e-8 [static, protected] |
double jscicalc.graph.Locus.incrementValue = 10 [private] |
The standard x increment (in view) for this locus.
Referenced by jscicalc.graph.Locus.increment(), and jscicalc.graph.Locus.Locus().
double jscicalc.graph.Locus.distance = 16 [private] |
final OObject jscicalc.graph.Locus.oobject [private] |
java.awt.geom.Path2D.Double jscicalc.graph.Locus.path [private] |
A path representing this locus.
Referenced by jscicalc.graph.Locus.draw(), jscicalc.graph.Locus.Locus(), and jscicalc.graph.Locus.run().
View jscicalc.graph.Locus.view [private] |
Thread jscicalc.graph.Locus.thread [private] |
Set thread to null to terminate it.
Referenced by jscicalc.graph.Locus.run(), jscicalc.graph.Locus.setup(), jscicalc.graph.Locus.stop(), and jscicalc.graph.Locus.updatePath().
Object jscicalc.graph.Locus.lock [private] |
Used to lock threads.
Referenced by jscicalc.graph.Locus.Locus(), jscicalc.graph.Locus.run(), and jscicalc.graph.Locus.updatePath().
java.util.concurrent.atomic.AtomicBoolean jscicalc.graph.Locus.restart [package] |
Flag to indicate that an update should restart as soon as possible.
Referenced by jscicalc.graph.Locus.run(), jscicalc.graph.Locus.setup(), and jscicalc.graph.Locus.updatePath().
1.5.5