This is an autogenerated patch header for a single-debian-patch file. The
delta against upstream is either kept as a single patch, or maintained
in some VCS, and exported as a single patch instead of more manageable
atomic patches.

--- gle-3.1.2.orig/configure.ac
+++ gle-3.1.2/configure.ac
@@ -52,26 +52,26 @@ CFLAGS="${CFLAGS} -Wall"
 # Strict, or lenient tesselator?
 AC_ARG_ENABLE(lenient-tess,
        [  --enable-lenient-tess    compile for lenient tesselator],
-       AC_DEFINE(LENIENT_TESSELATOR,1),
-       AC_DEFINE(DELICATE_TESSELATOR,1) )
+       AC_DEFINE(LENIENT_TESSELATOR,1,[Define this for a lenient tesselator]),
+       AC_DEFINE(DELICATE_TESSELATOR,1,[Define this for a deliacate tesselator]) )
 
 # Disable texture mapping?
 AC_ARG_ENABLE(auto-texture,
        [  --disable-auto-texture   compile with texture mapping disabled],
-       AC_DEFINE(AUTO_TEXTURE,0),
-       AC_DEFINE(AUTO_TEXTURE,1) )
+       AC_DEFINE(AUTO_TEXTURE,0,[Define this to disable texture mapping]),
+       AC_DEFINE(AUTO_TEXTURE,1,[Define this to enable texture mapping]) )
 
 # Should we build for old IrisGL?
 AC_ARG_ENABLE(irisgl,
        [  --enable-irisgl          compile for old IrisGL/GL-3.2],
-       AC_DEFINE(GL_32,1),
-       AC_DEFINE(OPENGL_10,1) )
+       AC_DEFINE(GL_32,1,[Define this if you have IrisGL or GL 3.2]),
+       AC_DEFINE(OPENGL_10,1,[Define this if you have OpenGL]) )
 
 AC_ARG_ENABLE( debug,
        [  --enable-debug           compile with debugging flags set],
        CFLAGS="${CFLAGS} -g"
        LDFLAGS="${LDFLAGS} -g"
-       AC_DEFINE(DEBUG_OUTPUT,1),  )
+       AC_DEFINE(DEBUG_OUTPUT,1,[Define this if you want debugging info]),  )
 
 AC_ARG_ENABLE( profile,
        [  --enable-profile         compile with profiling set],
--- gle-3.1.2.orig/doc/html/index.html
+++ gle-3.1.2/doc/html/index.html
@@ -13,10 +13,6 @@
 <a href="http://www.opengl.org/">
 <img align=right src="ogla_sm.gif" alt="OpenGL Logo">
 </a>
-<a href="http://sourceforge.net"> 
-<img src="http://sourceforge.net/sflogo.php?group_id=5539" 
-     align=right width="88" height="31" border="0" alt="SourceForge Logo">
-</a>
 <br>
 
 <h2>The Hard Facts</h2>
--- /dev/null
+++ gle-3.1.2/depcomp
@@ -0,0 +1,479 @@
+#! /bin/sh
+
+# depcomp - compile a program generating dependencies as side-effects
+# Copyright 1999, 2000, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+# `libtool' can also be set to `yes' or `no'.
+
+if test -z "$depfile"; then
+   base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
+   dir=`echo "$object" | sed 's,/.*$,/,'`
+   if test "$dir" = "$object"; then
+      dir=
+   fi
+   # FIXME: should be _deps on DOS.
+   depfile="$dir.deps/$base"
+fi
+
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+  stat=$?
+
+  if test -f "$tmpdepfile"; then :
+  else
+    stripped=`echo "$stripped" | sed 's,^.*/,,'`
+    tmpdepfile="$stripped.u"
+  fi
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    outname="$stripped.o"
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      tmpdepfile1="$dir.libs/$base.lo.d"
+      tmpdepfile2="$dir.libs/$base.d"
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1="$dir$base.o.d"
+      tmpdepfile2="$dir$base.d"
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2"
+      exit $stat
+   fi
+
+   if test -f "$tmpdepfile1"; then
+      tmpdepfile="$tmpdepfile1"
+   else
+      tmpdepfile="$tmpdepfile2"
+   fi
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
--- gle-3.1.2.orig/man/gleSetNumSides.man
+++ gle-3.1.2/man/gleSetNumSides.man
@@ -21,7 +21,7 @@ with a polygon (of 20 sides by default).
 be used to change the default number of sides in this cross-section.
 A smaller number of sides can typically be drawn much faster, at
 the loss of some visual accuracy.  Increasing the number of sides to
-more than 20 will typically have no noticable visual effect.
+more than 20 will typically have no noticeable visual effect.
 
 .SH BUGS
 
--- gle-3.1.2.orig/mkinstalldirs
+++ gle-3.1.2/mkinstalldirs
@@ -1,32 +1,111 @@
-#!/bin/sh
+#! /bin/sh
 # mkinstalldirs --- make directory hierarchy
 # Author: Noah Friedman <friedman@prep.ai.mit.edu>
 # Created: 1993-05-16
-# Last modified: 1994-03-25
 # Public domain
 
 errstatus=0
+dirmode=""
 
-for file in ${1+"$@"} ; do 
-   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
-   shift
-
-   pathcomp=
-   for d in ${1+"$@"} ; do
-     pathcomp="$pathcomp$d"
-     case "$pathcomp" in
-       -* ) pathcomp=./$pathcomp ;;
-     esac
-
-     if test ! -d "$pathcomp"; then
-        echo "mkdir $pathcomp" 1>&2
-        mkdir "$pathcomp" || errstatus=$?
-     fi
+usage="\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
 
-     pathcomp="$pathcomp/"
-   done
+# process command line arguments
+while test $# -gt 0 ; do
+  case $1 in
+    -h | --help | --h*)         # -h for help
+      echo "$usage" 1>&2
+      exit 0
+      ;;
+    -m)                         # -m PERM arg
+      shift
+      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+      dirmode=$1
+      shift
+      ;;
+    --)                         # stop option processing
+      shift
+      break
+      ;;
+    -*)                         # unknown option
+      echo "$usage" 1>&2
+      exit 1
+      ;;
+    *)                          # first non-opt arg
+      break
+      ;;
+  esac
+done
+
+for file
+do
+  if test -d "$file"; then
+    shift
+  else
+    break
+  fi
+done
+
+case $# in
+  0) exit 0 ;;
+esac
+
+case $dirmode in
+  '')
+    if mkdir -p -- . 2>/dev/null; then
+      echo "mkdir -p -- $*"
+      exec mkdir -p -- "$@"
+    fi
+    ;;
+  *)
+    if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+      echo "mkdir -m $dirmode -p -- $*"
+      exec mkdir -m "$dirmode" -p -- "$@"
+    fi
+    ;;
+esac
+
+for file
+do
+  set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+  shift
+
+  pathcomp=
+  for d
+  do
+    pathcomp="$pathcomp$d"
+    case $pathcomp in
+      -*) pathcomp=./$pathcomp ;;
+    esac
+
+    if test ! -d "$pathcomp"; then
+      echo "mkdir $pathcomp"
+
+      mkdir "$pathcomp" || lasterr=$?
+
+      if test ! -d "$pathcomp"; then
+  	errstatus=$lasterr
+      else
+  	if test ! -z "$dirmode"; then
+	  echo "chmod $dirmode $pathcomp"
+    	  lasterr=""
+  	  chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+  	  if test ! -z "$lasterr"; then
+  	    errstatus=$lasterr
+  	  fi
+  	fi
+      fi
+    fi
+
+    pathcomp="$pathcomp/"
+  done
 done
 
 exit $errstatus
 
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# End:
 # mkinstalldirs ends here
--- /dev/null
+++ gle-3.1.2/man/gle.3gle
@@ -0,0 +1,66 @@
+.\"
+.\" GLE Tubing & Extrusions Library Documentation 
+.\"
+.TH gle 3GLE "3.0" "GLE" "GLE"
+.SH NAME
+gle - an introduction to the GLE Tubing & Extrusions Library
+.SH SYNOPSIS
+.nf
+.LP
+#include <GL/gle.h>
+.fi
+.SH DESCRIPTION
+The GLE Tubing and Extrusion Library is a graphics application
+programming interface (API). The library consists of a number of "C"
+language subroutines for drawing tubing and extrusions. The library is
+distributed in source code form, in a package that includes
+documentation, a VRML proposal, Makefiles, and full source code and
+header files. It uses the OpenGL (TM) programming API to perform the
+actual drawing of the tubing and extrusions.
+
+A "sweep" or "extrusion" is a 2D contour (polyline) that is swept or
+extruded along a 3D path (polyline). For example, sweeping a circle
+along a straight line will generate a cylinder.  Sweeping a circle
+along a circular path will generate a doughnut (torus).
+
+The library also includes a set of utility routines for drawing some of
+the more common extruded shapes: a polycylinder, a polycone, a
+generalized torus (circle swept along a helical path), a "helix"
+(arbitrary contour swept along a helical path) and a "lathe" (arbitrary
+contour swept along a helical path, with torsion used to keep the
+contour aligned).
+
+The most general extrusion supported by this library allows an
+arbitrary 2D contour to be swept around an arbitrary 3D path. A set of
+normal vectors can be specified to go along with the contour; the
+normal vectors determine the appearance of the contour when lighting is
+turned on. A set of colors and affine matrices can be specified to go
+along with the 3D path.  The colors are used to color along the path.
+The affine matrices are used to operate on the contour as it is swept
+along. If no affine matrices are specified, the contour is extruded
+using the mathematical concept of "parallel translation" or "Gaussian
+translation". That is, the contour is moved (and drawn) along the
+extrusion path in a "straight" manner. If there are affine matrices,
+they are applied to the contour at each extrusion segment before the
+segment is drawn.
+
+The affine matrices allow work in a quasi-non-Euclidean space. They
+essentially allow the contour to be distorted as it is swept along. The
+allow the contour to be rotated, translated and rescaled as it is
+drawn. For example, a rescaling will turn a polycylinder into a
+poly-cone, since the circle that is being extruded is scaled to a
+different size at each extrusion vertex. A rotation allows the contour
+to be spun around while it is being extruded, thus for instance
+allowing drill-bit type shapes to be drawn. A translation allows the
+appearance of shearing in real space; that is, taking a contour and
+displacing it, without otherwise bending it. Note that the affines are
+2x3 matrices, not 3x4 matrices, since they apply to the 2D contour as
+it is being extruded.
+.SH WEB SITE
+http://linas.org/gle/index.html
+.SH SEE ALSO
+gleExtrusion, gleHelicoid, gleLathe, glePolyCone, glePolyCylinder,
+gleScrew, gleSetJoinStyle, gleSpiral, gleSuperExtrusion, gleTextureMode,
+gleToroid, gleTwistExtrusion, gleTwistExtrusion, gleSuperExtrusion
+.SH AUTHOR
+Linas Vepstas (linas@linas.org)
--- /dev/null
+++ gle-3.1.2/man/gleExtrusion.3gle
@@ -0,0 +1,57 @@
+.\"
+.\" GLE Tubing & Extrusions Library Documentation 
+.\"
+.TH gleExtrusion 3GLE "3.0" "GLE" "GLE"
+.SH NAME
+gleExtrusion - Extrude arbitrary 2D contour along arbitrary 3D path.
+.SH SYNTAX
+.nf
+.LP
+void gleExtrusion (int ncp,
+                gleDouble contour[][2],
+                gleDouble cont_normal[][2],
+                gleDouble up[3],
+                int npoints,
+                gleDouble point_array[][3],
+                float color_array[][3]);
+.fi
+.SH ARGUMENTS
+.IP \fIncp\fP 1i
+number of contour points
+.IP \fIcontour\fP 1i
+2D contour
+.IP \fIcont_normal\fP 1i
+2D contour normals
+.IP \fIup\fP 1i
+up vector for contour
+.IP \fInpoints\fP 1i
+numpoints in poly-line
+.IP \fIpoint_array\fP 1i
+polyline vertices
+.IP \fIcolor_array\fP 1i
+colors at polyline verts
+.SH DESCRIPTION
+
+Extrude arbitrary 2D contour along arbitrary 3D path. The argument
+"contour" specifies the 2D contour to be extruded, while the argument
+"point_array" specifies the path along which to extrude.  The vector
+"up" defines the orientation of the contour y-axis in real 3D space.
+
+Note that neither the very first segment, nor the very last segment are
+drawn. The first and last segments serve only to define the angle of
+the join at the very ends of the polyline. Thus, to draw one segment,
+three must be specified. To draw two segments, four must be specified,
+etc.
+
+The normal array may be NULL. If it is, normal vectors will NOT be
+automatically generated, and the object will look terrible when lit.
+
+The color array may be NULL. If NULL, the current color is used. If not
+NULL, the glColor3f() routine is used to set the color; therefore,
+specifying the glColorMaterial() subroutine before this primitive can
+be used to set diffuse, specular, ambient, etc. colors.
+
+.SH SEE ALSO
+gleTwistExtrusion, gleSuperExtrusion
+.SH AUTHOR
+Linas Vepstas (linas@linas.org)
--- /dev/null
+++ gle-3.1.2/man/gleHelicoid.3gle
@@ -0,0 +1,48 @@
+.\"
+.\" GLE Tubing & Extrusions Library Documentation 
+.\"
+.TH gleHelicoid 3GLE "3.0" "GLE" "GLE"
+.SH NAME
+gleHelicoid - Generalized torus, spiral with circle contour.
+.SH SYNTAX
+.nf
+.LP
+void gleHelicoid (gleDouble rToroid,
+                  gleDouble up[3],
+                  gleDouble startRadius,
+                  gleDouble drdTheta,
+                  gleDouble startZ,
+                  gleDouble dzdTheta,
+                  gleDouble startXform[2][3],
+                  gleDouble dXformdTheta[2][3],
+                  gleDouble startTheta,
+                  gleDouble sweepTheta);
+.fi
+.SH ARGUMENTS
+.IP \fIrToroid\fP 1i
+circle contour (torus) radius
+.IP \fIstartRadius\fP 1i
+spiral starts in x-y plane
+.IP \fIdrdTheta\fP 1i
+change in radius per revolution
+.IP \fIstartZ\fP 1i
+starting z value
+.IP \fIdzdTheta\fP 1i
+change in Z per revolution
+.IP \fIstartXform\fP 1i
+starting contour affine transformation
+.IP \fIdXformdTheta\fP 1i
+tangent change xform per revolution
+.IP \fIstartTheta\fP 1i
+start angle in x-y plane
+.IP \fIsweepTheta\fP 1i
+degrees to spiral around
+.SH DESCRIPTION
+
+Generalized Torus. Similar to gleSpiral, except contour is a circle.
+Uses gleSpiral to draw.
+
+.SH SEE ALSO
+gleSpiral, gleToroid
+.SH AUTHOR
+Linas Vepstas (linas@linas.org)
--- /dev/null
+++ gle-3.1.2/man/gleLathe.3gle
@@ -0,0 +1,62 @@
+.\"
+.\" GLE Tubing & Extrusions Library Documentation 
+.\"
+.TH gleLathe 3GLE "3.0" "GLE" "GLE"
+.SH NAME
+gleLathe - Sweep using a Z-axis shear to create an arbitrary contour along a helical path.
+.SH SYNTAX
+.nf
+.LP
+void gleLathe (int ncp,
+                gleDouble contour[][2],
+                gleDouble cont_normal[][2],
+                gleDouble up[3],
+                gleDouble startRadius,     /* spiral starts in x-y plane */
+                gleDouble drdTheta,        /* change in radius per revolution */
+                gleDouble startZ,          /* starting z value */
+                gleDouble dzdTheta,        /* change in Z per revolution */
+                gleDouble startXform[2][3], /* starting contour affine xform */
+                gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */
+                gleDouble startTheta,      /* start angle in x-y plane */
+                gleDouble sweepTheta);     /* degrees to spiral around */
+.fi
+.SH ARGUMENTS
+.IP \fIncp\fP 1i
+number of contour points
+.IP \fIcontour\fP 1i
+2D contour
+.IP \fIcont_normal\fP 1i
+2D contour normals
+.IP \fIup\fP 1i
+up vector for contour
+.IP \fIstartRadius\fP 1i
+spiral starts in x-y plane
+.IP \fIdrdTheta\fP 1i
+change in radius per revolution
+.IP \fIstartZ\fP 1i
+starting z value
+.IP \fIdzdTheta\fP 1i
+change in Z per revolution
+.IP \fIstartXform\fP 1i
+starting contour affine transformation
+.IP \fIdXformdTheta\fP 1i
+tangent change xform per revolution
+.IP \fIstartTheta\fP 1i
+start angle in x-y plane
+.IP \fIsweepTheta\fP 1i
+degrees to spiral around
+.SH DESCRIPTION
+
+Sweep an arbitrary contour along a helical path. The sweep will be
+performed as a shear along the z-axis, so that the orientation of the
+contour is displaced, rather than translated, as the contour is swept.
+
+The axis of the helix lies along the modeling coordinate z-axis.
+
+An affine transform can be applied as the contour is swept. For most
+ordinary usage, the affines should be given as NULL.
+
+.SH SEE ALSO
+gleSpiral
+.SH AUTHOR
+Linas Vepstas (linas@linas.org)
--- /dev/null
+++ gle-3.1.2/man/glePolyCone.3gle
@@ -0,0 +1,45 @@
+.\"
+.\" GLE Tubing & Extrusions Library Documentation 
+.\"
+.TH glePolyCone 3GLE "3.0" "GLE" "GLE"
+.SH NAME
+glePolyCone - Draw polycone, specified as a polyline with radii.
+.SH SYNTAX
+.nf
+.LP
+void glePolyCone(int npoints,
+                 gleDouble point_array[][3],
+                 float color_array[][3],
+                 gleDouble radius_array[]);
+.fi
+.SH ARGUMENTS
+.IP \fInpoints\fP 1i
+numpoints in poly-line
+.IP \fIpoint_array\fP 1i
+polyline vertices
+.IP \fIcolor_array\fP 1i
+colors at polyline verts
+.IP \fIradius_array\fP 1i
+cone radii at polyline
+.SH DESCRIPTION
+
+Draw polycone, specified as a polyline with radii.
+
+Note that neither the very first segment, nor the very last segment are
+drawn. The first and last segments serve only to define the angle of
+the join at the very ends of the polyline. Thus, to draw one segment,
+three must be specified. To draw two segments, four must be specified,
+etc.
+
+The color array may be NULL. If NULL, the current color is used. If not
+NULL, the glColor3f() routine is used to set the color; therefore,
+specifying the glColorMaterial() subroutine before this primitive can
+be used to set diffuse, specular, ambient, etc. colors.
+
+By default, the cross-section of the cylinder is drawn as a 20-sided
+polygon.  This number can be changed using the gleSetNumSides() routine.
+
+.SH SEE ALSO
+glePolyCylinder, gleSetNumSides
+.SH AUTHOR
+Linas Vepstas (linas@linas.org)
--- /dev/null
+++ gle-3.1.2/man/glePolyCylinder.3gle
@@ -0,0 +1,45 @@
+.\"
+.\" GLE Tubing & Extrusions Library Documentation 
+.\"
+.TH glePolyCylinder 3GLE "3.0" "GLE" "GLE"
+.SH NAME
+glePolyCylinder - Draw polycylinder, specified as a polyline. 
+.SH SYNTAX
+.nf
+.LP
+void glePolyCylinder(int npoints,
+                     gleDouble point_array[][3],
+                     float color_array[][3],
+                     gleDouble radius);
+.fi
+.SH ARGUMENTS
+.IP \fInpoints\fP 1i
+numpoints in poly-line
+.IP \fIpoint_array\fP 1i
+polyline vertices
+.IP \fIcolor_array\fP 1i
+colors at polyline verts
+.IP \fIradius\fP 1i
+cylinder radius
+.SH DESCRIPTION
+
+Draw polycylinder, specified as a polyline.
+
+Note that neither the very first segment, nor the very last segment are
+drawn. The first and last segments serve only to define the angle of
+the join at the very ends of the polyline. Thus, to draw one segment,
+three must be specified. To draw two segments, four must be specified,
+etc.
+
+The color array may be NULL. If NULL, the current color is used. If not
+NULL, the glColor3f() routine is used to set the color; therefore,
+specifying the glColorMaterial() subroutine before this primitive can
+be used to set diffuse, specular, ambient, etc. colors.
+
+By default, the cross-section of the cylinder is drawn as a 20-sided
+polygon.  This number can be changed using the gleSetNumSides() routine.
+
+.SH SEE ALSO
+glePolyCone, gleSetNumSides
+.SH AUTHOR
+Linas Vepstas (linas@linas.org)
--- /dev/null
+++ gle-3.1.2/man/gleScrew.3gle
@@ -0,0 +1,43 @@
+.\"
+.\" GLE Tubing & Extrusions Library Documentation 
+.\"
+.TH gleScrew 3GLE "3.0" "GLE" "GLE"
+.SH NAME
+gleScrew - Draws screw-type shapes.
+.SH SYNTAX
+.nf
+.LP
+void gleScrew (int ncp,
+               gleDouble contour[][2],
+               gleDouble cont_normal[][2],
+               gleDouble up[3],
+	       gleDouble startz,
+	       gleDouble endz,
+	       gleDouble twist);
+.fi
+.SH ARGUMENTS
+.IP \fIncp\fP 1i
+number of contour points
+.IP \fIcontour\fP 1i
+2D contour
+.IP \fIcont_normal\fP 1i
+2D contour normals
+.IP \fIup\fP 1i
+up vector for contour
+.IP \fIstartx\fP 1i
+start of segment
+.IP \fIendz\fP 1i
+end of segment
+.IP \fItwist\fP 1i
+number of rotations
+.SH DESCRIPTION
+
+Draws screw-type shapes. Takes a contour, and extrudes it along the
+z-axis, from a start z value of startz to an end z-value of endz.
+During the extrusion, it will spin the contour along the contour origin
+by twist degrees.
+
+.SH SEE ALSO
+gleExtrusion
+.SH AUTHOR
+Linas Vepstas (linas@linas.org)
--- /dev/null
+++ gle-3.1.2/man/gleSetJoinStyle.3gle
@@ -0,0 +1,90 @@
+.\"
+.\" GLE Tubing & Extrusions Library Documentation 
+.\"
+.TH gleSetJoinStyle 3GLE "3.0" "GLE" "GLE"
+.SH NAME
+gleSetJoinStyle, gleGetJoinStyle - Query and Set the GLE join style flags.
+.SH SYNTAX
+.nf
+.LP
+void gleSetJoinStyle (int style);
+int gleGetJoinStyle (void);
+.fi
+.SH ARGUMENTS
+.IP \fIstyle\fP 1i
+bitwise OR of flags
+.SH DESCRIPTION
+
+Query and set the GLE join style flags. This word is a bitwise OR of
+the flags described below.
+
+The initial join style is TUBE_JN_ANGLE | TUBE_JN_CAP | TUBE_NORM_FACET. 
+
+.B "Extrusion Join Styles"
+.IP \fBTUBE_JN_RAW\fP
+Draw polycylinders, polycones, extrusions, etc. with no special
+treatment of the extrusion ends.
+.IP \fBTUBE_JN_ANGLE\fP
+Draw polycylinders, polycones, extrusions, etc. by extending the
+different segments until they butt into each other with an
+angular style.
+.IP \fBTUBE_JN_CUT\fP
+Draw polycylinders, polycones, extrusions, etc. by joining together the
+different segments and slicing off the joint at half the angle between
+the segments. A cap is drawn. Note that the slicing plane runs through
+the origin of the contour coordinate system. Thus, the amount of slice
+can be varied by offsetting the contour with respect to the origin.
+
+Note that when two segments meet at a shallow angle, the cut join style
+will potentially shave off a whole lot of the contour, leading to
+"surprising" results...
+.IP \fBTUBE_JN_ROUND\fP
+Joints will be rounded. Strictly speaking, the part of the joint above
+the origin will be rounded. The part below the origin will come
+together in an angular join.
+.IP \fBTUBE_JN_MASK\fP
+Mask bits. This can be used to mask off the bit field that defines the
+join style.
+
+.B "End Caps"
+.IP \fBTUBE_JN_CAP\fP
+If this is set, a cap will be drawn at each end of the extrusion. 
+
+.B "Automatic Normal Vector Generation"
+.IP \fBTUBE_NORM_FACET\fP
+A normal vector is generated per facet. Useful for having an extrusion
+have a "faceted" look, such as when extruding a square -- each of the
+four sides of the square will look flat.
+.IP \fBTUBE_NORM_EDGE\fP
+Normal vectors are generated so that they lie along edges. Useful for
+making angular things look rounded under lighting. For example, when
+extruding a hexagon and using this flag, the hexagonal extrusion will
+look (more like a) smooth perfectly round cylinder, rather than a
+six-sided shape.
+.IP \fBTUBE_NORM_PATH_EDGE\fP
+Normal vectors are generated so that they both lie on edges, and so
+that they interpolate between neighboring segments. Useful for drawing
+"spaghetti" -- extrusions that follow a spline path.  Because the
+spline path must be "tessellated" into small straight segments, each
+segment will look straight unless this flag is set.
+.IP \fBTUBE_NORM_MASK\fP
+A mask useful for masking out the "norm" bits. 
+
+.B "Closed or Open Contours"
+.IP \fBTUBE_CONTOUR_CLOSED\fP
+If this bit is set, the contour will be treated as a "closed" contour,
+where the last point connects back up to the first. It is useful to set
+this flag when drawing closed shapes (such as extruded cylinders,
+star-shapes, I-Beams, etc. When drawing open extrusions (e.g.
+corrugated sheet metal), you DON'T want to set this flag.
+
+.SH BUGS
+
+Multiple threads using GLE share a single global join style
+(although this should be easily fixable because GLE does use
+a centralized graphics context).  
+
+.SH SEE ALSO
+gleExtrusion, gleTextureMode
+.SH AUTHOR
+Linas Vepstas (linas@linas.org)
--- /dev/null
+++ gle-3.1.2/man/gleSetNumSides.3gle
@@ -0,0 +1,35 @@
+.\"
+.\" GLE Tubing & Extrusions Library Documentation 
+.\"
+.TH gleSetNumSides 3GLE "3.0" "GLE" "GLE"
+.SH NAME
+gleSetNumSides, gleGetNumSides - Query and Set the cylinder roundness.
+.SH SYNTAX
+.nf
+.LP
+void gleSetNumSides (int nslices);
+int gleGetNumSides (void);
+.fi
+.SH ARGUMENTS
+.IP \fInslices\fP 1i
+positive integer number of slices
+.SH DESCRIPTION
+
+Query and set the GLE cylinder and cone roundness. When GLE draws
+a cylinder or a cone, it approximates the circular cross-section
+with a polygon (of 20 sides by default).  These subroutines can
+be used to change the default number of sides in this cross-section.
+A smaller number of sides can typically be drawn much faster, at
+the loss of some visual accuracy.  Increasing the number of sides to
+more than 20 will typically have no noticeable visual effect.
+
+.SH BUGS
+
+Multiple threads using GLE share a single global number of sides
+(although this should be easily fixable because GLE does use 
+a centralized graphics context).
+
+.SH SEE ALSO
+glePolyCylinder, glePolyCone
+.SH AUTHOR
+Linas Vepstas (linas@linas.org)
--- /dev/null
+++ gle-3.1.2/man/gleSpiral.3gle
@@ -0,0 +1,110 @@
+.\"
+.\" GLE Tubing & Extrusions Library Documentation 
+.\"
+.TH gleSpiral 3GLE "3.0" "GLE" "GLE"
+.SH NAME
+gleSpiral - Sweep an arbitrary contour along a helical path.
+.SH SYNTAX
+.nf
+.LP
+void gleSpiral (int ncp,
+                gleDouble contour[][2],
+                gleDouble cont_normal[][2],
+                gleDouble up[3],
+                gleDouble startRadius,     /* spiral starts in x-y plane */
+                gleDouble drdTheta,        /* change in radius per revolution */
+                gleDouble startZ,          /* starting z value */
+                gleDouble dzdTheta,        /* change in Z per revolution */
+                gleDouble startXform[2][3], /* starting contour affine xform */
+                gleDouble dXformdTheta[2][3], /* tangent change xform per revoln */
+                gleDouble startTheta,      /* start angle in x-y plane */
+                gleDouble sweepTheta);     /* degrees to spiral around */
+.fi
+.SH ARGUMENTS
+.IP \fIncp\fP 1i
+number of contour points
+.IP \fIcontour\fP 1i
+2D contour
+.IP \fIcont_normal\fP 1i
+2D contour normals
+.IP \fIup\fP 1i
+up vector for contour
+.IP \fIstartRadius\fP 1i
+spiral starts in x-y plane
+.IP \fIdrdTheta\fP 1i
+change in radius per revolution
+.IP \fIstartZ\fP 1i
+starting z value
+.IP \fIdzdTheta\fP 1i
+change in Z per revolution
+.IP \fIstartXform\fP 1i
+starting contour affine transformation
+.IP \fIdXformdTheta\fP 1i
+tangent change xform per revolution
+.IP \fIstartTheta\fP 1i
+start angle in x-y plane
+.IP \fIsweepTheta\fP 1i
+degrees to spiral around
+.SH DESCRIPTION
+
+Sweep an arbitrary contour along a helical path. 
+
+The axis of the helix lies along the modeling coordinate z-axis. 
+
+An affine transform can be applied as the contour is swept. For most
+ordinary usage, the affines should be given as NULL.
+
+The "startXform[][]" is an affine matrix applied to the contour to
+deform the contour. Thus, "startXform" of the form
+
+     |  cos     sin    0   |
+     |  -sin    cos    0   |
+
+will rotate the contour (in the plane of the contour), while 
+
+     |  1    0    tx   |
+     |  0    1    ty   |
+
+will translate the contour, and 
+
+     |  sx    0    0   |
+     |  0    sy    0   |
+
+scales along the two axes of the contour. In particular, note that 
+
+     |  1    0    0   |
+     |  0    1    0   |
+
+is the identity matrix. 
+
+The "dXformdTheta[][]" is a differential affine matrix that is
+integrated while the contour is extruded.  Note that this affine matrix
+lives in the tangent space, and so it should have the form of a
+generator.  Thus, dx/dt's of the form
+
+     |  0     r    0   |
+     |  -r    0    0   |
+
+rotate the the contour as it is extruded (r == 0 implies no rotation, r
+== 2*PI implies that the contour is rotated once, etc.), while
+
+     |  0    0    tx   |
+     |  0    0    ty   |
+
+translates the contour, and 
+
+     |  sx    0    0   |
+     |  0    sy    0   |
+
+scales it. In particular, note that 
+
+     |  0    0    0   |
+     |  0    0    0   |
+
+is the identity matrix -- i.e. the derivatives are zero, and therefore
+the integral is a constant.
+
+.SH SEE ALSO
+gleLathe
+.SH AUTHOR
+Linas Vepstas (linas@linas.org)
--- /dev/null
+++ gle-3.1.2/man/gleSuperExtrusion.3gle
@@ -0,0 +1,64 @@
+.\"
+.\" GLE Tubing & Extrusions Library Documentation 
+.\"
+.TH gleSuperExtrusion 3GLE "3.0" "GLE" "GLE"
+.SH NAME
+gleSuperExtrusion - Extrude arbitrary 2D contour along arbitrary 3D path, specifying local affine transformations.
+.SH SYNTAX
+.nf
+.LP
+void gleSuperExtrusion (int ncp,
+                gleDouble contour[][2],
+                gleDouble cont_normal[][2],
+                gleDouble up[3],
+                int npoints,
+                gleDouble point_array[][3],
+                float color_array[][3],
+		gleDouble xform_array[][2][3]);
+.fi
+.SH ARGUMENTS
+.IP \fIncp\fP 1i
+number of contour points
+.IP \fIcontour\fP 1i
+2D contour
+.IP \fIcont_normal\fP 1i
+2D contour normals
+.IP \fIup\fP 1i
+up vector for contour
+.IP \fInpoints\fP 1i
+numpoints in poly-line
+.IP \fIpoint_array\fP 1i
+polyline vertices
+.IP \fIcolor_array\fP 1i
+colors at polyline verts
+.IP \fIxform_array\fP 1i
+2D contour affine transforms
+.SH DESCRIPTION
+
+Extrude arbitrary 2D contour along arbitrary 3D path, specifying local
+affine transformations. As the contour is extruded, the affine will be
+applied to the points in the contour.
+
+The argument "contour" specifies the 2D contour to be extruded, while
+the argument "point_array" specifies the path along which to extrude.
+The vector "up" defines the orientation of the contour y-axis in real
+3D space.
+
+Note that neither the very first segment, nor the very last segment are
+drawn. The first and last segments serve only to define the angle of
+the join at the very ends of the polyline. Thus, to draw one segment,
+three must be specified. To draw two segments, four must be specified,
+etc.
+
+The normal array may be NULL. If it is, normal vectors will NOT be
+automatically generated, and the object will look terrible when lit.
+
+The color array may be NULL. If NULL, the current color is used. If not
+NULL, the glColor3f() routine is used to set the color; therefore,
+specifying the glColorMaterial() subroutine before this primitive can
+be used to set diffuse, specular, ambient, etc. colors.
+
+.SH SEE ALSO
+gleExtrusion, gleTwistExtrusion
+.SH AUTHOR
+Linas Vepstas (linas@linas.org)
--- /dev/null
+++ gle-3.1.2/man/gleTextureMode.3gle
@@ -0,0 +1,160 @@
+.\"
+.\" GLE Tubing & Extrusions Library Documentation 
+.\"
+.TH gleTextureMode 3GLE "3.0" "GLE" "GLE"
+.SH NAME
+gleTextureMode - set the type of GLE automatic texture coordinate generation.
+.SH SYNTAX
+.nf
+.LP
+void gleTextureMode (int mode);
+.fi
+.SH ARGUMENTS
+.IP \fImode\fP 1i
+bitwise OR of GLE texture mode flags
+.SH DESCRIPTION
+
+In addition to the default glTexGen modes that are supplied by OpenGL,
+the tubing library also contains some of its own automatic texture
+coordinate generation routines. In addition, user-defined texture coord
+generation routines can be supplied.
+
+To use texture mapping with the extrusion library, one must remember to "do the obvious": 
+.IP
+Enable texture mapping through OpenGL 
+.IP
+Define and load (glTexImage2D/glBindTexture) a texture 
+.IP
+If using the routine below, then disable glTexgGen 
+.LP
+gleTextureMode can be used to set the type of automatic texture
+coordinate generation to be used. The argument should be a bitwise-OR
+of any of the following flags:
+.IP \fBGLE_TEXTURE_ENABLE\fP
+If this bit is set, then texturing is enabled. If this bit is NOT set,
+then automatic texture coordinate generation is disabled.
+.LP
+The way in which the automatic texture coordinate generation occurs is
+determined by one of the following flags. One and only one of these
+should be selected at a time. These tokens are enumerants, not
+bit-flags.
+.IP \fBGLE_TEXTURE_VERTEX_FLAT\fP
+Uses the vertexes "x" coordinate as the texture "u" coordinate, and the
+accumulated segment length as the "v" coordinate.
+.IP \fBGLE_TEXTURE_NORMAL_FLAT\fP
+Uses the normal vector's "x" coordinate as the texture "u" coordinate,
+and the accumulated segment length as the "v" coordinate.
+.IP \fBGLE_TEXTURE_VERTEX_CYL\fP
+Uses u = phi/(2*pi) = arctan (vy/vx)/(2*pi) as the texture "u"
+coordinate, and the accumulated segment length as the "v" coordinate.
+In the above equation, "vx" and "vy" stand for the vertex's x and y
+coordinates.
+.IP \fBGLE_TEXTURE_NORMAL_CYL\fP
+Uses u = phi/(2*pi) = arctan (ny/nx)/(2*pi) as the texture "u"
+coordinate, and the accumulated segment length as the "v" coordinate.
+In the above equation, "nx" and "ny" stand for the normal's x and y
+coordinates.
+.IP \fBGLE_TEXTURE_VERTEX_SPH\fP
+Uses u = phi/(2*pi) = arctan (vy/vx)/(2*pi) as the texture "u"
+coordinate, and v = theta/pi = (1.0 - arccos(vz))/pi as the texture "v"
+coordinate. In the above equation, "vx","vy" and "vz" stand for the
+vertex's x, y and z coordinates.
+.IP \fBGLE_TEXTURE_NORMAL_SPH\fP
+Uses u = phi/(2*pi) = arctan (ny/nx)/(2*pi) as the texture "u"
+coordinate, and v = theta/pi = (1.0 - arccos(nz))/pi as the texture "v"
+coordinate. In the above equation, "nx","ny" and "nz" stand for the
+normal's x, y and z coordinates.
+.IP \fBGLE_TEXTURE_VERTEX_MODEL_FLAT\fP
+.IP \fBGLE_TEXTURE_NORMAL_MODEL_FLAT\fP
+.IP \fBGLE_TEXTURE_VERTEX_MODEL_CYL\fP
+.IP \fBGLE_TEXTURE_NORMAL_MODEL_CYL\fP
+.IP \fBGLE_TEXTURE_VERTEX_MODEL_SPH\fP
+.IP \fBGLE_TEXTURE_NORMAL_MODEL_SPH\fP
+These define texture mapping modes that are very similar to those
+described above, except that the untransformed vertices and/or normals
+are used. As a result, textures tends to stick to the extrusion
+according to the extrusions local surface coordinates rather than
+according to real-space coordinates. This will in general provide the
+correct style of texture mapping when affine transforms are being
+applied to the contour, since the coordinates used are those prior to
+the affine transform.
+.SH OPERATION
+To best understand how to use the above functions, it is best to
+understand how the tubing is actually drawn. Let us start by defining
+some terms. The tubing library "extrudes" a "contour" along a "path".
+The contour is a 2D polyline. The path is a 3D polyline. We use the
+word "segment" to refer to a straight-line segment of the path
+polyline. We also interchangeably use the word "segment" to stand for
+the section of the extrusion that lies along a path segment.
+
+The tubing library draws segments one at a time. It uses glPushmatrix()
+and glPopmatrix() to orient each segment along the negative z-axis. The
+segment starts at z=0 and ends at some negative z-value (equal to the
+length of the segment). The segment is then drawn by calling
+glVertex3f() (and glNormal3F()) by drawing the 2D contour at z=0 and
+again at z=-len. (Of course, if the join style is one of the fancy
+ones, then the end-points are trimmed in a variety of ways, and do not
+land exactly on z=0, or z=-len, but they do come close). Note that
+glBegin() and glEnd() are called around each segment. (Note also that
+additional glBegins/Ends may be called to draw end-caps or filleting
+triangles for the more complex join styles.)
+
+The obvious way to automatically generate textures is to warp the
+glVertex() and glNormal() functions, and compute texture coordinates
+based on the 3-space vertex and normal coordinates. This is essentially
+what the tubing code does, except that it passes some extra parameters.
+The glBegin calls are wrapped, and the integer segment number and the
+floating-point length of the segment are passed in. By knowing the
+segment number, and the segment length, the texture coordinates can be
+adjusted. Knowing the length allows the length to be accumulated, so
+that a texture is applied lengthwise along the extrusion. It is this
+accumulated length that is used in the FLAT and CYL mapping modes.
+
+For each vertex, not only are the vertex x,y,z coordinates available,
+but so is a contour vertex counter indicating which contour vertex this
+corresponds to. There is also a flag indicating whether the vertex
+corresponds to a front or back vertex (i.e. a z=0 or z=-len vertex).
+Again, this info can be used to avoid confusion when drawing the more
+complex join styles.
+.SH HINTS
+Here are a few hints, tips, and techniques:
+.IP o
+Hint: Confused? RUN THE DEMOS! The best way to understand what all the
+different texture modes are doing is to see them in action.
+.IP o
+Hint: The texture matrix can be used to your advantage! That is, you
+can use glMatrixMode(GL_TEXTURE) to control how textures are mapped to
+the surface. In particular, you may/will want to use it to to rescale
+the V coordinate.
+.IP o
+The origin of the contour will in general change the vertex x's and
+y's, thus changing the texture coordinates.
+.IP o
+The contour "up" vector will NOT influence the texture coordinates. 
+.IP o
+For the FLAT and CYL modes, the accumulated length really is the
+accumulated length of the segments in modeling coordinates. Unless the
+extrusion is very small, this length will probably be much larger than
+1.0, and so the resulting texture coordinate will wrap. You will
+generally want to rescale the "V" coordinate to make the texture map
+fit.
+.IP o
+If the texture is "swimming" around on the surface in an undesired way,
+try using the "MODEL" version of the texture generation flag.
+.IP o
+Typically, you will NOT want to use the "SPH" versions of the texture
+generation engine unless you really, really have an extrusion for which
+spherical coordinates are appropriate. Most uses of extrusions are best
+handled with the "FLAT" and "CYL" generation methods.
+.IP o
+User-defined texture generation callbacks are not currently
+implemented, but these should be very, very easy to hack in as desired.
+It should be easy to let your imagination run wild in here. Look at
+texgen.c -- what needs to be done should be obvious, I hope.  When in
+doubt, experiment.
+.SH BUGS
+Multiple threads using GLE share a single texture mode.
+.SH SEE ALSO
+gleExtrusion, gleSetJoinStyle
+.SH AUTHOR
+Linas Vepstas (linas@linas.org)
--- /dev/null
+++ gle-3.1.2/man/gleToroid.3gle
@@ -0,0 +1,48 @@
+.\"
+.\" GLE Tubing & Extrusions Library Documentation 
+.\"
+.TH gleToroid 3GLE "3.0" "GLE" "GLE"
+.SH NAME
+gleToroid - Generalized torus, lathe with circle contour.
+.SH SYNTAX
+.nf
+.LP
+void gleToroid (gleDouble rToroid,
+                gleDouble up[3],
+                gleDouble startRadius,
+                gleDouble drdTheta,
+                gleDouble startZ,
+                gleDouble dzdTheta,
+                gleDouble startXform[2][3],
+                gleDouble dXformdTheta[2][3],
+                gleDouble startTheta,
+                gleDouble sweepTheta);
+.fi
+.SH ARGUMENTS
+.IP \fIrToroid\fP 1i
+circle contour (torus) radius
+.IP \fIstartRadius\fP 1i
+spiral starts in x-y plane
+.IP \fIdrdTheta\fP 1i
+change in radius per revolution
+.IP \fIstartZ\fP 1i
+starting z value
+.IP \fIdzdTheta\fP 1i
+change in Z per revolution
+.IP \fIstartXform\fP 1i
+starting contour affine transformation
+.IP \fIdXformdTheta\fP 1i
+tangent change xform per revolution
+.IP \fIstartTheta\fP 1i
+start angle in x-y plane
+.IP \fIsweepTheta\fP 1i
+degrees to spiral around
+.SH DESCRIPTION
+
+Generalized Torus. Similar to gleLathe, except contour is a circle.
+Uses gleLathe to draw.
+
+.SH SEE ALSO
+gleSpiral, gleHelicoid
+.SH AUTHOR
+Linas Vepstas (linas@linas.org)
--- /dev/null
+++ gle-3.1.2/man/gleTwistExtrusion.3gle
@@ -0,0 +1,66 @@
+.\"
+.\" GLE Tubing & Extrusions Library Documentation 
+.\"
+.TH gleTwistExtrusion 3GLE "3.0" "GLE" "GLE"
+.SH NAME
+gleTwistExtrusion - Extrude arbitrary 2D contour along arbitrary 3D path, specifying local rotations (twists).
+.SH SYNTAX
+.nf
+.LP
+void gleTwistExtrusion (int ncp,
+                gleDouble contour[][2],
+                gleDouble cont_normal[][2],
+                gleDouble up[3],
+                int npoints,
+                gleDouble point_array[][3],
+                float color_array[][3],
+                gleDouble twist_array[]);
+.fi
+.SH ARGUMENTS
+.IP \fIncp\fP 1i
+number of contour points
+.IP \fIcontour\fP 1i
+2D contour
+.IP \fIcont_normal\fP 1i
+2D contour normals
+.IP \fIup\fP 1i
+up vector for contour
+.IP \fInpoints\fP 1i
+numpoints in poly-line
+.IP \fIpoint_array\fP 1i
+polyline vertices
+.IP \fIcolor_array\fP 1i
+colors at polyline verts
+.IP \fItwist_array\fP 1i
+contour twists (in degrees)
+.SH DESCRIPTION
+
+Extrude arbitrary 2D contour along arbitrary 3D path, specifying local
+rotations (twists). As the contour is extruded, it will be twisted by
+the amount specified in the array "twist_array". The angles are
+measured in degrees, and the rotation is about the origin of the
+contour coordinate system.
+
+The argument "contour" specifies the 2D contour to be extruded, while
+the argument "point_array" specifies the path along which to extrude.
+The vector "up" defines the orientation of the contour y-axis in real
+3D space.
+
+Note that neither the very first segment, nor the very last segment are
+drawn. The first and last segments serve only to define the angle of
+the join at the very ends of the polyline. Thus, to draw one segment,
+three must be specified. To draw two segments, four must be specified,
+etc.
+
+The normal array may be NULL. If it is, normal vectors will NOT be
+automatically generated, and the object will look terrible when lit.
+
+The color array may be NULL. If NULL, the current color is used. If not
+NULL, the glColor3f() routine is used to set the color; therefore,
+specifying the glColorMaterial() subroutine before this primitive can
+be used to set diffuse, specular, ambient, etc. colors.
+
+.SH SEE ALSO
+gleExtrusion, gleSuperExtrusion
+.SH AUTHOR
+Linas Vepstas (linas@linas.org)
