Educational Index Award Dr. Matrix Science Award IBM : Educational Java links
Imaging Raytracer :
Rendering the Quadric Surfaces
My own raytracing applet

With this applet you can generate all 6 of the Quadric Surfaces, and the cylinder, and you can do all that in about a minute once the applet is loaded if you're using a typical 100 M Hz machine.
Quadric Surface

Equation

sphere   ( elipsoid ) x^2 + y^2 + z^2 =   1
cone x^2 + y^2 - z^2 =   0
hyperboloid of one sheet x^2 + y^2 - z^2 =   1
hyperboloid of two sheets x^2 + y^2 - z^2 = -1
paraboloid x^2 + y^2 - z     =   0
hyperboloic paraboloid x^2 - y^2 - z     =   0
cylinder x^2 + y^2         =   1

Your browser is not Java enabled !
Your browser can't run Java applets as it is configured.
Get Netscape 3.0 or Microsoft Internet Explorer 3.0.
If you are already using one of these, check your settings.
Java Applet:   Imaging Raytracer

Instructions:
  • 1 ) Choose a surface:   click in the list box (top left corner).
  • 2 ) Move the eye position:   do any of the following:
    • a ) click on the dial to select a view angle.
    • b ) click on the scrollbar to change the view height.
    • c ) click on the map while thinking of the implied globe.
    • d ) click on the scrollbar, then use the arrow keys.
            eg. the 'right arrow' effects a clockwise rotation.
  • 3 ) Press the "[ Redraw ]" button by clicking on it.
  • 4 ) Sit back and be amazed, or maybe amused.

Note:

The sphere has a radius of 5 and all the other curves are clipped by a bounding cube with x, y, and z all bounded by (+/-) 4.

All the surfaces have horizontal stripes at integer "z" elevations.

You can have any of the surfaces sit on one of the ubiquitous checkerboard surfaces, or not, by clicking on the in the checkboard option box.

I'm faking the illumination model; there are no light sources, the brightness varies directly with the 'z' value of the intercept. Everything that I've written works FLAWLESSLY, but it isn't done yet. Tomorrow things will be different....

In the next few weeks I will be implementing an illumination model and will allow you to specify more of the parameters, and coming really soon: raytracing the planet earth , viewed from any perspective and time of day.

It takes about 10 seconds for this to run on my machine ( Windows-95 / Pentium 83 OD ). The applet times itself, look for the "Elapsed time:" line in the text output area.

I'm generally pleased with speed of this applet given all the whinning you hear about 'windoze' and that Java is slow because it's interpretted, has extensive error checking, blah, blah, blah.

Now if I could produce a series of frames, and allow you to save it as a an animated gif image... which is do-able... I think...

This applet was developed for, and tested on all the major software platforms,
    and each of these companies, they want you to know   . . .

Best viewed with
Netscape Navigator
Netscape Navigator 3.0
Download Netscape Now!


Best experienced with
Microsoft Internet Explorer
Click Here to start.


Hot Java
Sun HotJava Browser


Java is cool !
Sun's Technical Stuff


IBM Supports Java
IBM Java Developer


JARS Registered
Java Applet Rating Service

we know . . .

open systems, competition & free software are good,   Long Live Java.



More Java:

  Java - VRML - Math :   Toying with Reality & working on games

( games, graphs, geometry, Calculus )

    Java: An Introduction :   A visual tour of several applets.
    Java Animation :     cycling through images
    Java Drawing :         A Draw / Scribble / Paint applet   (interactive)

See also:   An Introduction to raytracing.
Return:
    Contents
    Imaging the Imagined : Raytracing tips from da Vinci and me. ( my home page )

If you want to see what it looks like on my machine click here.   ( to see a static image )

( Note:   you may have to ALT-left arrow to return )

This applet is best viewed with higher resolution screens       ( 1024 x 768 ),
although it was designed to run adequately on low res screens (   680 x 480 ).


[home.gif] Contents Page
Last modified: 05/22/97
First Created: 03/12/97
stamped envelope E- mail: "Webmaster"

Copyright © 1997 by Paul Flavin.   All rights reserved.