# DMelt:Plots/JavaView

## Using JavaView

3D geometry viewer and a mathematical visualization software, called JavaView (http://www.javaview.de/) can be used with the class jhplot.HJavaView. It should be noticed that the license of JavaView should be put to the file "lib/javaview/rsrc/jv-lic.lic" relative to DataMelt installation. Without this license, the program is fully functional but you will see a message dialog about the license.

The package allows:

Visualize and study your own geometry models. The data files may reside on your local computer or somewhere on the internet. Simply browse your local disk or type the URL of a model using a web form.

- Solve ordinary differential equations interactively.
- Calculate the zero points of functions.
- Measure distances on curved polyhedral surfaces using straightest or shortest geodesic lines.
- Computes algebraic surfaces given as zero set of a polynomial function.

DataMelt allows programming and visualizing 3D mathematical objects using the Python language (as well as Groovy, Ruby). Here is a Jython example that shows
a snail in 3D interactive viewer:

The code is shown below:

No access to this part. DataMelt members can view this part after login to member area. |

One can draw several 3D objects which belong to jv.geom.PgElementSet class.

## Showing functions in 3D

Here is an example which illustrates how to calculate parametric functions. Here is an example that illustrates how to create Kuen Surface

The code is shown below uses the jvx.surface.PgParmSurface class:

No access to this part. DataMelt members can view this part after login to member area. |

DataMelt supports drawing all JavaView classes that inherent from the Java class jv.project.PgGeometry. Below are several examples implemented using the Python language:

## Drawing standard 2D functions

You can plot the standard jhplot.F2D functions using jhplot.HJavaView. You can use either the "draw(F2D)" method, or "add(F2D)" method. The latter returns jv.project.PgGeometry object which can be used to modify style of the function (color, transparency). For example,

from jhplot import HJavaView,F2D c1=HJavaView() f1=F2D("x*y",-1,1,-1,1) obj=c1.add(f1) # now you can add some style c1.draw(obj)

Similarly, one can draw arrays of functions, or one can repeat "draw()" to overlay functions.