<- previous index next ->
There are many interesting curves and surfaces that are represented by parametric equations. These may be used in GUI applications. My reference book is: "CRC Standard Curves and Surfaces" by David von Seggern, CRC Press, ISBN 0-8493-0196-3. The uses include defining motion such as the cycloid for making the robot walk or 3D objects that may be useful or just interesting. To understand the examples below, you will have to run the program read the code. The screen shots are just small samples. curv_surf.c The basic idea is to have a standard way to size and parameterize curves and surfaces. Then a standard set of points can be generated and these points used either for static drawing or for dynamic movement, as in a target for a game. A few simple, crude, codes for spiral and flower: Spiral.java spiral_tk.py3 turtle_spiral.py3 spiral.py3 source code spiral_py3.dat for making .stl spiral_py3.stl for 3D printer flower.java 3D surfaces are a bit more complicated. I tend to write a specific program to generate the 3D surface in some standard format, I use .dat, then I can combine the 3D objects into a scene. make_spiral_635.c is a typical program to generate a 3D object. The output is spiral_635.dat which is not much to look at. The image drawn by light_dat.c is: spiral_635_3d.py3 source code A second example, to see the great similarity, is: make_helix_635.c is a typical program to generate a 3D object. The output is helix_635.dat which is not much to look at. The image drawn by light_dat.c is: Note that light_dat.c uses datread.h and datread.c Thus you can read, write and clean the .dat files. Cleaning, removing redundant vertices, is necessary for good quality rendering when normals are going to be interpolated. From the book "Curves and Surfaces" a cylindrical spiral was easily generated as shown in make_cyl_spiral_635.c that made the file cyl_spiral_635.dat file displayable in light_dat as: The same code was dropped into an OpenGL program to create surf3d.c showing the object as a wireframe. Many python examples in my download directory: shape_tk.py3 The reason I had so many arcs, I wanted to generate pattern: shape32.py3 snowflake.py3 New topic: There are many ways to run "apps" applications over the Internet in a browser. Plain HTML can be interactive, Java applets and JavaScript are available along with many others. Now, some want to go significantly farther. The goal is to have to complete application on a server rather than have the user istall the application on their computer. Some will keep the users data on the same server. Do you trust that? RIA, Rich Internet Applications, fully interactive that can have fancy graphics use databases may use AJAX, Asynchronous JavaScript and Xml, Flash (or Microsofts competing Silverlight) in your browser. Now, groups are working on the equivalent of AppletViewer that runs Java Applets without a browser. Mozilla Prism is one of the new RIA Platforms, for Windows, Linux and MacOSX. You can not stop progress. HTML 5 is available and Flash 5 is available.
<- previous index next ->
Many web sites on Java GUI, AWT, Swing, etc. Many web sites on Python wx, tk, qt, etc.