This class represents the locus of an OObject (usually as a graph y=f(x)). More...

Classes | |
| class | FindResult |
| Internal class used by find() functions. More... | |
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. | |
This class represents the locus of an OObject (usually as a graph y=f(x)).
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.
Draw the element on the view using the graphics object supplied.
Implements jscicalc.graph.Element.
References jscicalc.graph.Locus.path.
| 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().
| double jscicalc.graph.Locus.increment | ( | ) | [package] |
Get incrementValue.
References jscicalc.graph.Locus.incrementValue.
Referenced by jscicalc.graph.Locus.run().
| 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.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.stop | ( | ) |
Stop the thread as soon as possible.
References jscicalc.graph.Locus.thread.
| 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().
| 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().
final double jscicalc.graph.Locus.delta = 1e-8 [static, protected] |
Limit point for x distances.
Referenced by jscicalc.graph.Locus.run().
double jscicalc.graph.Locus.distance = 16 [private] |
The minimum distance between points.
Referenced by jscicalc.graph.Locus.run().
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().
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().
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().
final OObject jscicalc.graph.Locus.oobject [private] |
The OObject represented by this locus.
Referenced by jscicalc.graph.Locus.substitute().
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().
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().
We use substitution to substitute values for x.
Referenced by jscicalc.graph.Locus.Locus(), and jscicalc.graph.Locus.substitute().
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().
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().
View jscicalc.graph.Locus.view [private] |
Used for finding the View.
Referenced by jscicalc.graph.Locus.run().
1.7.1