jhplot
Class HPlotMX
- java.lang.Object
-
- jhplot.HPlotMX
-
public class HPlotMX extends java.lang.Object
Interactive canvas for visualizing and experimenting with a variety of mathematical objects in 2D and 3D. It is based 3D-XplorMath-J, but rewritted to allow vector graphics rendering. Thus it can be a bit slower, but the quality of graphics is much higher (graphics can be exported to EPS and PDF).
-
-
Constructor Summary
Constructors Constructor and Description HPlotMX()
Construct a canvas with a plot with the default parameters.HPlotMX(java.lang.String exhibitName)
Create canvas and show mathematical object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
clear()
Clear the current graph including graph settings.void
close()
Close the canvas (and dispose all components) Note: a memory leak is found - no time to study it.void
doc()
Show online documentation.void
draw(ConformalMap exhibit)
Draw conformal map object.void
draw(Exhibit exhibit)
Draw mathematical object in form of exhibit.void
draw(Exhibit exhibit, View view)
Draw any mathematical object in form of exhibit with a given view.void
draw(RegularPolyhedron exhibit)
Draw RegularPolyhedron object (parametric function defining a surface).void
draw(SpaceCurveParametric exhibit)
Draw parametric space curvesvoid
draw(SurfaceImplicit exhibit)
Draw mathematical SurfaceImplicit object (parametric function defining a surface).void
draw(SurfaceParametric exhibit)
Draw mathematical SurfaceParametric object (parametric function defining a surface).boolean
export(java.lang.String file)
Export graph into an image file.Display
getDisplay()
Get the current display.View
getView()
Get current view.WindowXM
getWindowXM()
Get the current frame.void
visible()
Show the canvasvoid
visible(boolean vs)
Set the canvas frame visible or not
-
-
-
Constructor Detail
-
HPlotMX
public HPlotMX(java.lang.String exhibitName)
Create canvas and show mathematical object. If the input ends with ".xml", it is assumed to be file. The file cab be on URL (input must start with http), or local file (input must start as file:). If the input does not have ".xml", it is assumed to be class name with object.- Parameters:
exhibitName
- exhibitName object to be shown.
-
HPlotMX
public HPlotMX()
Construct a canvas with a plot with the default parameters.
-
-
Method Detail
-
clear
public void clear()
Clear the current graph including graph settings. Note: the current graph is set by the cd() method
-
draw
public void draw(Exhibit exhibit)
Draw mathematical object in form of exhibit. The default view will be applied.- Parameters:
exhibit
- mathematical object to be shown.
-
draw
public void draw(SurfaceParametric exhibit)
Draw mathematical SurfaceParametric object (parametric function defining a surface).- Parameters:
exhibit
- parametric function to draw surface
-
draw
public void draw(SurfaceImplicit exhibit)
Draw mathematical SurfaceImplicit object (parametric function defining a surface).- Parameters:
exhibit
- parametric function to draw surface
-
draw
public void draw(RegularPolyhedron exhibit)
Draw RegularPolyhedron object (parametric function defining a surface).- Parameters:
exhibit
- RegularPolyhedron
-
draw
public void draw(ConformalMap exhibit)
Draw conformal map object.- Parameters:
exhibit
- conformal map
-
draw
public void draw(SpaceCurveParametric exhibit)
Draw parametric space curves- Parameters:
exhibit
- parametric space curves.
-
draw
public void draw(Exhibit exhibit, View view)
Draw any mathematical object in form of exhibit with a given view.- Parameters:
exhibit
- mathematical object to be shown.view
- View of this exhibit.
-
export
public boolean export(java.lang.String file)
Export graph into an image file. The the image format is given by extension. "png", "jpg", "eps", "pdf", "svg". In case of "eps", "pdf" and "svg", vector graphics is used.- Parameters:
filename
- file name
-
getWindowXM
public WindowXM getWindowXM()
Get the current frame.- Returns:
- current frame.
-
getDisplay
public Display getDisplay()
Get the current display.- Returns:
- current display.
-
getView
public View getView()
Get current view.- Returns:
- current view.
-
visible
public void visible(boolean vs)
Set the canvas frame visible or not- Parameters:
vs
- (boolean) true: visible, false: not visible
-
visible
public void visible()
Show the canvas
-
close
public void close()
Close the canvas (and dispose all components) Note: a memory leak is found - no time to study it. set to null all the stuff
-
doc
public void doc()
Show online documentation.
-
-
DMelt 3.0 © DataMelt by jWork.ORG