TeXgraph 1.98


July 14, 2015

Contents
1 Introduction to TeXgraph
 1.1 First overview
 1.2 Launching TeXgraph
 1.3 Graphic compositing
 1.4 Parameters
 1.5 Colors
  1.5.1 Predefined colors
  1.5.2 Commands and macros linked with colors
2 Graphic elements
 2.1 The grid
 2.2 Axes
 2.3 Curves
 2.4 Differential equation
 2.5 Implicit function
 2.6 Bezier curve
 2.7 Cubic spline
 2.8 Straight line
 2.9 Point(s)
 2.10 Polyline
 2.11 Path
 2.12 Ellipse
 2.13 Elliptical arc
 2.14 Label
 2.15 User-defined
3 Graphics Exports
 3.1 TeX format
 3.2 pst format
 3.3 pgf format
 3.4 tkz format
 3.5 eps format
 3.6 psf (eps+psfrag) format
 3.7 pdf format
 3.8 Compiled formats
  3.8.1 epsc format
  3.8.2 pdfc format
 3.9 svg format
 3.10 Summary
 3.11 Export to the clipboard
 3.12 Preview
 3.13 User-defined export
4 The TeXgraph language
 4.1 TeXgraph commands
  4.1.1 General syntax
  4.1.2 Control structures
 4.2 Strings
  4.2.1 Alphanumerical evaluation
  4.2.2 To store a string
  4.2.3 Commands linked to strings
  4.2.4 Macros returning a string
  4.2.5 Constants and variables
  4.2.6 Predefined constants
  4.2.7 Global predefined variables
  4.2.8 Variable declaration
  4.2.9 Global variables
  4.2.10 Automatical recalculation
  4.2.11 Variables in the TeXgraph.mac and interface.mac files
 4.3 Macros
  4.3.1 Macro creation
  4.3.2 Immediate or deferred development
5 Commands
 5.1 Args
 5.2 Assign
 5.3 Attributes
 5.4 Border
 5.5 ChangeAttr
 5.6 Clip2D
 5.7 CloseFile
 5.8 ComposeMatrix
 5.9 Concat
 5.10 Copy
 5.11 DefaultAttr
 5.12 Del
 5.13 Delay
 5.14 DelButton
 5.15 DelGraph
 5.16 DelItem
 5.17 DelMac
 5.18 DelText
 5.19 DelVar
 5.20 Der
 5.21 Diff
 5.22 Exchange
 5.23 EpsCoord
 5.24 Eval
 5.25 Exec
 5.26 Export
 5.27 ExportObject
 5.28 Window
 5.29 FileExists
 5.30 Free
 5.31 Get
 5.32 GetAttr
 5.33 GetMatrix
 5.34 GetSpline
 5.35 GetStr
 5.36 GrayScale
 5.37 HexaColor
 5.38 Hide
 5.39 IdMatrix
 5.40 Input
 5.41 InputMac
 5.42 Inc
 5.43 Insert
 5.44 Int
 5.45 IsMac
 5.46 IsString
 5.47 IsVar
 5.48 List)
 5.49 ListFiles
 5.50 ListWords
 5.51 LoadImage
 5.52 Loop
 5.53 LowerCase
 5.54 Map
 5.55 Margin)
 5.56 Merge
 5.57 Message
 5.58 Mix
 5.59 Move
 5.60 Mtransform
 5.61 MyExport
 5.62 Nargs
 5.63 NewButton
 5.64 NewGraph
 5.65 NewItem
 5.66 NewMac
 5.67 NewVar
 5.68 Nops
 5.69 NotXor
 5.70 OpenFile
 5.71 OriginalCoord
 5.72 PermuteWith
 5.73 ReadData
 5.74 ReadFlatPs
 5.75 ReCalc
 5.76 ReDraw
 5.77 RenCommand
 5.78 RenMac
 5.79 RestoreAttr
 5.80 Reverse
 5.81 Rgb
 5.82 SaveAttr
 5.83 ScientificF
 5.84 Seq
 5.85 Set
 5.86 SetAttr
 5.87 SetMatrix
 5.88 Show
 5.89 If
 5.90 Solve
 5.91 Sort
 5.92 Special
 5.93 Str
 5.94 StrArgs
 5.95 StrComp
 5.96 StrCopy
 5.97 StrDel
 5.98 StrEval
 5.99 String
 5.100 String2Teg
 5.101 StrLength
 5.102 Stroke
 5.103 StrPos
 5.104 StrReplace
 5.105 TeX2FlatPs
 5.106 Timer
 5.107 TimerMac
 5.108 UpperCase
 5.109 VisibleGraph
 5.110 WriteFile
6 Mathematical functions and operations
 6.1 Operations
  6.1.1 Usual operations
  6.1.2 Logic operations
  6.1.3 Comparisons
  6.1.4 Intersection operations
  6.1.5 Cut operation
 6.2 The predefined mathematical functions
  6.2.1 abs
  6.2.2 arccos, arccsin, arctan, arccot
  6.2.3 Arg
  6.2.4 argch, argsh, argth, argcth
  6.2.5 bar
  6.2.6 ch, cos
  6.2.7 Ent
  6.2.8 exp
  6.2.9 Im
  6.2.10 ln
  6.2.11 M
  6.2.12 opp
  6.2.13 Rand
  6.2.14 Re
  6.2.15 Round
  6.2.16 sh, sin
  6.2.17 sqr
  6.2.18 sqrt
  6.2.19 tan, th, cot, cth
7 Mathematical macros from TeXgraph.mac
 7.1 Arithmetic and logic operations
  7.1.1 Ceil
  7.1.2 div
  7.1.3 mod
  7.1.4 not
  7.1.5 pgcd (gcd)
  7.1.6 ppcm (lcm)
 7.2 Operations on the variables
  7.2.1 Abs
  7.2.2 free
  7.2.3 IsIn
  7.2.4 nil
  7.2.5 round
 7.3 Operations on the lists
  7.3.1 bary
  7.3.2 del
  7.3.3 getdot
  7.3.4 IsAlign
  7.3.5 isobar
  7.3.6 KillDup
  7.3.7 length
  7.3.8 permute
  7.3.9 Pos
  7.3.10 rectangle
  7.3.11 replace
  7.3.12 reverse
  7.3.13 SortWith
 7.4 Handling lists by components
  7.4.1 CpCopy
  7.4.2 CpDel
  7.4.3 CpNops
  7.4.4 CpReplace
  7.4.5 CpReverse
 7.5 Managing string lists
  7.5.1 StrListInit
  7.5.2 StrListAdd
  7.5.3 StrListCopy
  7.5.4 StrListDelKey
  7.5.5 StrListDelVal
  7.5.6 StrListGetKey
  7.5.7 StrListInsert
  7.5.8 StrListKill
  7.5.9 StrListReplace
  7.5.10 StrListReplaceKey
  7.5.11 StrListShow
 7.6 Statistical functions
  7.6.1 Anp
  7.6.2 binom
  7.6.3 ecart
  7.6.4 fact
  7.6.5 max
  7.6.6 min
  7.6.7 minmax
  7.6.8 median
  7.6.9 moy
  7.6.10 prod
  7.6.11 sum
  7.6.12 var
 7.7 Conversion functions
  7.7.1 Anchor
  7.7.2 RealArg
  7.7.3 RealCoord
  7.7.4 RealCoordV
  7.7.5 ScrCoord
  7.7.6 ScrCoordV
  7.7.7 SvgCoord
  7.7.8 TeXCoord
 7.8 Plane geometric transformations
  7.8.1 affin
  7.8.2 defAff
  7.8.3 ftransform
  7.8.4 hom
  7.8.5 inv
  7.8.6 mtransform
  7.8.7 proj
  7.8.8 projO
  7.8.9 rot
  7.8.10 shift
  7.8.11 simil
  7.8.12 sym
  7.8.13 symG
  7.8.14 symO
 7.9 2D transformation matrices
  7.9.1 ChangeWinTo
  7.9.2 invmatrix
  7.9.3 matrix
  7.9.4 mulmatrix
 7.10 Plane geometric constructions
  7.10.1 bissec
  7.10.2 cap
  7.10.3 capB
  7.10.4 carre
  7.10.5 cup
  7.10.6 cupB
  7.10.7 cutBezier
  7.10.8 Cvx2d
  7.10.9 Intersec
  7.10.10 med
  7.10.11 parallel
  7.10.12 parallelo
  7.10.13 perp
  7.10.14 polyreg
  7.10.15 pqGoneReg
  7.10.16 rect
  7.10.17 setminus
  7.10.18 setminusB
 7.11 Managing flattened postscript
  7.11.1 conv2FlatPs
  7.11.2 drawFlatPs
  7.11.3 drawTeXlabel
  7.11.4 extractFlatPs
  7.11.5 loadFlatPs
  7.11.6 NewTeXlabel
 7.12 Other
  7.12.1 pdfprog
8 Graphical Functions and macros
 8.1 Predefined graphical functions.
  8.1.1 Axes
  8.1.2 (Poly-)Bézier
  8.1.3 Cartesian
  8.1.4 Parametric (curve)
  8.1.5 Straight Line
  8.1.6 Ellipse
  8.1.7 EllipticArc
  8.1.8 EquaDif
  8.1.9 Grille (grid)
  8.1.10 Implicit
  8.1.11 Label
  8.1.12 Line (polyline)
  8.1.13 Path
  8.1.14 Dot
  8.1.15 Polar
  8.1.16 Spline
 8.2 Bitmap drawing commands
  8.2.1 DelBitmap
  8.2.2 GetPixel
  8.2.3 MaxPixels
  8.2.4 NewBitmap
  8.2.5 Pixel
  8.2.6 Pixel2Scr
  8.2.7 Scr2Pixel
 8.3 Graphic macros from TeXgraph.mac
  8.3.1 angleD
  8.3.2 Arc
  8.3.3 arcBezier
  8.3.4 axes
  8.3.5 axeX
  8.3.6 axeY
  8.3.7 background
  8.3.8 bbox
  8.3.9 centerView
  8.3.10 Cercle (circle)
  8.3.11 Clip
  8.3.12 Dbissec
  8.3.13 Dcarre (square)
  8.3.14 Ddroite
  8.3.15 Dmed
  8.3.16 domaine1
  8.3.17 domaine2
  8.3.18 domaine3
  8.3.19 Dparallel
  8.3.20 Dparallelo
  8.3.21 Dperp
  8.3.22 Dpolyreg
  8.3.23 DpqGoneReg
  8.3.24 drawSet
  8.3.25 Drectangle
  8.3.26 ellipticArc
  8.3.27 flecher (arrowing)
  8.3.28 GradDroite (graduating a straight line)
  8.3.29 LabelArc
  8.3.30 LabelAxe
  8.3.31 LabelDot
  8.3.32 LabelSeg
  8.3.33 markangle
  8.3.34 markseg
  8.3.35 periodic
  8.3.36 Rarc
  8.3.37 Rcercle
  8.3.38 Rellipse
  8.3.39 RellipticArc
  8.3.40 RestoreWin
  8.3.41 SaveWin
  8.3.42 Seg
  8.3.43 set
  8.3.44 setB
  8.3.45 size
  8.3.46 suite (sequence)
  8.3.47 tangente (tangent)
  8.3.48 tangenteP
  8.3.49 view
  8.3.50 wedge
  8.3.51 zoom
9 "Special" macros
 9.1 Special macros
  9.1.1 The Init() macro
  9.1.2 The Exit() macro
  9.1.3 Export related macros
  9.1.4 mouse related macros
  9.1.5 The macros ClicGraph() and OnKey()
 9.2 Special macros from interface.mac
  9.2.1 Apercu (overview)
  9.2.2 Bouton (button)
  9.2.3 geomview
  9.2.4 help
  9.2.5 javaview
  9.2.6 MouseZoom
  9.2.7 NewLabel
  9.2.8 NewLabelDot
  9.2.9 NewLabelDot3D
  9.2.10 Snapshot
  9.2.11 VarGlob
10 3D representation
 10.1 Predefined variables
 10.2 Commands for 3D
  10.2.1 Edges
  10.2.2 Outline
  10.2.3 ComposeMatrix3D
  10.2.4 ConvertToObj
  10.2.5 ConvertToObjN
  10.2.6 Clip3DLine
  10.2.7 ClipFacet
  10.2.8 DistCam
  10.2.9 Fvisible
  10.2.10 GetMatrix3D
  10.2.11 GetSurface
  10.2.12 IdMatrix3D
  10.2.13 Insert3D
  10.2.14 MakePoly
  10.2.15 ModelView
  10.2.16 Mtransform3D
  10.2.17 Norm
  10.2.18 Normal
  10.2.19 PaintFacet
  10.2.20 PaintVertex
  10.2.21 PosCam
  10.2.22 Prodvec
  10.2.23 Prodscal
  10.2.24 Proj3D
  10.2.25 ReadObj
  10.2.26 SetMatrix3D
  10.2.27 Vertices
  10.2.28 SortFacet
 10.3 3D related mathematical macros
  10.3.1 aire3d
  10.3.2 angle3d
  10.3.3 bary3d
  10.3.4 det3d
  10.3.5 interDD
  10.3.6 interDP
  10.3.7 interLP
  10.3.8 interPP
  10.3.9 IsAlign3D
  10.3.10 isobar3d
  10.3.11 IsPlan
  10.3.12 KillDup3D
  10.3.13 length3d
  10.3.14 Merge3d
  10.3.15 n
  10.3.16 Nops3d
  10.3.17 normalize
  10.3.18 permute3d
  10.3.19 planEqn
  10.3.20 Pos3d
  10.3.21 purge3d
  10.3.22 px, py, pz, pxy, pxz, pyz
  10.3.23 replace3d
  10.3.24 reverse3d
  10.3.25 viewDir
  10.3.26 visible
  10.3.27 Xde, Yde, Zde
 10.4 Geometric transformations of the space
  10.4.1 antirot3d
  10.4.2 defAff3d
  10.4.3 dproj3d
  10.4.4 dproj3dO
  10.4.5 dsym3d
  10.4.6 dsym3dO
  10.4.7 ftransform3d
  10.4.8 hom3d
  10.4.9 inv3d
  10.4.10 proj3d
  10.4.11 proj3dO
  10.4.12 rot3d
  10.4.13 shift3d
  10.4.14 sym3d
  10.4.15 sym3dO
 10.5 3D transformation matrix
  10.5.1 invmatrix3d
  10.5.2 matrix3d
  10.5.3 mulmatrix3d
 10.6 Macros for the 3D window
  10.6.1 drawWin3d
  10.6.2 rectangle3d
  10.6.3 RestoreTphi
  10.6.4 RestoreWin3d
  10.6.5 SaveTphi
  10.6.6 SaveWin3d
  10.6.7 transformbox3d
  10.6.8 view3D
 10.7 Screen axes and 3D
  10.7.1 ScreenX
  10.7.2 ScreenY
  10.7.3 ScreenPos
  10.7.4 ScreenCenter
 10.8 Clipping macros for 3D
  10.8.1 Clip3D
  10.8.2 clipCurve
  10.8.3 clipPoly
 10.9 3D objects construction macros
  10.9.1 AretesNum (edges number)
  10.9.2 Chanfrein (chamfer)
  10.9.3 Cone
  10.9.4 curve2Cone
  10.9.5 curve2Cylinder
  10.9.6 curveTube
  10.9.7 Cvx3d
  10.9.8 Cylindre
  10.9.9 FacesNum
  10.9.10 getdroite (3D straight line)
  10.9.11 getplan
  10.9.12 getplanEqn
  10.9.13 grille3d (3D grid)
  10.9.14 HollowFacet
  10.9.15 Intersection
  10.9.16 line2Cone
  10.9.17 line2Cylinder
  10.9.18 lineTube
  10.9.19 Parallelep
  10.9.20 pqGoneReg3D
  10.9.21 Prisme
  10.9.22 Pyramide
  10.9.23 rotCurve
  10.9.24 rotLine
  10.9.25 Section
  10.9.26 Sphere
  10.9.27 Tetra
  10.9.28 trianguler (triangulation)
 10.10 Line drawing macros for 3D
  10.10.1 Arc3D
  10.10.2 Axes3D
  10.10.3 AxeX3D
  10.10.4 AxeY3D
  10.10.5 AxeZ3D
  10.10.6 BoxAxes3D
  10.10.7 Cercle3D (circle)
  10.10.8 Courbe3D
  10.10.9 Dcone
  10.10.10 Dcylindre
  10.10.11 DpqGoneReg3D
  10.10.12 DrawAretes
  10.10.13 DrawDdroite
  10.10.14 DrawDroite
  10.10.15 DrawPlan
  10.10.16 Dsphere
  10.10.17 LabelDot3D
  10.10.18 Ligne3D
  10.10.19 markseg3d
  10.10.20 Point3D
 10.11 Facet’s drawing macros for the 3D
  10.11.1 Dparallelep
  10.11.2 Dprisme
  10.11.3 Dpyramide
  10.11.4 DrawFacet
  10.11.5 DrawFlatFacet
  10.11.6 DrawPoly
  10.11.7 DrawSmoothFacet
  10.11.8 Dsurface
  10.11.9 Dtetraedre
11 3D scene
 11.1 The two basic commands
  11.1.1 Build3D
  11.1.2 Display3D
 11.2 Macros for Build3D()
  11.2.1 globlal options
  11.2.2 bdArc
  11.2.3 bdAngleD
  11.2.4 bdAxes
  11.2.5 bdCercle
  11.2.6 bdCone
  11.2.7 bdCurve
  11.2.8 bdCylinder
  11.2.9 bdDot
  11.2.10 bdDroite
  11.2.11 bdFacet
  11.2.12 bdLabel
  11.2.13 bdLine
  11.2.14 bdPlan
  11.2.15 bdPlanEqn
  11.2.16 bdPrism
  11.2.17 bdPyramid
  11.2.18 bdSphere
  11.2.19 bdSurf
  11.2.20 bdTorus
 11.3 obj, geom and jvx exports
  11.3.1 Scene built using Build3D
  11.3.2 Building a Scene without Build3D
  11.3.3 Isolated element export
12 TeXgraph code in LaTeX
 12.1 Installation
 12.2 The texgraph environment
 12.3 Examples
 12.4 Source file syntax
 12.5 The tegprog environment and the tegrun macro
 12.6 The tegcode environment and the directTeg macro