Overview  Model Viewer  ODE Solver  RootFinder  Geodesic  Algebraic  Knots  Unfolder 

Algebraic Surface Solver

by Richard Morris

Algebraic surfaces are level sets of a scalar valued function F(x,y,z) from R3 to R where the function expression of F consists of algebraic operations of the x, y and z variables only.

This web service calculates 3D models using JavaView on the client side and Richard Morris' LSMP package on the server side. Note, the first download of the applet and the model may take a while ...

How to Calculate a Surface

  1. Enter a definition of the surface in the JavaView panel, or select a predefined surface from the list.
  2. Press the Calculate button at the bottom of the applet window.
  3. After a while the new surface should appear. If the surface has missing faces then you might need to increase the timeout threshold.
  4. Once the surface has been created, drag the mouse in the display to rotate it.
    More descriptions are given below on this web page.

Syntax of Definitions

The basic syntax is quite simple: the formula should involve x y and z and should be an implicit polynomial equation:

some polynomial function of x, y, z = 0;

A semi colon is needed at the end of the equation. x^2 means x squared. For example

x^2 - y^2 - z^2 = 0;

There is no need to include a * between terms to be multiplied, only a space is needed. For example x y is the same as x*y. There are quite a few more sophisticated features of the syntax which will appear below soon.

Multi-line equations can be used. All the equations after the first will be substituted into the first equation. For example

x^2 - w = 0; w = y^2 + z^2;

is equivalent to the equation given above.

Some example definitions are listed here.

Domain of Interest

These parameters control the range over which the surface is calculated. It is best if unequal values are chosen for the ranges. Otherwise certain degeneracies may occur which can lead to poorer results.

Resolution Control

Resolution parameters control how detailed the resulting mesh will be. Each of these must be a power of two. The box specified by the range is split into a number of smaller boxes and points of the faces of these boxes will be found together with any singularities lying in the middle of them. The Coarse parameter specifies the number of smaller boxes, by default 8 along the x, y, z directions, i.e. 512 boxes. The Fine parameter specifies the smallest box size used to find a singularity. The Face specifies how accurately each face of the box is subdivided and the edge parameter specifies how accurately each edge is subdivided.

Generally you will just want to change the Coarse parameter, but lowering the other parameters may give quicker results. Not much will be gained by increasing them. As a rule you should keep Coarse < Fine < Face < Edge or the results will be unpredictable.

Several other options are available in this panel:

Create New Geometries

Normally the new geometry created will replace the existing one. However you might want to draw a sequence of surfaces, e.g. level sets of

F(x,y,z) = a

for different values of a. If this is option is on a new geometry will be created each time, the names will be like asurf {1}, asurf {2}. Only the last of these geometries can be subsequently changed.

Draw in Colour

By default the surface will be coloured according to the x,y,z values of individual points. This can be switched off by deselecting this option. The surface will be a uniform light blue colour. This can be useful if you want to colour different surfaces different colours by using the material panels.

Keep Material Properties

By default the surface will be drawn with faces (elements) visible, edges, lines and vertices not visible. If you want to keep the existing properties (say edges visible) then select this option.


If a degenerate surface is specified the program can take a very long time to run. To prevent this from happening the CGI program will timeout after a certain time. This may mean the surface will not be calculated properly. If you want to calculate more complicated surfaces please send an email to Richard Morris at pfaf@webmaster.org or look at his website and he'll provide a version you can run at home which does not have the timeout restriction.

Using the Display

Press the right mouse button to select major interaction mode from the popup menu, or use keyboard keys to temporarily switch between different modes (just keep a button pressed to switch mode temporarily). Some essential modes are:

o Rotate surface (this Orbit mode is the default mode)
s Scale surface, drag in vertical direction
t Translate surface in viewing plane
r Reset camera and display, object returns to default position
F1 or Ctrl-m
Show control window
Help With all keyboard shortcuts, and help on problems.

To modify appearance of the geometry select the material panel from the JavaView window via the menu command Inspector - Object - Material. Be sure that the mouse focus is inside the viewer otherwise, e.g., the window manager might react. To hide the control panel press F2.

Web page, applet and Algebraic Surface program by Richard Morris, copyright 1990-2003.
For more information on the software, related stuff e.g. algebraic curves and intersections see the About page and also Richard Morris' website.
Maths home page and Personal home page
Email pfaf@webmaster.org or rjm@amsta.leeds.ac.uk.

Creative Commons License The software is licensed under the Creative Commons License. (You can copy, distribute and display this work but: Attribution is required, its for Non-Commercial purposes, and it's Share Alike (GNUish/copyleft) i.e. has an identical license.)
© 1997-2017 Last modified: 22.06.2017 --- www.javaview.de --- The JavaView Project