summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-07 16:52:56 +0000
committerKarl Berry <karl@freefriends.org>2016-04-07 16:52:56 +0000
commite1e1d6fa3224440612d3ad6595c413f88d552702 (patch)
treeeaa3301c9fecd1d01baa642b2e483fee4430bcee /Master/texmf-dist
parent0eefec13710bb4d6aff6838a6efc463912506ee9 (diff)
asymptote 2.37
git-svn-id: svn://tug.org/texlive/trunk@40303 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/CubicBezier.py11
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/UndoRedoStack.py22
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasy.py11
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasy2asy.py79
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasyActions.py6
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasyBezierEditor.py7
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasyCodeEditor.py5
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasyColorPicker.py40
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasyFile.py54
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasyGUIIcons.py30
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasyMainWin.py137
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasyOptions.py20
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasyOptionsDialog.py46
-rwxr-xr-xMaster/texmf-dist/asymptote/GUI/xasyVersion.py2
-rw-r--r--Master/texmf-dist/asymptote/animation.asy1
-rw-r--r--Master/texmf-dist/asymptote/asy-keywords.el6
-rw-r--r--Master/texmf-dist/asymptote/asy-mode.el24
-rw-r--r--Master/texmf-dist/asymptote/bezulate.asy5
-rw-r--r--Master/texmf-dist/asymptote/contour3.asy4
-rw-r--r--Master/texmf-dist/asymptote/embed.asy11
-rw-r--r--Master/texmf-dist/asymptote/math.asy26
-rw-r--r--Master/texmf-dist/asymptote/plain_strings.asy26
-rw-r--r--Master/texmf-dist/asymptote/smoothcontour3.asy748
-rw-r--r--Master/texmf-dist/asymptote/three_surface.asy360
-rw-r--r--Master/texmf-dist/asymptote/three_tube.asy16
-rw-r--r--Master/texmf-dist/asymptote/version.asy2
-rw-r--r--Master/texmf-dist/doc/asymptote/CAD.pdfbin66815 -> 66753 bytes
-rw-r--r--Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdfbin32163 -> 32164 bytes
-rw-r--r--Master/texmf-dist/doc/asymptote/asy-latex.pdfbin194467 -> 194740 bytes
-rw-r--r--Master/texmf-dist/doc/asymptote/asyRefCard.pdfbin54958 -> 54949 bytes
-rw-r--r--Master/texmf-dist/doc/asymptote/asymptote.pdfbin1273183 -> 1288038 bytes
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/BezierTriangle.asy10
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/externalprc.tex3
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/fequlogo.asy2
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/filegraph.asy2
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/filesurface.asy2
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/genusthree.asy (renamed from Master/texmf-dist/doc/asymptote/examples/lemniscate.asy)7
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/genustwo.asy36
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/latexusage.tex4
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/leastsquares.asy2
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/secondaryaxis.asy2
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/tetra.asy12
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/threeviews.asy3
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/vertexshading.asy5
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/westnile.asy2
-rw-r--r--Master/texmf-dist/doc/info/asy-faq.info10
-rw-r--r--Master/texmf-dist/doc/info/asymptote.info1391
-rw-r--r--Master/texmf-dist/doc/man/man1/asy.12
-rw-r--r--Master/texmf-dist/doc/man/man1/asy.man1.pdfbin11653 -> 28236 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/xasy.man1.pdfbin3863 -> 14725 bytes
-rw-r--r--Master/texmf-dist/tex/latex/asymptote/asymptote.sty3
51 files changed, 1819 insertions, 1378 deletions
diff --git a/Master/texmf-dist/asymptote/GUI/CubicBezier.py b/Master/texmf-dist/asymptote/GUI/CubicBezier.py
index 6455b700a79..2eb62577b0a 100755
--- a/Master/texmf-dist/asymptote/GUI/CubicBezier.py
+++ b/Master/texmf-dist/asymptote/GUI/CubicBezier.py
@@ -82,16 +82,19 @@ if __name__ == '__main__':
pointList = makeBezier((-80,0),(-150,40),(150,120),(80,0),0.5)
from timeit import Timer
t = Timer('makeBezier((-80,0),(-40,-40),(40,120),(80,0),1)','from __main__ import makeBezier')
- print pointList
- print len(pointList)
+ print (pointList)
+ print (len(pointList))
iterations = 1000
time = t.timeit(iterations)
- print "%d iterations took %f seconds (%f ms for each)."%(iterations,time,1000.0*time/iterations)
+ print ("{:d} iterations took {:f} seconds ({:f} ms for each).".format(iterations,time,1000.0*time/iterations))
points = []
for point in pointList:
points.append(point[0])
points.append(-point[1])
- from Tkinter import *
+ if sys.version_info >= (3, 0):
+ from tkinter import *
+ else:
+ from Tkinter import *
root = Tk()
canv = Canvas(root,scrollregion=(-100,-100,100,100))
canv.pack()
diff --git a/Master/texmf-dist/asymptote/GUI/UndoRedoStack.py b/Master/texmf-dist/asymptote/GUI/UndoRedoStack.py
index f4a247a411d..779d0330a81 100755
--- a/Master/texmf-dist/asymptote/GUI/UndoRedoStack.py
+++ b/Master/texmf-dist/asymptote/GUI/UndoRedoStack.py
@@ -13,10 +13,10 @@ class action:
self.act = act
self.inv = inv
def undo(self):
- #print "Undo:",self
+ #print ("Undo:",self)
self.inv()
def redo(self):
- #print "Redo:",self
+ #print ("Redo:",self)
self.act()
def __str__(self):
return "A generic action"
@@ -33,7 +33,7 @@ class actionStack:
def add(self,action):
self.undoStack.append(action)
- #print "Added",action
+ #print ("Added",action)
self.redoStack = []
def undo(self):
@@ -54,13 +54,13 @@ class actionStack:
op.undo()
self.redoStack.append(op)
elif op is endActionGroup:
- raise Exception,"endActionGroup without previous beginActionGroup"
+ raise Exception("endActionGroup without previous beginActionGroup")
else:
self.redoStack.append(op)
op.undo()
- #print "undid",op
+ #print ("undid",op)
else:
- pass #print "nothing to undo"
+ pass #print ("nothing to undo")
def redo(self):
if len(self.redoStack) > 0:
@@ -80,13 +80,13 @@ class actionStack:
op.redo()
self.undoStack.append(op)
elif op is endActionGroup:
- raise Exception,"endActionGroup without previous beginActionGroup"
+ raise Exception("endActionGroup without previous beginActionGroup")
else:
self.undoStack.append(op)
op.redo()
- #print "redid",op
+ #print ("redid",op)
else:
- pass #print "nothing to redo"
+ pass #print ("nothing to redo")
def setCommitLevel(self):
self.commitLevel = len(self.undoStack)
@@ -105,9 +105,9 @@ class actionStack:
if __name__=='__main__':
import sys
def opq():
- print "action1"
+ print ("action1")
def unopq():
- print "inverse1"
+ print ("inverse1")
q = action(opq,unopq)
w = action(lambda:sys.stdout.write("action2\n"),lambda:sys.stdout.write("inverse2\n"))
e = action(lambda:sys.stdout.write("action3\n"),lambda:sys.stdout.write("inverse3\n"))
diff --git a/Master/texmf-dist/asymptote/GUI/xasy.py b/Master/texmf-dist/asymptote/GUI/xasy.py
index ffca16a1e2d..f160404c19a 100755
--- a/Master/texmf-dist/asymptote/GUI/xasy.py
+++ b/Master/texmf-dist/asymptote/GUI/xasy.py
@@ -10,8 +10,11 @@
############################################################################
import getopt,sys,signal
-from Tkinter import *
import xasyMainWin
+if sys.version_info >= (3, 0):
+ from tkinter import *
+else:
+ from Tkinter import *
signal.signal(signal.SIGINT,signal.SIG_IGN)
@@ -22,11 +25,11 @@ try:
if(len(opts)>=1):
mag = float(opts[0][1])
except:
- print "Invalid arguments."
- print "Usage: xasy.py [-x magnification] [filename]"
+ print ("Invalid arguments.")
+ print ("Usage: xasy.py [-x magnification] [filename]")
sys.exit(1)
if(mag <= 0.0):
- print "Magnification must be positive."
+ print ("Magnification must be positive.")
sys.exit(1)
if(len(args)>=1):
app = xasyMainWin.xasyMainWin(root,args[0],mag)
diff --git a/Master/texmf-dist/asymptote/GUI/xasy2asy.py b/Master/texmf-dist/asymptote/GUI/xasy2asy.py
index 3a2c1bcbe7b..06c0dbd7f54 100755
--- a/Master/texmf-dist/asymptote/GUI/xasy2asy.py
+++ b/Master/texmf-dist/asymptote/GUI/xasy2asy.py
@@ -12,10 +12,15 @@ import sys,os,signal,threading
from subprocess import *
from string import *
import xasyOptions
-import Queue
-from Tkinter import *
from tempfile import mkdtemp
+if sys.version_info >= (3, 0):
+ from tkinter import *
+ import queue
+else:
+ from Tkinter import *
+ import Queue as queue
+
# PIL support is now mandatory due to rotations
try:
from PIL import ImageTk
@@ -50,14 +55,21 @@ def startQuickAsy():
AsyTempDir=mkdtemp(prefix="asy_")+os.sep
if sys.platform[:3] == 'win':
quickAsy=Popen([xasyOptions.options['asyPath'],"-noV","-multiline","-q",
- "-o"+AsyTempDir,"-inpipe=0","-outpipe=2"],stdin=PIPE,stderr=PIPE)
+ "-o"+AsyTempDir,"-inpipe=0","-outpipe=2"],stdin=PIPE,
+ stderr=PIPE,universal_newlines=True)
fout=quickAsy.stdin
fin=quickAsy.stderr
else:
(rx,wx) = os.pipe()
(ra,wa) = os.pipe()
+ if sys.version_info >= (3, 4):
+ os.set_inheritable(rx, True)
+ os.set_inheritable(wx, True)
+ os.set_inheritable(ra, True)
+ os.set_inheritable(wa, True)
quickAsy=Popen([xasyOptions.options['asyPath'],"-noV","-multiline","-q",
- "-o"+AsyTempDir,"-inpipe="+str(rx),"-outpipe="+str(wa)])
+ "-o"+AsyTempDir,"-inpipe="+str(rx),"-outpipe="+str(wa)],
+ close_fds=False)
fout=os.fdopen(wx,'w')
fin=os.fdopen(ra,'r')
if quickAsy.returncode != None:
@@ -111,7 +123,7 @@ class asyTransform:
self.x,self.y,self.xx,self.xy,self.yx,self.yy = initTuple
self.deleted = delete
else:
- raise Exception,"Illegal initializer for asyTransform"
+ raise Exception("Illegal initializer for asyTransform")
def getCode(self):
"""Obtain the asy code that represents this transform"""
@@ -135,7 +147,7 @@ class asyTransform:
elif len(other) == 2:
return ((self.t[0]+self.t[2]*other[0]+self.t[3]*other[1]),(self.t[1]+self.t[4]*other[0]+self.t[5]*other[1]))
else:
- raise Exception, "Illegal multiplier of %s"%str(type(other))
+ raise Exception("Illegal multiplier of {:s}".format(str(type(other))))
elif isinstance(other,asyTransform):
result = asyTransform((0,0,0,0,0,0))
result.x = self.x+self.xx*other.x+self.xy*other.y
@@ -147,7 +159,7 @@ class asyTransform:
result.t = (result.x,result.y,result.xx,result.xy,result.yx,result.yy)
return result
else:
- raise Exception, "Illegal multiplier of %s"%str(type(other))
+ raise Exception("Illegal multiplier of {:s}".format(str(type(other))))
def identity():
return asyTransform((0,0,1,0,0,1))
@@ -181,7 +193,7 @@ class asyPen(asyObj):
def updateCode(self,mag=1.0):
"""Generate the pen's code"""
- self.asyCode = "rgb(%g,%g,%g)"%self.color+"+"+str(self.width)
+ self.asyCode = "rgb({:g},{:g},{:g})+{:s}".format(self.color[0], self.color[1], self.color[2],str(self.width))
if len(self.options) > 0:
self.asyCode += "+"+self.options
@@ -226,23 +238,7 @@ class asyPen(asyObj):
def tkColor(self):
"""Return the tk version of the pen's color"""
self.computeColor()
- r,g,b = self.color
- r,g,b = int(256*r),int(256*g),int(256*b)
- if r == 256:
- r = 255
- if g == 256:
- g = 255
- if b == 256:
- b = 255
- r,g,b = map(hex,(r,g,b))
- r,g,b = r[2:],g[2:],b[2:]
- if len(r) < 2:
- r += '0'
- if len(g) < 2:
- g += '0'
- if len(b) < 2:
- b += '0'
- return'#'+r+g+b
+ return '#{}'.format("".join(["{:02x}".format(min(int(256*a),255)) for a in self.color]))
class asyPath(asyObj):
"""A python wrapper for an asymptote path"""
@@ -353,7 +349,7 @@ class asyPath(asyObj):
line=fin.readline()
line=line.replace("\n","")
pathStrLines.append(line)
- oneLiner = "".join(split(join(pathStrLines)))
+ oneLiner = "".join(pathStrLines).replace(" ", "")
splitList = oneLiner.split("..")
nodes = [a for a in splitList if a.find("controls")==-1]
self.nodeSet = []
@@ -437,7 +433,7 @@ class xasyItem:
def asyfy(self,mag=1.0):
self.removeFromCanvas()
self.imageList = []
- self.imageHandleQueue = Queue.Queue()
+ self.imageHandleQueue = queue.Queue()
worker = threading.Thread(target=self.asyfyThread,args=(mag,))
worker.start()
item = self.imageHandleQueue.get()
@@ -461,23 +457,22 @@ class xasyItem:
fout.write("reset;\n")
fout.write("initXasyMode();\n")
fout.write("atexit(null);\n")
- global console
for line in self.getCode().splitlines():
fout.write(line+"\n");
- fout.write("deconstruct(%f);\n"%mag)
+ fout.write("deconstruct({:f});\n".format(mag))
fout.flush()
- format = "png"
- maxargs = int(split(fin.readline())[0])
+ maxargs = int(fin.readline().split()[0])
boxes=[]
batch=0
n=0
text = fin.readline()
- template=AsyTempDir+"%d_%d.%s"
+ # template=AsyTempDir+"%d_%d.%s"
+ fileformat = "png"
def render():
for i in range(len(boxes)):
- l,b,r,t = [float(a) for a in split(boxes[i])]
- name=template%(batch,i+1,format)
- self.imageHandleQueue.put((name,format,(l,b,r,t),i))
+ l,b,r,t = [float(a) for a in boxes[i].split()]
+ name="{:s}{:d}_{:d}.{:s}".format(AsyTempDir,batch,i+1,fileformat)
+ self.imageHandleQueue.put((name,fileformat,(l,b,r,t),i))
while text != "Done\n" and text != "Error\n":
boxes.append(text)
text = fin.readline()
@@ -595,14 +590,14 @@ class xasyShape(xasyDrawnItem):
def __str__(self):
"""Create a string describing this shape"""
- return "xasyShape code:%s"%("\n\t".join(self.getCode().splitlines()))
+ return "xasyShape code:{:s}".format("\n\t".join(self.getCode().splitlines()))
class xasyFilledShape(xasyShape):
"""A filled shape drawn on the GUI"""
def __init__(self,path,pen=asyPen(),transform=identity()):
"""Initialize this shape with a path, pen, and transform"""
if path.nodeSet[-1] != 'cycle':
- raise Exception,"Filled paths must be cyclic"
+ raise Exception("Filled paths must be cyclic")
xasyShape.__init__(self,path,pen,transform)
def updateCode(self,mag=1.0):
@@ -661,7 +656,7 @@ class xasyFilledShape(xasyShape):
def __str__(self):
"""Return a string describing this shape"""
- return "xasyFilledShape code:%s"%("\n\t".join(self.getCode().splitlines()))
+ return "xasyFilledShape code:{:s}".format("\n\t".join(self.getCode().splitlines()))
class xasyText(xasyItem):
"""Text created by the GUI"""
@@ -690,11 +685,11 @@ class xasyText(xasyItem):
if self.onCanvas == None:
self.onCanvas = canvas
elif self.onCanvas != canvas:
- raise Exception,"Error: item cannot be added to more than one canvas"
+ raise Exception("Error: item cannot be added to more than one canvas")
self.asyfy(mag)
def __str__(self):
- return "xasyText code:%s"%("\n\t".join(self.getCode().splitlines()))
+ return "xasyText code:{:s}".format("\n\t".join(self.getCode().splitlines()))
class xasyScript(xasyItem):
"""A set of images create from asymptote code. It is always deconstructed."""
@@ -718,7 +713,7 @@ class xasyScript(xasyItem):
for xform in self.transform:
if not isFirst:
self.asyCode+=",\n"
- self.asyCode += "indexedTransform(%d,%s)"%(count,str(xform))
+ self.asyCode += "indexedTransform({:d},{:s})".format(count,str(xform))
isFirst = False
count += 1
self.asyCode += ");\n"
@@ -754,7 +749,7 @@ class xasyScript(xasyItem):
if self.onCanvas == None:
self.onCanvas = canvas
elif self.onCanvas != canvas:
- raise Exception,"Error: item cannot be added to more than one canvas"
+ raise Exception("Error: item cannot be added to more than one canvas")
self.asyfy(mag)
def __str__(self):
diff --git a/Master/texmf-dist/asymptote/GUI/xasyActions.py b/Master/texmf-dist/asymptote/GUI/xasyActions.py
index 38aae1d5c7e..95411c5d9a4 100755
--- a/Master/texmf-dist/asymptote/GUI/xasyActions.py
+++ b/Master/texmf-dist/asymptote/GUI/xasyActions.py
@@ -9,9 +9,13 @@
#
###########################################################################
import math
+import sys
import UndoRedoStack
import xasy2asy
-from Tkinter import *
+if sys.version_info >= (3, 0):
+ from tkinter import *
+else:
+ from Tkinter import *
class translationAction(UndoRedoStack.action):
def __init__(self,owner,itemList,indexList,translation):
diff --git a/Master/texmf-dist/asymptote/GUI/xasyBezierEditor.py b/Master/texmf-dist/asymptote/GUI/xasyBezierEditor.py
index 998ee4c7c25..75ddeafa2d2 100755
--- a/Master/texmf-dist/asymptote/GUI/xasyBezierEditor.py
+++ b/Master/texmf-dist/asymptote/GUI/xasyBezierEditor.py
@@ -10,11 +10,16 @@
#
###########################################################################
-from Tkinter import *
import math
+import sys
from CubicBezier import *
import xasy2asy
+if sys.version_info >= (3, 0):
+ from tkinter import *
+else:
+ from Tkinter import *
+
class node:
def __init__(self,precontrol,node,postcontrol,uid,isTied = True):
self.node = node
diff --git a/Master/texmf-dist/asymptote/GUI/xasyCodeEditor.py b/Master/texmf-dist/asymptote/GUI/xasyCodeEditor.py
index d09196a41be..8f3de4034fe 100755
--- a/Master/texmf-dist/asymptote/GUI/xasyCodeEditor.py
+++ b/Master/texmf-dist/asymptote/GUI/xasyCodeEditor.py
@@ -15,7 +15,6 @@ from tempfile import mkstemp
from os import remove
from os import fdopen
from os import path
-from string import split
import xasyOptions
def getText(text=""):
@@ -26,7 +25,7 @@ def getText(text=""):
tempf.close()
try:
cmdpath,cmd = path.split(path.expandvars(xasyOptions.options['externalEditor']))
- split_cmd = split(cmd)
+ split_cmd = cmd.split()
cmdpart = [path.join(cmdpath,split_cmd[0])]
argpart = split_cmd[1:]+[temp[1]]
arglist = cmdpart+argpart
@@ -45,4 +44,4 @@ def getText(text=""):
if __name__ == '__main__':
#run a test
- print getText("Here is some text to edit")
+ print (getText("Here is some text to edit"))
diff --git a/Master/texmf-dist/asymptote/GUI/xasyColorPicker.py b/Master/texmf-dist/asymptote/GUI/xasyColorPicker.py
index 7415be205c4..217835bdbb0 100755
--- a/Master/texmf-dist/asymptote/GUI/xasyColorPicker.py
+++ b/Master/texmf-dist/asymptote/GUI/xasyColorPicker.py
@@ -10,8 +10,15 @@
#
############################################################################
-from Tkinter import *
-import tkColorChooser
+import sys
+
+if sys.version_info >= (3, 0):
+ from tkinter import *
+ from tkinter import colorchooser
+else:
+ from Tkinter import *
+ import tkColorChooser as colorchooser
+
asyColors = { "black":(0,0,0),
"white":(1,1,1),
"gray":(0.5,0.5,0.5),
@@ -145,28 +152,13 @@ def makeRGBfromTkColor(tkColor):
b /= 255.0
return (r,g,b)
-def RGBreal255((r,g,b)):
+def RGBreal255(rgb):
"""Convert an RGB color from 0-1 to 0-255"""
- a,b,c = (256*r,256*g,256*b)
- if a == 256:
- a = 255
- if b == 256:
- b = 255
- if c == 256:
- c = 255
- return map(int,(a,b,c))
+ return [min(int(256*a),255) for a in rgb]
-def RGB255hex((r,g,b)):
+def RGB255hex(rgb):
"""Make a color in the form #rrggbb in hex from r,g,b in 0-255"""
- rs,gs,bs = map(hex,(r,g,b))
- rs,gs,bs = rs[2:],gs[2:],bs[2:]
- if len(rs) < 2:
- rs += '0'
- if len(gs) < 2:
- gs += '0'
- if len(bs) < 2:
- bs += '0'
- return '#'+rs+gs+bs
+ return "#{}".format("".join(["{:02x}".format(a) for a in rgb]))
class xasyColorDlg(Toplevel):
"""A dialog for choosing an asymptote color. It displays the usual asy presets and allows custom rgb colors"""
@@ -216,8 +208,8 @@ class xasyColorDlg(Toplevel):
"""Close the dialog forcibly"""
self.destroy()
def getCustom(self):
- """Request a custom RGB color using a tkColorChooser"""
- result=tkColorChooser.askcolor(initialcolor=RGB255hex(RGBreal255(self.color)),title="Custom Color",parent=self)
+ """Request a custom RGB color using a colorchooser"""
+ result=colorchooser.askcolor(initialcolor=RGB255hex(RGBreal255(self.color)),title="Custom Color",parent=self)
if result != (None,None):
self.setColor((result[0][0]/255.0,result[0][1]/255.0,result[0][2]/255.0))
def cancel(self):
@@ -235,7 +227,7 @@ class xasyColorDlg(Toplevel):
"""Use this method to prompt for a color. It returns the new color or the old color if the user cancelled the operation.
e.g:
- print xasyColorDlg(Tk()).getColor((1,1,0))
+ print (xasyColorDlg(Tk()).getColor((1,1,0)))
"""
self.setColor(initialColor)
self.oldColor = initialColor
diff --git a/Master/texmf-dist/asymptote/GUI/xasyFile.py b/Master/texmf-dist/asymptote/GUI/xasyFile.py
index 890f1ad3eef..7516fc7d3b5 100755
--- a/Master/texmf-dist/asymptote/GUI/xasyFile.py
+++ b/Master/texmf-dist/asymptote/GUI/xasyFile.py
@@ -28,7 +28,7 @@ def parseFile(inFile):
#lines = [line for line in lines.splitlines() if not line.startswith("//")]
result = []
if lines[0] != "initXasyMode();":
- raise xasyFileError,"Invalid file format: First line must be \"initXasyMode();\""
+ raise xasyFileError("Invalid file format: First line must be \"initXasyMode();\"")
lines.pop(0)
lineCount = 2
lineNum = len(lines)
@@ -37,14 +37,14 @@ def parseFile(inFile):
lines.pop(0)
if not line.isspace() and len(line)>0:
try:
- #print "Line %d: %s"%(lineCount,line),
+ #print ("Line {:d}: {:s}".format(lineCount,line))
lineResult = parseLine(line.strip(),lines)
except:
- raise xasyParseError,"Parsing error: line %d in %s\n%s"%(lineCount,inFile.name,line)
+ raise xasyParseError("Parsing error: line {:d} in {:s}\n{:s}".format(lineCount,inFile.name,line))
if lineResult != None:
result.append(lineResult)
- #print "\tproduced: %s"%str(lineResult)
+ #print ("\tproduced: {:s}".format(str(lineResult)))
lineCount += lineNum-len(lines)
lineNum = len(lines)
return result
@@ -105,7 +105,7 @@ def parseTransformExpression(line):
global pendingTransforms
stackCmd = line[len(transformPrefix)+1:line.find("(")]
if line[-2:] != ");":
- raise xasyParseError,"Invalid syntax"
+ raise xasyParseError("Invalid syntax")
args = line[line.find("(")+1:-2]
if stackCmd == "push":
t = asyTransform(eval(args))
@@ -113,19 +113,19 @@ def parseTransformExpression(line):
elif stackCmd == "add":
parseIndexedTransforms(args)
else:
- raise xasyParseError,"Invalid transform stack command."
+ raise xasyParseError("Invalid transform stack command.")
return None
def parseLabel(line):
"""Parse an asy Label statement, returning an xasyText item"""
if not (line.startswith("Label(") and line.endswith(",align=SE)")):
- raise xasyParseError,"Invalid syntax"
+ raise xasyParseError("Invalid syntax")
args = line[6:-1]
loc2 = args.rfind(",align=SE")
loc1 = args.rfind(",",0,loc2-1)
loc = args.rfind(",(",0,loc1-1)
if loc < 2:
- raise xasyParseError,"Invalid syntax"
+ raise xasyParseError("Invalid syntax")
text = args[1:loc-1]
location = eval(args[loc+1:args.find("),",loc)+1])
pen = args[loc:loc2]
@@ -143,7 +143,7 @@ def parseLabelCommand(line):
e.g.: label(Label("Hello world!",(0,0),rgb(0,0,0)+0.5,align=SE));
"""
if line[-2:] != ");":
- raise xasyParseError,"Invalid syntax"
+ raise xasyParseError("Invalid syntax")
arguments = line[6:-2]
return parseLabel(arguments)
@@ -155,7 +155,7 @@ def parseDrawCommand(line):
e.g.: draw((0,0)..controls(0.33,0.33)and(0.66,0.66)..(1,1),rgb(1,0,1)+1.5);
"""
if line[-2:] != ");":
- raise xasyParseError,"Invalid syntax"
+ raise xasyParseError("Invalid syntax")
args = line[5:-2]
loc = args.rfind(",rgb")
path = args[:loc]
@@ -171,7 +171,7 @@ def parseFillCommand(line):
e.g.: fill((0,0)..controls(0.33,0.33)and(0.66,0.66)..(1,1)..controls(0.66,0)and(0.33,0)..cycle,rgb(1,0,1)+1.5);
"""
if line[-2:] != ");":
- raise xasyParseError,"Invalid syntax"
+ raise xasyParseError("Invalid syntax")
args = line[5:-2]
loc = args.rfind(",rgb")
path = args[:loc]
@@ -197,13 +197,13 @@ def parsePen(pen):
options = ""
return asyPen(color,width,options)
except:
- raise xasyParseError,"Invalid pen"
+ raise xasyParseError("Invalid pen")
def parsePathExpression(expr):
"""Parse an asy path returning an asyPath()"""
result = asyPath()
expr = "".join(expr.split())
- #print expr
+ #print (expr)
if expr.find("controls") != -1:
#parse a path with control points
tokens = expr.split("..")
@@ -211,18 +211,18 @@ def parsePathExpression(expr):
for a in range(len(nodes)):
if nodes[a] != "cycle":
nodes[a] = eval(nodes[a])
- controls = [map(eval,a.replace("controls","").split("and")) for a in tokens if a.startswith("controls")]
+ controls = [[eval(b) for b in a.replace("controls", "").split("and")] for a in tokens if a.startswith("controls")]
result.initFromControls(nodes, controls)
else:
#parse a path without control points
tokens = re.split(r"(::|--|\.\.)",expr)
linkSet = re.findall("::|--|\.\.",expr)
nodeSet = [a for a in tokens if not re.match(r"::|--|\.\.",a)]
- #print nodeSet
+ #print (nodeSet)
for a in range(len(nodeSet)):
if nodeSet[a] != "cycle":
nodeSet[a] = eval(nodeSet[a])
- #print nodeSet
+ #print (nodeSet)
result.initFromNodeList(nodeSet, linkSet)
return result
@@ -250,7 +250,7 @@ def parseLine(line,lines):
return parseFillCommand(takeUntilSemicolon(line,lines))
elif line.startswith("exitXasyMode();"):
return None
- raise Exception,"Could not parse the line"
+ raise Exception("Could not parse the line")
fileHeader = """initXasyMode();
// This file was generated by xasy. It may be edited manually, however, a strict
@@ -280,28 +280,28 @@ if __name__ == '__main__':
name = "../../xasyTest.asy"
f = open(name,"rt")
except:
- print "Could not open file."
+ print ("Could not open file.")
asy.quit()
sys.exit(1)
fileItems = []
try:
fileItems = parseFile(f)
- res = map(str,fileItems)
- print "----------------------------------"
- print "Objects in %s"%f.name
- print "----------------------------------"
+ res = [str(a) for a in fileItems]
+ print ("----------------------------------")
+ print ("Objects in {:s}".format(f.name))
+ print ("----------------------------------")
for a in res:
- print a
- print "----------------------------------"
- print "successful parse"
+ print (a)
+ print ("----------------------------------")
+ print ("successful parse")
f.close()
except:
f.close()
- print "parse failed"
+ print ("parse failed")
raise
- print "making a file"
+ print ("making a file")
f = open("testfile.asy","wt")
saveFile(f,fileItems)
f.close()
diff --git a/Master/texmf-dist/asymptote/GUI/xasyGUIIcons.py b/Master/texmf-dist/asymptote/GUI/xasyGUIIcons.py
index 3afecfd349c..7f07d5748d7 100755
--- a/Master/texmf-dist/asymptote/GUI/xasyGUIIcons.py
+++ b/Master/texmf-dist/asymptote/GUI/xasyGUIIcons.py
@@ -53,11 +53,11 @@ iconB64 = {
def createGIF(key):
"""Create a gif file from the data in the iconB64 list of icons"""
if key not in iconB64.keys():
- print "Error: %s not found in icon list."%key
- print "Available icons:",iconB64.keys()
+ print ("Error: {:s} not found in icon list.".format(key))
+ print ("Available icons:",iconB64.keys())
else:
- print "Generating %s.gif"%key
- open("%s.gif"%key,"w").write(base64.decodestring(iconB64[key]))
+ print ("Generating {:s}.gif".format(key))
+ open("{:s}.gif".format(key),"w").write(base64.decodestring(iconB64[key]))
def createGIFs():
"""Create the files for all the icons in iconB64"""
@@ -69,24 +69,24 @@ def createStrFromGif(gifFile):
return base64.encodestring(gifFile.read())
if __name__=='__main__':
- print "Testing the xasyGUIIcons module."
- print "Generating all the GIFs:"
+ print ("Testing the xasyGUIIcons module.")
+ print ("Generating all the GIFs:")
createGIFs()
- print "Checking consistency of all icons in iconB64"
+ print ("Checking consistency of all icons in iconB64")
allpassed = True
for icon in iconB64.keys():
- print ("Checking %s"%icon),
- if createStrFromGif(open("%s.gif"%icon,"rb")) == iconB64[icon]:
- print "\tPassed."
+ print ("Checking {:s}".format(icon))
+ if createStrFromGif(open("{:s}.gif".format(icon),"rb")) == iconB64[icon]:
+ print ("\tPassed.")
else:
- print "\tFailed."
+ print ("\tFailed.")
allpassed= False
if allpassed:
- print "All files succeeded."
+ print ("All files succeeded.")
s = raw_input("Delete generated files? (y/n)")
if s == "y":
for name in iconB64.keys():
- print "Deleting %s.gif"%name,
+ print ("Deleting {:s}.gif".format(name))
os.unlink(name+".gif")
- print "\tdone"
- print "Done"
+ print ("\tdone")
+ print ("Done")
diff --git a/Master/texmf-dist/asymptote/GUI/xasyMainWin.py b/Master/texmf-dist/asymptote/GUI/xasyMainWin.py
index 657d24ba81b..b0549e72f9c 100755
--- a/Master/texmf-dist/asymptote/GUI/xasyMainWin.py
+++ b/Master/texmf-dist/asymptote/GUI/xasyMainWin.py
@@ -11,15 +11,23 @@
###########################################################################
import os
+import sys
from string import *
import subprocess
import math
import copy
-from Tkinter import *
-import tkMessageBox
-import tkFileDialog
-import tkSimpleDialog
+if sys.version_info >= (3, 0):
+ # python3
+ from tkinter import *
+ from tkinter import filedialog, messagebox, simpledialog
+else:
+ # python2
+ # from Tkinter import *
+ import tkFileDialog as filedialog
+ import tkMessageBox as messagebox
+ import tkSimpleDialog as simpledialog
+
import threading
import time
@@ -56,12 +64,9 @@ class xasyMainWin:
self.bindGlobalEvents()
self.createWidgets()
self.resetGUI()
- if sys.platform[:3] == "win":
- site="http://effbot.org/downloads/PIL-1.1.7.win32-py2.7.exe"
- else:
- site="http://effbot.org/downloads/Imaging-1.1.7.tar.gz"
+ site=""
if not PILAvailable:
- tkMessageBox.showerror("Failed Dependencies","An error occurred loading the required PIL library. Please install "+site)
+ messagebox.showerror("Failed Dependencies","An error occurred loading the required PIL library. Please install Pillow from http://pypi.python.org/pypi/Pillow")
self.parent.destroy()
sys.exit(1)
if file != None:
@@ -449,12 +454,12 @@ class xasyMainWin:
#test the asyProcess
startQuickAsy()
if not quickAsyRunning():
- if tkMessageBox.askyesno("Xasy Error","Asymptote could not be executed.\r\nTry to find Asymptote automatically?"):
+ if messagebox.askyesno("Xasy Error","Asymptote could not be executed.\r\nTry to find Asymptote automatically?"):
xasyOptions.setAsyPathFromWindowsRegistry()
xasyOptions.save()
startQuickAsy()
while not quickAsyRunning():
- if tkMessageBox.askyesno("Xasy Error","Asymptote could not be executed.\r\nEdit settings?"):
+ if messagebox.askyesno("Xasy Error","Asymptote could not be executed.\r\nEdit settings?"):
xasyOptionsDialog.xasyOptionsDlg(self.parent)
xasyOptions.save()
startQuickAsy()
@@ -466,7 +471,7 @@ class xasyMainWin:
self.mainCanvas.delete("grid")
if not self.gridVisible:
return
- left,top,right,bottom = map(int,self.mainCanvas.cget("scrollregion").split())
+ left,top,right,bottom = [int(float(a)) for a in self.mainCanvas.cget("scrollregion").split()]
gridyspace = int(self.magnification*self.gridyspace)
gridxspace = int(self.magnification*self.gridxspace)
if gridxspace >= 3 and gridyspace >= 3:
@@ -484,7 +489,7 @@ class xasyMainWin:
self.mainCanvas.delete("axes")
if not self.axesVisible:
return
- left,top,right,bottom = map(int,self.mainCanvas.cget("scrollregion").split())
+ left,top,right,bottom = [int(float(a)) for a in self.mainCanvas.cget("scrollregion").split()]
self.mainCanvas.create_line(0,top,0,bottom,tags=("axes","yaxis"),fill=self.axiscolor)
self.mainCanvas.create_line(left,0,right,0,tags=("axes","xaxis"),fill=self.axiscolor)
axisxspace = int(self.magnification*self.axisxspace)
@@ -513,12 +518,12 @@ class xasyMainWin:
w,h = self.mainCanvas.winfo_width(),self.mainCanvas.winfo_height()
if right-left < w:
extraw = w-(right-left)
- right += extraw/2
- left -= extraw/2
+ right += extraw//2
+ left -= extraw//2
if bottom-top < h:
extrah = h-(bottom-top)
- bottom += extrah/2
- top -= extrah/2
+ bottom += extrah//2
+ top -= extrah//2
self.mainCanvas.config(scrollregion=(left,top,right,bottom))
#self.mainCanvas.xview(MOVETO,float(split(self.mainCanvas["scrollregion"])[0]))
#self.mainCanvas.yview(MOVETO,float(split(self.mainCanvas["scrollregion"])[1]))
@@ -549,7 +554,7 @@ class xasyMainWin:
self.bindEvents(item.IDTag)
def canQuit(self,force=False):
- #print "Quitting"
+ #print ("Quitting")
if not force and not self.testOrAcquireLock():
return
try:
@@ -557,10 +562,10 @@ class xasyMainWin:
except:
pass
if self.undoRedoStack.changesMade():
- result = tkMessageBox._show("xasy","File has been modified.\nSave changes?",icon=tkMessageBox.QUESTION,type=tkMessageBox.YESNOCANCEL)
- if str(result) == tkMessageBox.CANCEL:
+ result = messagebox._show("xasy","File has been modified.\nSave changes?",icon=messagebox.QUESTION,type=messagebox.YESNOCANCEL)
+ if str(result) == messagebox.CANCEL:
return
- elif result == tkMessageBox.YES:
+ elif result == messagebox.YES:
self.fileSaveCmd()
try:
os.rmdir(getAsyTempDir())
@@ -595,19 +600,19 @@ class xasyMainWin:
self.fileItems = xasyFile.parseFile(f)
f.close()
except IOError:
- tkMessageBox.showerror("File Opening Failed.","File could not be opened.")
+ messagebox.showerror("File Opening Failed.","File could not be opened.")
self.fileItems = []
except:
self.fileItems = []
self.autoMakeScript = True
- if self.autoMakeScript or tkMessageBox.askyesno("Error Opening File", "File was not recognized as an xasy file.\nLoad as a script item?"):
+ if self.autoMakeScript or messagebox.askyesno("Error Opening File", "File was not recognized as an xasy file.\nLoad as a script item?"):
try:
item = xasyScript(self.mainCanvas)
f.seek(0)
item.setScript(f.read())
self.addItemToFile(item)
except:
- tkMessageBox.showerror("File Opening Failed.","Could not load as a script item.")
+ messagebox.showerror("File Opening Failed.","Could not load as a script item.")
self.fileItems = []
self.populateCanvasWithItems()
self.populatePropertyList()
@@ -663,12 +668,12 @@ class xasyMainWin:
if(not self.testOrAcquireLock()):
return
self.releaseLock()
- #print "Create New File"
+ #print ("Create New File")
if self.undoRedoStack.changesMade():
- result = tkMessageBox._show("xasy","File has been modified.\nSave changes?",icon=tkMessageBox.QUESTION,type=tkMessageBox.YESNOCANCEL)
- if str(result) == tkMessageBox.CANCEL:
+ result = messagebox._show("xasy","File has been modified.\nSave changes?",icon=messagebox.QUESTION,type=messagebox.YESNOCANCEL)
+ if str(result) == messagebox.CANCEL:
return
- elif result == tkMessageBox.YES:
+ elif result == messagebox.YES:
self.fileSaveCmd()
self.resetGUI()
@@ -676,25 +681,25 @@ class xasyMainWin:
if(not self.testOrAcquireLock()):
return
self.releaseLock()
- #print "Open a file"
+ #print ("Open a file")
if self.undoRedoStack.changesMade():
- result = tkMessageBox._show("xasy","File has been modified.\nSave changes?",icon=tkMessageBox.QUESTION,type=tkMessageBox.YESNOCANCEL)
- if str(result) == tkMessageBox.CANCEL:
+ result = messagebox._show("xasy","File has been modified.\nSave changes?",icon=messagebox.QUESTION,type=messagebox.YESNOCANCEL)
+ if str(result) == messagebox.CANCEL:
return
- elif result == tkMessageBox.YES:
+ elif result == messagebox.YES:
self.fileSaveCmd()
- filename=tkFileDialog.askopenfilename(filetypes=[("asy files","*.asy"),("All files","*")],title="Open File",parent=self.parent)
+ filename=filedialog.askopenfilename(filetypes=[("asy files","*.asy"),("All files","*")],title="Open File",parent=self.parent)
if type(filename) != type((0,)) and filename != None and filename != '':
self.filename = filename
self.openFile(self.filename)
def fileSaveCmd(self):
- #print "Save current file"
+ #print ("Save current file")
if(not self.testOrAcquireLock()):
return
self.releaseLock()
if self.filename == None:
- filename=tkFileDialog.asksaveasfilename(defaultextension=".asy",filetypes=[("asy files","*.asy")],initialfile="newDrawing.asy",parent=self.parent,title="Save File")
+ filename=filedialog.asksaveasfilename(defaultextension=".asy",filetypes=[("asy files","*.asy")],initialfile="newDrawing.asy",parent=self.parent,title="Save File")
if type(filename) != type((0,)) and filename != None and filename != '':
self.filename = filename
if self.filename != None:
@@ -704,8 +709,8 @@ class xasyMainWin:
if(not self.testOrAcquireLock()):
return
self.releaseLock()
- #print "Save current file as"
- filename=tkFileDialog.asksaveasfilename(defaultextension=".asy",filetypes=[("asy files","*.asy")],initialfile="newDrawing.asy",parent=self.parent,title="Save File")
+ #print ("Save current file as")
+ filename=filedialog.asksaveasfilename(defaultextension=".asy",filetypes=[("asy files","*.asy")],initialfile="newDrawing.asy",parent=self.parent,title="Save File")
if type(filename) != type((0,)) and filename != None and filename != '':
self.filename = filename
self.saveFile(self.filename)
@@ -731,20 +736,20 @@ class xasyMainWin:
return
self.releaseLock()
if inFile == None:
- if tkMessageBox.askyesno("xasy","File has not been saved.\nSave?"):
+ if messagebox.askyesno("xasy","File has not been saved.\nSave?"):
self.fileSaveAsCmd()
inFile = self.filename
else:
return
elif self.undoRedoStack.changesMade():
- choice = tkMessageBox._show("xasy","File has been modified.\nOnly saved changes can be exported.\nDo you want to save changes?",icon=tkMessageBox.QUESTION,type=tkMessageBox.YESNOCANCEL)
+ choice = messagebox._show("xasy","File has been modified.\nOnly saved changes can be exported.\nDo you want to save changes?",icon=messagebox.QUESTION,type=messagebox.YESNOCANCEL)
choice = str(choice)
- if choice != tkMessageBox.YES:
+ if choice != messagebox.YES:
return
else:
self.fileSaveCmd()
name = os.path.splitext(os.path.basename(self.filename))[0]+'.'+outFormat
- outfilename = tkFileDialog.asksaveasfilename(defaultextension = '.'+outFormat,filetypes=[(outFormat+" files","*."+outFormat)],initialfile=name,parent=self.parent,title="Choose output file")
+ outfilename = filedialog.asksaveasfilename(defaultextension = '.'+outFormat,filetypes=[(outFormat+" files","*."+outFormat)],initialfile=name,parent=self.parent,title="Choose output file")
if type(outfilename)==type((0,)) or not outfilename or outfilename == '':
return
fullname = os.path.abspath(outfilename)
@@ -753,13 +758,13 @@ class xasyMainWin:
saver = subprocess.Popen(command,stdin=PIPE,stdout=PIPE,stderr=PIPE)
saver.wait()
if saver.returncode != 0:
- tkMessageBox.showerror("Export Error","Export Error:\n"+saver.stdout.read()+saver.stderr.read())
+ messagebox.showerror("Export Error","Export Error:\n"+saver.stdout.read()+saver.stderr.read())
self.status.config(text="Error exporting file")
else:
self.status.config(text="File exported successfully")
def fileExitCmd(self):
- #print "Exit xasy"
+ #print ("Exit xasy")
self.canQuit()
def editUndoCmd(self):
@@ -779,14 +784,14 @@ class xasyMainWin:
self.releaseLock()
def helpHelpCmd(self):
- print "Get help on xasy"
+ print ("Get help on xasy")
def helpAsyDocCmd(self):
- #print "Open documentation about Asymptote"
+ #print ("Open documentation about Asymptote")
asyExecute("help;\n")
def helpAboutCmd(self):
- tkMessageBox.showinfo("About xasy","A graphical interface for Asymptote "+xasyVersion)
+ messagebox.showinfo("About xasy","A graphical interface for Asymptote "+xasyVersion)
def updateSelectedButton(self,newB):
if(not self.testOrAcquireLock()):
@@ -847,8 +852,8 @@ class xasyMainWin:
self.unbindGlobalEvents()
try:
self.getNewText("// enter your code here")
- except Exception, e:
- tkMessageBox.showerror('xasy Error',e.message)
+ except Exception as e:
+ messagebox.showerror('xasy Error',e.message)
else:
self.addItemToFile(xasyScript(self.mainCanvas))
text = self.newText
@@ -963,7 +968,7 @@ class xasyMainWin:
self.setSelection(item.IDTag)
def propSelect(self,event):
- items = map(int, self.propList.curselection())
+ items = [int(a) for a in self.propList.curselection()]
if len(items)>0:
try:
self.selectItem(self.fileItems[len(self.fileItems)-items[0]-1])
@@ -979,7 +984,7 @@ class xasyMainWin:
else:
if item.IDTag == ID:
return item
- raise Exception,"Illegal operation: Item with matching ID could not be found."
+ raise Exception("Illegal operation: Item with matching ID could not be found.")
def findItemImageIndex(self,item,ID):
count = 0
@@ -988,7 +993,7 @@ class xasyMainWin:
return count
else:
count += 1
- raise Exception,"Illegal operation: Image with matching ID could not be found."
+ raise Exception("Illegal operation: Image with matching ID could not be found.")
return None
def raiseSomething(self,item,force=False):
@@ -1057,9 +1062,9 @@ class xasyMainWin:
return asyTransform((shift[0],shift[1],rotMat[0],rotMat[1],rotMat[2],rotMat[3]))
def rotateSomething(self,ID,theta,origin,specificItem=None,specificIndex=None):
- #print "Rotating by",theta*180.0/math.pi,"around",origin
+ #print ("Rotating by {} around {}".format(theta*180.0/math.pi,origin))
rotMat = self.makeRotationMatrix(theta,(origin[0]/self.magnification,origin[1]/self.magnification))
- #print rotMat
+ #print (rotMat)
if ID == -1:
item = specificItem
else:
@@ -1098,9 +1103,9 @@ class xasyMainWin:
p3 = rotMat2*(oldBbox[2],-oldBbox[1])
newTopLeft = (min(p0[0],p1[0],p2[0],p3[0]),-max(p0[1],p1[1],p2[1],p3[1]))#switch back to screen coords
shift = (newTopLeft[0]-oldBbox[0],newTopLeft[1]-oldBbox[3])
- #print theta*180.0/math.pi,origin,oldBbox,newTopLeft,shift
- #print item.imageList[index].originalImage.size
- #print item.imageList[index].image.size
+ #print (theta*180.0/math.pi,origin,oldBbox,newTopLeft,shift)
+ #print (item.imageList[index].originalImage.size)
+ #print (item.imageList[index].image.size)
#print
self.mainCanvas.coords(ID,oldBbox[0]+shift[0],oldBbox[3]+shift[1])
else:
@@ -1179,8 +1184,8 @@ class xasyMainWin:
oldText = item.script
try:
self.getNewText(oldText)
- except Exception,e:
- tkMessageBox.showerror('xasy Error',e.message)
+ except Exception as e:
+ messagebox.showerror('xasy Error',e.message)
else:
if self.newText != oldText:
self.undoRedoStack.add(editScriptAction(self,item,self.newText,oldText))
@@ -1189,7 +1194,7 @@ class xasyMainWin:
self.bindItemEvents(item)
self.bindGlobalEvents()
elif isinstance(item,xasyText):
- theText = tkSimpleDialog.askstring(title="Xasy - Text",prompt="Enter text to display:",initialvalue=item.label.text,parent=self.parent)
+ theText = simpledialog.askstring(title="Xasy - Text",prompt="Enter text to display:",initialvalue=item.label.text,parent=self.parent)
if theText != None and theText != "":
self.undoRedoStack.add(editLabelTextAction(self,item,theText,item.label.text))
item.label.text = theText
@@ -1264,7 +1269,7 @@ class xasyMainWin:
self.setSelection(CURRENT)
def itemToggleSelect(self,event):
- #print "control click"
+ #print ("control click")
x0,y0 = self.mainCanvas.canvasx(event.x),self.mainCanvas.canvasy(event.y)
x = x0/self.magnification
y = y0/self.magnification
@@ -1356,7 +1361,7 @@ class xasyMainWin:
elif self.selectedButton == self.toolFillEllipButton:
pass
elif self.selectedButton == self.toolTextButton:
- theText = tkSimpleDialog.askstring(title="Xasy - Text",prompt="Enter text to display:",initialvalue="",parent=self.parent)
+ theText = simpledialog.askstring(title="Xasy - Text",prompt="Enter text to display:",initialvalue="",parent=self.parent)
if theText != None and theText != "":
theItem = xasyText(theText,(x,-y),asyPen(self.penColor,self.penWidth,self.penOptions))
theItem.drawOnCanvas(self.mainCanvas,self.magnification)
@@ -1431,7 +1436,7 @@ class xasyMainWin:
self.releaseLock()
def canvLeftDown(self,event):
- #print "Left Mouse Down"
+ #print ("Left Mouse Down")
self.selectDragStart = (self.mainCanvas.canvasx(event.x),self.mainCanvas.canvasy(event.y))
theBbox = self.mainCanvas.bbox("selectedItem")
if theBbox != None:
@@ -1449,7 +1454,7 @@ class xasyMainWin:
self.startDraw(event)
def canvLeftUp(self,event):
- #print "Left Mouse Up"
+ #print ("Left Mouse Up")
# if we're busy, ignore it
if not self.testOrAcquireLock():
return
@@ -1543,11 +1548,11 @@ class xasyMainWin:
def canvRightDown(self,event):
pass
- #print "Right Mouse Down"
+ #print ("Right Mouse Down")
def canvRightUp(self,event):
pass
- #print "Right Mouse Up"
+ #print ("Right Mouse Up")
def configEvt(self,event):
self.updateCanvasSize()
@@ -1573,7 +1578,7 @@ class xasyMainWin:
self.itemEdit(self.itemPopupMenu.item)
def popupViewCode(self):
- tkMessageBox.showinfo("Item Code",self.itemPopupMenu.item.getCode())
+ messagebox.showinfo("Item Code",self.itemPopupMenu.item.getCode())
def popupClearTransform(self):
self.undoRedoStack.add(clearItemTransformsAction(self,self.itemPopupMenu.item,copy.deepcopy(self.itemPopupMenu.item.transform)))
diff --git a/Master/texmf-dist/asymptote/GUI/xasyOptions.py b/Master/texmf-dist/asymptote/GUI/xasyOptions.py
index 17d58d760e5..927490b77aa 100755
--- a/Master/texmf-dist/asymptote/GUI/xasyOptions.py
+++ b/Master/texmf-dist/asymptote/GUI/xasyOptions.py
@@ -81,16 +81,16 @@ def load():
try:
os.makedirs(thedir)
except:
- raise Exception,"Could not create configuration folder"
+ raise Exception("Could not create configuration folder")
if not os.path.isdir(thedir):
- raise Exception,"Configuration folder path does not point to a folder"
+ raise Exception("Configuration folder path does not point to a folder")
setDefaults()
try:
f = open(fileName,"rb")
newOptions = pickle.load(f)
for key in options.keys():
if type(newOptions[key]) != type(options[key]):
- raise Exception,"Bad type for entry in xasy settings"
+ raise Exception("Bad type for entry in xasy settings")
options = newOptions
except:
setDefaults()
@@ -103,24 +103,24 @@ def save():
pickle.dump(options,f)
f.close()
except:
- raise Exception,"Error saving preferences"
+ raise Exception("Error saving preferences")
load()
if __name__=='__main__':
- print settingsFileLocation()
- print "Current content"
+ print (settingsFileLocation())
+ print ("Current content")
load()
- print "Setting defaults"
+ print ("Setting defaults")
setDefaults()
save()
load()
options['showAxes'] = options['showGrid'] = False
save()
- print "Set to False"
+ print ("Set to False")
load()
options['showAxes'] = options['showGrid'] = True
save()
- print "Set to True"
+ print ("Set to True")
load()
- print options
+ print (options)
diff --git a/Master/texmf-dist/asymptote/GUI/xasyOptionsDialog.py b/Master/texmf-dist/asymptote/GUI/xasyOptionsDialog.py
index c3162e8673b..271070ea457 100755
--- a/Master/texmf-dist/asymptote/GUI/xasyOptionsDialog.py
+++ b/Master/texmf-dist/asymptote/GUI/xasyOptionsDialog.py
@@ -10,20 +10,26 @@
#
###########################################################################
-from Tkinter import *
-import xasyOptions
-import tkSimpleDialog
-import xasyColorPicker
-import tkMessageBox
-import tkFileDialog
-import tkColorChooser
import os
import sys
+import xasyOptions
+import xasyColorPicker
-class xasyOptionsDlg(tkSimpleDialog.Dialog):
+if sys.version_info >= (3, 0):
+ from tkinter import *
+ from tkinter import simpledialog, messagebox, filedialog
+else:
+ # python2
+ from Tkinter import *
+ import tkSimpleDialog as simpledialog
+ import tkMessageBox as messagebox
+ import tkFileDialog as filedialog
+ # import tkColorChooser as colorchooser
+
+class xasyOptionsDlg(simpledialog.Dialog):
"""A dialog to interact with users about their preferred settings"""
def __init__(self,master=None):
- tkSimpleDialog.Dialog.__init__(self,master,"xasy Options")
+ simpledialog.Dialog.__init__(self,master,"xasy Options")
def body(self,master):
optFrame = Frame(master)
@@ -116,9 +122,9 @@ class xasyOptionsDlg(tkSimpleDialog.Dialog):
def findEEPath(self):
if sys.platform[:3] == 'win': #for windows, wince, win32, etc
- file=tkFileDialog.askopenfile(filetypes=[("Programs","*.exe"),("All files","*")],title="Choose External Editor",parent=self)
+ file=filedialog.askopenfile(filetypes=[("Programs","*.exe"),("All files","*")],title="Choose External Editor",parent=self)
else:
- file=tkFileDialog.askopenfile(filetypes=[("All files","*")],title="Choose External Editor",parent=self)
+ file=filedialog.askopenfile(filetypes=[("All files","*")],title="Choose External Editor",parent=self)
if file != None:
name = os.path.abspath(file.name)
file.close()
@@ -128,9 +134,9 @@ class xasyOptionsDlg(tkSimpleDialog.Dialog):
def findAsyPath(self):
if sys.platform[:3] == 'win': #for windows, wince, win32, etc
- file=tkFileDialog.askopenfile(filetypes=[("Programs","*.exe"),("All files","*")],title="Find Asymptote Executable",parent=self)
+ file=filedialog.askopenfile(filetypes=[("Programs","*.exe"),("All files","*")],title="Find Asymptote Executable",parent=self)
else:
- file=tkFileDialog.askopenfile(filetypes=[("All files","*")],title="Find Asymptote Executable",parent=self)
+ file=filedialog.askopenfile(filetypes=[("All files","*")],title="Find Asymptote Executable",parent=self)
if file != None:
name = os.path.abspath(file.name)
file.close()
@@ -183,13 +189,13 @@ class xasyOptionsDlg(tkSimpleDialog.Dialog):
#validate the color
hexdigits = '0123456789abcdef'
if not self.validateAColor(self.pc):
- tkMessageBox.showerror("xasy Options","Invalid pen color.\r\n"+self.pc,parent=self)
+ messagebox.showerror("xasy Options","Invalid pen color.\r\n"+self.pc,parent=self)
return False
#validate the width
try:
test = float(self.pw.get())
except:
- tkMessageBox.showerror("xasy Options","Pen width must be a number.",parent=self)
+ messagebox.showerror("xasy Options","Pen width must be a number.",parent=self)
return False
#validate the options
@@ -200,7 +206,7 @@ class xasyOptionsDlg(tkSimpleDialog.Dialog):
test = int(self.axs.get())
test = int(self.ays.get())
except:
- tkMessageBox.showerror("xasy Options","Axes' x- and y-spacing must be numbers.",parent=self)
+ messagebox.showerror("xasy Options","Axes' x- and y-spacing must be numbers.",parent=self)
return False
#validate the grid spacing
@@ -208,15 +214,15 @@ class xasyOptionsDlg(tkSimpleDialog.Dialog):
test = int(self.gxs.get())
test = int(self.gys.get())
except:
- tkMessageBox.showerror("xasy Options","Grid's x- and y-spacing must be numbers.",parent=self)
+ messagebox.showerror("xasy Options","Grid's x- and y-spacing must be numbers.",parent=self)
return False
if not self.validateAColor(self.ac):
- tkMessageBox.showerror("xasy Options","Invalid axis color.\r\n"+self.ac,parent=self)
+ messagebox.showerror("xasy Options","Invalid axis color.\r\n"+self.ac,parent=self)
return False
if not self.validateAColor(self.gc):
- tkMessageBox.showerror("xasy Options","Invalid grid color.\r\n"+self.gc,parent=self)
+ messagebox.showerror("xasy Options","Invalid grid color.\r\n"+self.gc,parent=self)
return False
return True
@@ -225,4 +231,4 @@ if __name__ == '__main__':
root = Tk()
xasyOptions.load()
d = xasyOptionsDlg(root)
- print d.result
+ print (d.result)
diff --git a/Master/texmf-dist/asymptote/GUI/xasyVersion.py b/Master/texmf-dist/asymptote/GUI/xasyVersion.py
index 4d81598bbd8..83cd6c96fa7 100755
--- a/Master/texmf-dist/asymptote/GUI/xasyVersion.py
+++ b/Master/texmf-dist/asymptote/GUI/xasyVersion.py
@@ -1,2 +1,2 @@
#!/usr/bin/env python
-xasyVersion = "2.35"
+xasyVersion = "2.37"
diff --git a/Master/texmf-dist/asymptote/animation.asy b/Master/texmf-dist/asymptote/animation.asy
index 57e13ab6e03..270adce713a 100644
--- a/Master/texmf-dist/asymptote/animation.asy
+++ b/Master/texmf-dist/asymptote/animation.asy
@@ -139,6 +139,7 @@ struct animation {
string pdf(enclosure enclosure=NoBox, real delay=animationdelay,
string options="", bool keep=settings.keep, bool multipage=true) {
+ settings.twice=true;
if(settings.inlinetex) multipage=true;
if(!global) multipage=false;
if(!pdflatex())
diff --git a/Master/texmf-dist/asymptote/asy-keywords.el b/Master/texmf-dist/asymptote/asy-keywords.el
index 60e35207d61..2b6e9e561d4 100644
--- a/Master/texmf-dist/asymptote/asy-keywords.el
+++ b/Master/texmf-dist/asymptote/asy-keywords.el
@@ -2,7 +2,7 @@
;; This file is automatically generated by asy-list.pl.
;; Changes will be overwritten.
;;
-(defvar asy-keywords-version "2.35")
+(defvar asy-keywords-version "2.37")
(defvar asy-keyword-name '(
and controls tension atleast curl if else while for do return break continue struct typedef new access import unravel from include quote static public private restricted this explicit true false null cycle newframe operator ))
@@ -11,7 +11,7 @@ and controls tension atleast curl if else while for do return break continue str
Braid FitResult Label Legend Solution TreeNode abscissa arc arrowhead binarytree binarytreeNode block bool bool3 bounds bqe circle conic coord coordsys cputime ellipse evaluatedpoint file filltype frame grid3 guide horner hsv hyperbola indexedTransform int inversion key light line linefit marginT marker mass object pair parabola patch path path3 pen picture point position positionedvector projection real revolution scaleT scientific segment side slice solution splitface string surface tensionSpecifier ticklocate ticksgridT tickvalues transform transformation tree triangle trilinear triple vector vertex void ))
(defvar asy-function-name '(
-AND Arc ArcArrow ArcArrows Arrow Arrows AtA Automatic AvantGarde B03 B13 B23 B33 BBox BWRainbow BWRainbow2 Bar Bars BeginArcArrow BeginArrow BeginBar BeginDotMargin BeginMargin BeginPenMargin Blank Bookman Bottom BottomTop Bounds Break Broken BrokenLog CLZ CTZ Ceil Circle CircleBarIntervalMarker Cos Courier CrossIntervalMarker DOSendl DOSnewl DefaultFormat DefaultLogFormat Degrees Dir DotMargin DotMargins Dotted Draw Drawline Embed EndArcArrow EndArrow EndBar EndDotMargin EndMargin EndPenMargin Fill FillDraw Floor Format Full Gaussian Gaussrand Gaussrandpair Gradient Grayscale Helvetica Hermite HookHead InOutTicks InTicks Jn Label Landscape Left LeftRight LeftTicks Legend Linear Log LogFormat Margin Margins Mark MidArcArrow MidArrow NOT NewCenturySchoolBook NoBox NoMargin NoModifier NoTicks NoTicks3 NoZero NoZeroFormat None OR OmitFormat OmitTick OmitTickInterval OmitTickIntervals OutTicks Ox Oy Palatino PaletteTicks Pen PenMargin PenMargins Pentype Portrait RadialShade RadialShadeDraw Rainbow Range Relative Right RightTicks Rotate Round SQR Scale ScaleX ScaleY ScaleZ Seascape Shift Sin Slant Spline StickIntervalMarker Straight Symbol Tan TeXify Ticks Ticks3 TildeIntervalMarker TimesRoman Top TrueMargin UnFill UpsideDown Wheel X XEquals XOR XY XYEquals XYZero XYgrid XZEquals XZZero XZero XZgrid Y YEquals YXgrid YZ YZEquals YZZero YZero YZgrid Yn Z ZX ZXgrid ZYgrid ZapfChancery ZapfDingbats _begingroup3 _cputime _draw _eval _image _labelpath _projection _strokepath _texpath aCos aSin aTan abort abs accel acos acosh acot acsc activatequote add addArrow addMargins addSaveFunction addpenarc addpenline addseg adjust alias align all altitude angabscissa angle angledegrees angpoint animate annotate anticomplementary antipedal apply applytranspose approximate arc arcarrowsize arccircle arcdir arcfromcenter arcfromfocus arclength arcnodesnumber arcpoint arcsubtended arcsubtendedcenter arctime arctopath array arrow arrow2 arrowbase arrowbasepoints arrowsize ascii asec asin asinh ask assert asy asycode asydir asyfigure asyfilecode asyinclude asywrite atan atan2 atanh atbreakpoint atexit attach attract atupdate autoformat autoscale autoscale3 axes axes3 axialshade axis axiscoverage azimuth babel background bangles bar barmarksize barsize basealign baseline bbox beep begin beginclip begingroup beginpoint between bevel bezier bezierP bezierPP bezierPPP bezulate bibliography bibliographystyle binarytree binarytreeNode binomial bins bisector bisectorpoint bispline blend blockconnector box bqe brace breakpoint breakpoints brick buildRestoreDefaults buildRestoreThunk buildcycle bulletcolor byte calculateScaling canonical canonicalcartesiansystem cartesiansystem case1 case2 case3 cbrt cd ceil center centerToFocus centroid cevian change2 changecoordsys checkSegment check_fpt_zero checkconditionlength checker checkincreasing checklengths checkposition checkpt checkptincube checktriangle choose circle circlebarframe circlemarkradius circlenodesnumber circumcenter circumcircle clamped clear clip clipdraw close cmyk code colatitude collect collinear color colorless colors colorspace comma compassmark complement complementary concat concurrent cone conic conicnodesnumber conictype conj connect containmentTree contains contour contour3 controlSpecifier convert coordinates coordsys copy copyPairOrTriple cos cosh cot countIntersections cputime crop cropcode cross crossframe crosshatch crossmarksize csc cubicroots curabscissa curlSpecifier curpoint currentarrow currentexitfunction currentmomarrow currentpolarconicroutine curve cut cutafter cutbefore cyclic cylinder deactivatequote debugger deconstruct defaultdir defaultformat defaultpen defined degenerate degrees delete deletepreamble determinant diagonal diamond diffdiv dir dirSpecifier dirtime display distance divisors do_overpaint dot dotframe dotsize downcase draw drawAll drawDoubleLine drawFermion drawGhost drawGluon drawMomArrow drawPRCcylinder drawPRCdisk drawPRCsphere drawPRCtube drawPhoton drawScalar drawVertex drawVertexBox drawVertexBoxO drawVertexBoxX drawVertexO drawVertexOX drawVertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawline drawpixel drawtick duplicate elle ellipse ellipsenodesnumber embed embed3 embedplayer empty enclose end endScript endclip endgroup endgroup3 endl endpoint endpoints eof eol equation equations erase erasestep erf erfc error errorbar errorbars eval excenter excircle exit exitXasyMode exitfunction exp expfactors expi expm1 exradius extend extension extouch fabs factorial fermat fft fhorner figure file filecode fill filldraw filloutside fillrule filltype find findroot finite finiteDifferenceJacobian firstcut firstframe fit fit2 fixedscaling floor flush fmdefaults fmod focusToCenter font fontcommand fontsize foot format frac frequency fromCenter fromFocus fspline functionshade gamma generate_random_backtrace generateticks gergonne getc getint getpair getreal getstring gettriple gluon gouraudshade graph graphic gray grestore grid grid3 gsave halfbox hatch hdiffdiv hermite hex histogram history hline hprojection hsv hyperbola hyperbolanodesnumber hyperlink hypot identity image implicitsurface incenter incentral incircle increasing incrementposition indexedTransform indexedfigure initXasyMode initdefaults input inradius insert inside insphere integrate interactive interior interp interpolate intersect intersection intersectionpoint intersectionpoints intersections intouch inverse inversion invisible is3D isDuplicate isnan isogonal isogonalconjugate isotomic isotomicconjugate isparabola italic item jobname key kurtosis kurtosisexcess label labelaxis labelmargin labelpath labels labeltick labelx labelx3 labely labely3 labelz labelz3 lastcut latex latitude latticeshade layer layout ldexp leastsquares legend legenditem length lexorder lift light limits line linear linecap lineinversion linejoin linemargin lineskip linetype linewidth link list lm_enorm lm_evaluate_default lm_lmdif lm_lmpar lm_minimize lm_print_default lm_print_quiet lm_qrfac lm_qrsolv locale locate locatefile location log log10 log1p logaxiscoverage longitude lookup make3dgrid makeNode makecircle makedraw makepen map margin markangle markangleradius markanglespace markarc marker markinterval marknodes markrightangle markthin markuniform mass masscenter massformat math max max3 maxAfterTransform maxbezier maxbound maxcoords maxlength maxratio maxtimes mean medial median midpoint min min3 minAfterTransform minbezier minbound minipage minratio mintimes miterlimit mktemp momArrowPath momarrowsize monotonic multifigure nGrad nativeformat natural needshipout newl newpage newslide newton newtree nextframe nextnormal nextpage nib nodabscissa none norm normalout normalvideo notaknot nowarn numberpage nurb object offset onpath opacity opposite orient orientation origin orthic orthocentercenter outformat outline outname outprefix output overloadedMessage overwrite pack pad pairs palette parabola parabolanodesnumber parallel parallelogram partialsum patchwithnormals path path3 pathbetween pathinface pattern pause pdf pedal periodic perp perpendicular perpendicularmark phantom phi1 phi2 phi3 photon piecewisestraight point polar polarconicroutine polargraph polygon postcontrol postscript pow10 ppoint prc prc0 prconly precision precontrol prepend printBytecode print_random_addresses project projection projecttospan projecttospan_findcoeffs purge pwhermite quadpatches quadrant quadraticroots quantize quarticroots quotient radialshade radians radicalcenter radicalline radius rand randompath rd readline realmult realquarticroots rectangle rectangular rectify reflect relabscissa relative relativedistance reldir relpoint reltime remainder remark removeDuplicates rename replace report resetdefaultpen restore restoredefaults reverse reversevideo rf rfind rgb rgba rgbint rms rotate rotateO rotation round roundbox roundedpath roundrectangle samecoordsys sameside sample save savedefaults saveline scale scale3 scaleO scaleT scaleless scientific search searchtree sec secondaryX secondaryY seconds section sector seek seekeof segment segmentlimits sequence setpens sgn sgnd sharpangle sharpdegrees shift shiftless shipout shipout3 show simeq simpson sin sinh size size3 skewness skip slant sleep slice slope slopefield solve solveBVP sort sourceline sphere split sqrt square srand standardizecoordsys startScript stdev step stickframe stickmarksize stickmarkspace stop straight straightness string stripdirectory stripextension stripfile stripsuffix strokepath subdivide subitem subpath substr sum surface symmedial symmedian system tab tableau tan tangent tangential tangents tanh tell tensionSpecifier tensorshade tex texcolor texify texpath texpreamble texreset texshipout texsize textpath thick thin tick tickMax tickMax3 tickMin tickMin3 ticklabelshift ticklocate tildeframe tildemarksize tile tiling time times title titlepage topbox transform transformation transpose trembleFuzz triangle triangleAbc triangleabc triangletoquads triangulate tricoef tridiagonal trilinear trim truepoint tube uncycle unfill uniform unique unit unitrand unitsize unityroot unstraighten upcase updatefunction uperiodic upscale uptodate usepackage usersetting usetypescript usleep value variance variancebiased vbox vector vectorfield verbatim view vline vperiodic vprojection warn warning windingnumber write xaxis xaxis3 xaxis3At xaxisAt xequals xlimits xpart xscale xscaleO xtick xtick3 xtrans yaxis yaxis3 yaxis3At yaxisAt yequals ylimits ypart yscale yscaleO ytick ytick3 ytrans zaxis3 zaxis3At zero zero3 zlimits zpart ztick ztick3 ztrans ))
+AND Arc ArcArrow ArcArrows Arrow Arrows AtA Automatic AvantGarde B03 B13 B23 B33 BBox BWRainbow BWRainbow2 Bar Bars BeginArcArrow BeginArrow BeginBar BeginDotMargin BeginMargin BeginPenMargin Blank Bookman Bottom BottomTop Bounds Break Broken BrokenLog CLZ CTZ Ceil Circle CircleBarIntervalMarker Cos Courier CrossIntervalMarker DOSendl DOSnewl DefaultFormat DefaultLogFormat Degrees Dir DotMargin DotMargins Dotted Draw Drawline Embed EndArcArrow EndArrow EndBar EndDotMargin EndMargin EndPenMargin Fill FillDraw Floor Format Full Gaussian Gaussrand Gaussrandpair Gradient Grayscale Helvetica Hermite HookHead InOutTicks InTicks Jn Label Landscape Left LeftRight LeftTicks Legend Linear Log LogFormat Margin Margins Mark MidArcArrow MidArrow NOT NewCenturySchoolBook NoBox NoMargin NoModifier NoTicks NoTicks3 NoZero NoZeroFormat None OR OmitFormat OmitTick OmitTickInterval OmitTickIntervals OutTicks Ox Oy Palatino PaletteTicks Pen PenMargin PenMargins Pentype Portrait RadialShade RadialShadeDraw Rainbow Range Relative Right RightTicks Rotate Round SQR Scale ScaleX ScaleY ScaleZ Seascape Shift Sin Slant Spline StickIntervalMarker Straight Symbol Tan TeXify Ticks Ticks3 TildeIntervalMarker TimesRoman Top TrueMargin UnFill UpsideDown Wheel X XEquals XOR XY XYEquals XYZero XYgrid XZEquals XZZero XZero XZgrid Y YEquals YXgrid YZ YZEquals YZZero YZero YZgrid Yn Z ZX ZXgrid ZYgrid ZapfChancery ZapfDingbats _begingroup3 _cputime _draw _eval _findroot _image _labelpath _projection _strokepath _texpath aCos aSin aTan abort abs accel acos acosh acot acsc activatequote add addArrow addMargins addSaveFunction addpenarc addpenline addseg adjust alias align all altitude angabscissa angle angledegrees angpoint animate annotate anticomplementary antipedal apply approximate arc arcarrowsize arccircle arcdir arcfromcenter arcfromfocus arclength arcnodesnumber arcpoint arcsubtended arcsubtendedcenter arctime arctopath array arrow arrow2 arrowbase arrowbasepoints arrowsize ascii asec asin asinh ask assert asy asycode asydir asyfigure asyfilecode asyinclude asywrite atan atan2 atanh atbreakpoint atexit attach attract atupdate autoformat autoscale autoscale3 axes axes3 axialshade axis axiscoverage azimuth babel background bangles bar barmarksize barsize basealign baseline bbox beep begin beginclip begingroup beginpoint between bevel bezier bezierP bezierPP bezierPPP bezulate bibliography bibliographystyle binarytree binarytreeNode binomial bins bisector bisectorpoint bispline blend blockconnector box bqe brace breakpoint breakpoints brick buildRestoreDefaults buildRestoreThunk buildcycle bulletcolor byte calculateScaling canonical canonicalcartesiansystem cartesiansystem case1 case2 case3 cbrt cd ceil center centerToFocus centroid cevian change2 changecoordsys checkSegment check_fpt_zero checkconditionlength checker checkincreasing checklengths checkposition checkpt checkptincube checktriangle choose circle circlebarframe circlemarkradius circlenodesnumber circumcenter circumcircle clamped clear clip clipdraw close cmyk code colatitude collect collinear color colorless colors colorspace comma compassmark complement complementary concat concurrent cone conic conicnodesnumber conictype conj connect containmentTree contains contour contour3 controlSpecifier convert coordinates coordsys copy copyPairOrTriple cos cosh cot countIntersections cputime crop cropcode cross crossframe crosshatch crossmarksize csc cubicroots curabscissa curlSpecifier curpoint currentarrow currentexitfunction currentmomarrow currentpolarconicroutine curve cut cutafter cutbefore cyclic cylinder deactivatequote debugger deconstruct defaultdir defaultformat defaultpen defined degenerate degrees delete deletepreamble determinant diagonal diamond diffdiv dir dirSpecifier dirtime display distance divisors do_overpaint dot dotframe dotsize downcase draw drawAll drawDoubleLine drawFermion drawGhost drawGluon drawMomArrow drawPRCcylinder drawPRCdisk drawPRCsphere drawPRCtube drawPhoton drawScalar drawVertex drawVertexBox drawVertexBoxO drawVertexBoxX drawVertexO drawVertexOX drawVertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawbeziertriangle drawline drawpixel drawtick duplicate elle ellipse ellipsenodesnumber embed embed3 embedplayer empty enclose end endScript endclip endgroup endgroup3 endl endpoint endpoints eof eol equation equations erase erasestep erf erfc error errorbar errorbars eval excenter excircle exit exitXasyMode exitfunction exp expfactors expi expm1 exradius extend extension extouch fabs factorial fermat fft fhorner figure file filecode fill filldraw filloutside fillrule filltype find findroot finite finiteDifferenceJacobian firstcut firstframe fit fit2 fixedscaling floor flush fmdefaults fmod focusToCenter font fontcommand fontsize foot format frac frequency fromCenter fromFocus fspline functionshade gamma generate_random_backtrace generateticks gergonne getc getint getpair getreal getstring gettriple gluon gouraudshade graph graphic graphicscale gray grestore grid grid3 gsave halfbox hatch hdiffdiv hermite hex histogram history hline hprojection hsv hyperbola hyperbolanodesnumber hyperlink hypot identity image implicitsurface incenter incentral incircle increasing incrementposition indexedTransform indexedfigure initXasyMode initdefaults input inradius insert inside insphere integrate interactive interior interp interpolate intersect intersection intersectionpoint intersectionpoints intersections intouch inverse inversion invisible is3D isDuplicate isnan isogonal isogonalconjugate isotomic isotomicconjugate isparabola italic item jobname key kurtosis kurtosisexcess label labelaxis labelmargin labelpath labels labeltick labelx labelx3 labely labely3 labelz labelz3 lastcut latex latitude latticeshade layer layout ldexp leastsquares legend legenditem length lexorder lift light limits line linear linecap lineinversion linejoin linemargin lineskip linetype linewidth link list lm_enorm lm_evaluate_default lm_lmdif lm_lmpar lm_minimize lm_print_default lm_print_quiet lm_qrfac lm_qrsolv locale locate locatefile location log log10 log1p logaxiscoverage longitude lookup make3dgrid makeNode makecircle makedraw makepen maketriangle map margin markangle markangleradius markanglespace markarc marker markinterval marknodes markrightangle markthin markuniform mass masscenter massformat math max max3 maxAfterTransform maxbezier maxbound maxcoords maxlength maxratio maxtimes mean medial median midpoint min min3 minAfterTransform minbezier minbound minipage minratio mintimes miterlimit mktemp momArrowPath momarrowsize monotonic multifigure nGrad nativeformat natural needshipout newl newpage newslide newton newtree nextframe nextnormal nextpage nib nodabscissa none norm normalout normalvideo notaknot nowarn numberpage nurb object offset onpath opacity opposite orient orientation origin orthic orthocentercenter outformat outline outname outprefix output overloadedMessage overwrite pack pad pairs palette parabola parabolanodesnumber parallel parallelogram partialsum patchwithnormals path path3 pathbetween pathinface pattern pause pdf pedal periodic perp perpendicular perpendicularmark phantom phi1 phi2 phi3 photon piecewisestraight point polar polarconicroutine polargraph polygon postcontrol postscript pow10 ppoint prc prc0 prconly precision precontrol prepend printBytecode print_random_addresses progress project projection projecttospan projecttospan_findcoeffs purge pwhermite quadpatches quadrant quadraticroots quantize quarticroots quotient radialshade radians radicalcenter radicalline radius rand randompath rd readline realmult realquarticroots rectangle rectangular rectify reflect relabscissa relative relativedistance reldir relpoint reltime remainder remark removeDuplicates rename replace report resetdefaultpen restore restoredefaults reverse reversevideo rf rfind rgb rgba rgbint rms rotate rotateO rotation round roundbox roundedpath roundrectangle samecoordsys sameside sample save savedefaults saveline scale scale3 scaleO scaleT scaleless scientific search searchtree sec secondaryX secondaryY seconds section sector seek seekeof segment segmentlimits sequence setpens sgn sgnd sharpangle sharpdegrees shift shiftless shipout shipout3 show simeq simpson sin sinh size size3 skewness skip slant sleep slice slope slopefield solve solveBVP sort sourceline sphere split sqrt square srand standardizecoordsys startScript stdev step stickframe stickmarksize stickmarkspace stop straight straightness string stripdirectory stripextension stripfile stripsuffix strokepath subdivide subitem subpath substr sum surface symmedial symmedian system tab tableau tan tangent tangential tangents tanh tell tensionSpecifier tensorshade tex texcolor texify texpath texpreamble texreset texshipout texsize textpath thick thin tick tickMax tickMax3 tickMin tickMin3 ticklabelshift ticklocate tildeframe tildemarksize tile tiling time times title titlepage topbox transform transformation transpose trembleFuzz triangle triangleAbc triangleabc triangletoquads trianglewithnormals triangulate tricoef tridiagonal trilinear trim truepoint tube uncycle unfill uniform unique unit unitrand unitsize unityroot unstraighten upcase updatefunction uperiodic upscale uptodate usepackage usersetting usetypescript usleep value variance variancebiased vbox vector vectorfield verbatim view vline vperiodic vprojection warn warning windingnumber write xaxis xaxis3 xaxis3At xaxisAt xequals xlimits xpart xscale xscaleO xtick xtick3 xtrans yaxis yaxis3 yaxis3At yaxisAt yequals ylimits ypart yscale yscaleO ytick ytick3 ytrans zaxis3 zaxis3At zero zero3 zlimits zpart ztick ztick3 ztrans ))
(defvar asy-variable-name '(
-AliceBlue Align Allow AntiqueWhite Apricot Aqua Aquamarine Aspect Azure BeginPoint Beige Bisque Bittersweet Black BlanchedAlmond Blue BlueGreen BlueViolet Both Break BrickRed Brown BurlyWood BurntOrange CCW CW CadetBlue CarnationPink Center Centered Cerulean Chartreuse Chocolate Coeff Coral CornflowerBlue Cornsilk Crimson Crop Cyan Dandelion DarkBlue DarkCyan DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DefaultHead DimGray DodgerBlue Dotted Down Draw E ENE EPS ESE E_Euler E_PC E_RK2 E_RK3BS Emerald EndPoint Euler Fill FillDraw FireBrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite Gold Goldenrod Gray Green GreenYellow Honeydew HookHead Horizontal HotPink I IgnoreAspect IndianRed Indigo Ivory JOIN_IN JOIN_OUT JungleGreen Khaki LM_DWARF LM_MACHEP LM_SQRT_DWARF LM_SQRT_GIANT LM_USERTOL Label Lavender LavenderBlush LawnGreen Left LeftJustified LeftSide LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGreen LightGrey LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow Lime LimeGreen Linear Linen Log Logarithmic Magenta Mahogany Mark MarkFill MarkPath Maroon Max MediumAquamarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed Melon MidPoint MidnightBlue Min MintCream MistyRose Moccasin Move MoveQuiet Mulberry N NE NNE NNW NULL_VERTEX NW NavajoWhite Navy NavyBlue NoAlign NoCrop NoFill NoSide OldLace Olive OliveDrab OliveGreen Orange OrangeRed Orchid Ox Oy PC PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip Peach PeachPuff Periwinkle Peru PineGreen Pink Plum PowderBlue ProcessBlue Purple RK2 RK3 RK3BS RK4 RK5 RK5DP RK5F RawSienna Red RedOrange RedViolet Rhodamine Right RightJustified RightSide RosyBrown RoyalBlue RoyalPurple RubineRed S SE SSE SSW SW SaddleBrown Salmon SandyBrown SeaGreen Seashell Sepia Sienna Silver SimpleHead SkyBlue SlateBlue SlateGray Snow SpringGreen SteelBlue Suppress SuppressQuiet Tan TeXHead Teal TealBlue Thistle Ticksize Tomato Turquoise UnFill Up VERSION Value Vertical Violet VioletRed W WNW WSW Wheat White WhiteSmoke WildStrawberry XHIGH XLOW XYAlign YAlign YHIGH YLOW Yellow YellowGreen YellowOrange ZHIGH ZLOW addpenarc addpenline align allowstepping angularsystem animationdelay appendsuffix arcarrowangle arcarrowfactor arrow2sizelimit arrowangle arrowbarb arrowdir arrowfactor arrowhookfactor arrowlength arrowsizelimit arrowtexfactor authorpen axis axiscoverage axislabelfactor background backgroundcolor backgroundpen barfactor barmarksizefactor basealign baselinetemplate bernstein beveljoin bigvertexpen bigvertexsize black blue bm bottom bp bracedefaultratio braceinnerangle bracemidangle braceouterangle brown bullet byfoci byvertices camerafactor chartreuse circlemarkradiusfactor circlenodesnumberfactor circleprecision circlescale cm codefile codepen codeskip colorPen coloredNodes coloredSegments conditionlength conicnodesfactor count cputimeformat crossmarksizefactor currentcoordsys currentlight currentpatterns currentpen currentpicture currentposition currentprojection curvilinearsystem cuttings cyan darkblue darkbrown darkcyan darkgray darkgreen darkgrey darkmagenta darkolive darkred dashdotted dashed datepen dateskip debuggerlines debugging deepblue deepcyan deepgray deepgreen deepgrey deepmagenta deepred default defaultControl defaultS defaultbackpen defaultcoordsys defaultexcursion defaultfilename defaultformat defaultmassformat defaultpen defaultseparator diagnostics differentlengths dot dotfactor dotframe dotted doublelinepen doublelinespacing down duplicateFuzz ellipsenodesnumberfactor eps epsgeo epsilon evenodd expansionfactor extendcap fermionpen figureborder figuremattpen file3 firstnode firststep foregroundcolor fuchsia fuzz gapfactor ghostpen gluonamplitude gluonpen gluonratio gray green grey hatchepsilon havepagenumber heavyblue heavycyan heavygray heavygreen heavygrey heavymagenta heavyred hline hwratio hyperbolanodesnumberfactor identity4 ignore inXasyMode inch inches includegraphicscommand inf infinity institutionpen intMax intMin invert invisible itempen itemskip itemstep labelmargin landscape lastnode left legendhskip legendlinelength legendmargin legendmarkersize legendmaxrelativewidth legendvskip lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightolive lightred lightyellow linemargin lm_infmsg lm_shortmsg longdashdotted longdashed magenta magneticRadius mantissaBits markangleradius markangleradiusfactor markanglespace markanglespacefactor maxrefinements mediumblue mediumcyan mediumgray mediumgreen mediumgrey mediummagenta mediumred mediumyellow middle minDistDefault minblockheight minblockwidth mincirclediameter minipagemargin minipagewidth minvertexangle miterjoin mm momarrowfactor momarrowlength momarrowmargin momarrowoffset momarrowpen monoPen morepoints nCircle newbulletcolor ngraph nil nmesh nobasealign nodeMarginDefault nodesystem nomarker nopoint noprimary nullpath nullpen numarray ocgindex oldbulletcolor olive orange origin overpaint page pageheight pagemargin pagenumberalign pagenumberpen pagenumberposition pagewidth paleblue palecyan palegray palegreen palegrey palemagenta palered paleyellow parabolanodesnumberfactor perpfactor phi photonamplitude photonpen photonratio pi pink plain plain_bounds plain_scaling plus preamblenodes pt purple r3 r4a r4b randMax realDigits realEpsilon realMax realMin red relativesystem reverse right roundcap roundjoin royalblue salmon saveFunctions scalarpen sequencereal settings shipped signedtrailingzero solid springgreen sqrtEpsilon squarecap squarepen startposition stdin stdout stepfactor stepfraction steppagenumberpen stepping stickframe stickmarksizefactor stickmarkspacefactor swap textpen ticksize tildeframe tildemarksizefactor tinv titlealign titlepagepen titlepageposition titlepen titleskip top trailingzero treeLevelStep treeMinNodeWidth treeNodeStep trembleAngle trembleFrequency trembleRandom undefined unitcircle unitsquare up urlpen urlskip version vertexpen vertexsize viewportmargin viewportsize vline white wye xformStack yellow ylabelwidth zerotickfuzz zerowinding ))
+AliceBlue Align Allow AntiqueWhite Apricot Aqua Aquamarine Aspect Azure BeginPoint Beige Bisque Bittersweet Black BlanchedAlmond Blue BlueGreen BlueViolet Both Break BrickRed Brown BurlyWood BurntOrange CCW CW CadetBlue CarnationPink Center Centered Cerulean Chartreuse Chocolate Coeff Coral CornflowerBlue Cornsilk Crimson Crop Cyan Dandelion DarkBlue DarkCyan DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DefaultHead DimGray DodgerBlue Dotted Down Draw E ENE EPS ESE E_Euler E_PC E_RK2 E_RK3BS Emerald EndPoint Euler Fill FillDraw FireBrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite Gold Goldenrod Gray Green GreenYellow Honeydew HookHead Horizontal HotPink I IgnoreAspect IndianRed Indigo Ivory JOIN_IN JOIN_OUT JungleGreen Khaki LM_DWARF LM_MACHEP LM_SQRT_DWARF LM_SQRT_GIANT LM_USERTOL Label Lavender LavenderBlush LawnGreen Left LeftJustified LeftSide LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGreen LightGrey LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow Lime LimeGreen Linear Linen Log Logarithmic Magenta Mahogany Mark MarkFill MarkPath Maroon Max MediumAquamarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed Melon MidPoint MidnightBlue Min MintCream MistyRose Moccasin Move MoveQuiet Mulberry N NE NNE NNW NULL_VERTEX NW NavajoWhite Navy NavyBlue NoAlign NoCrop NoFill NoSide OldLace Olive OliveDrab OliveGreen Orange OrangeRed Orchid Ox Oy PC PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip Peach PeachPuff Periwinkle Peru PineGreen Pink Plum PowderBlue ProcessBlue Purple RK2 RK3 RK3BS RK4 RK5 RK5DP RK5F RawSienna Red RedOrange RedViolet Rhodamine Right RightJustified RightSide RosyBrown RoyalBlue RoyalPurple RubineRed S SE SSE SSW SW SaddleBrown Salmon SandyBrown SeaGreen Seashell Sepia Sienna Silver SimpleHead SkyBlue SlateBlue SlateGray Snow SpringGreen SteelBlue Suppress SuppressQuiet Tan TeXHead Teal TealBlue Thistle Ticksize Tomato Turquoise UnFill Up VERSION Value Vertical Violet VioletRed W WNW WSW Wheat White WhiteSmoke WildStrawberry XHIGH XLOW XYAlign YAlign YHIGH YLOW Yellow YellowGreen YellowOrange ZHIGH ZLOW addpenarc addpenline align allowstepping angularsystem animationdelay appendsuffix arcarrowangle arcarrowfactor arrow2sizelimit arrowangle arrowbarb arrowdir arrowfactor arrowhookfactor arrowlength arrowsizelimit arrowtexfactor authorpen axis axiscoverage axislabelfactor background backgroundcolor backgroundpen barfactor barmarksizefactor basealign baselinetemplate bernstein beveljoin bigvertexpen bigvertexsize black blue bm bottom bp bracedefaultratio braceinnerangle bracemidangle braceouterangle brown bullet byfoci byvertices camerafactor chartreuse circlemarkradiusfactor circlenodesnumberfactor circleprecision circlescale cm codefile codepen codeskip colorPen coloredNodes coloredSegments conditionlength conicnodesfactor count cputimeformat crossmarksizefactor currentcoordsys currentlight currentpatterns currentpen currentpicture currentposition currentprojection curvilinearsystem cuttings cyan darkblue darkbrown darkcyan darkgray darkgreen darkgrey darkmagenta darkolive darkred dashdotted dashed datepen dateskip debuggerlines debugging deepblue deepcyan deepgray deepgreen deepgrey deepmagenta deepred default defaultControl defaultS defaultbackpen defaultcoordsys defaultexcursion defaultfilename defaultformat defaultmassformat defaultpen defaultseparator diagnostics differentlengths dot dotfactor dotframe dotted doublelinepen doublelinespacing down duplicateFuzz ellipsenodesnumberfactor eps epsgeo epsilon evenodd expansionfactor extendcap fermionpen figureborder figuremattpen file3 firstnode firststep foregroundcolor fuchsia fuzz gapfactor ghostpen gluonamplitude gluonpen gluonratio gray green grey hatchepsilon havepagenumber heavyblue heavycyan heavygray heavygreen heavygrey heavymagenta heavyred hline hwratio hyperbolanodesnumberfactor identity4 ignore inXasyMode inch inches includegraphicscommand inf infinity institutionpen intMax intMin invert invisible itempen itemskip itemstep labelmargin landscape lastnode left legendhskip legendlinelength legendmargin legendmarkersize legendmaxrelativewidth legendvskip lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightolive lightred lightyellow linemargin lm_infmsg lm_shortmsg longdashdotted longdashed magenta magneticRadius mantissaBits markangleradius markangleradiusfactor markanglespace markanglespacefactor maxrefinements mediumblue mediumcyan mediumgray mediumgreen mediumgrey mediummagenta mediumred mediumyellow middle minDistDefault minblockheight minblockwidth mincirclediameter minipagemargin minipagewidth minvertexangle miterjoin mm momarrowfactor momarrowlength momarrowmargin momarrowoffset momarrowpen monoPen morepoints nCircle nan newbulletcolor ngraph nil nmesh nobasealign nodeMarginDefault nodesystem nomarker nopoint noprimary nullpath nullpen numarray ocgindex oldbulletcolor olive orange origin overpaint page pageheight pagemargin pagenumberalign pagenumberpen pagenumberposition pagewidth paleblue palecyan palegray palegreen palegrey palemagenta palered paleyellow parabolanodesnumberfactor perpfactor phi photonamplitude photonpen photonratio pi pink plain plain_bounds plain_scaling plus preamblenodes pt purple r3 r4a r4b randMax realDigits realEpsilon realMax realMin red relativesystem reverse right roundcap roundjoin royalblue salmon saveFunctions scalarpen sequencereal settings shipped signedtrailingzero solid spinner springgreen sqrtEpsilon squarecap squarepen startposition stdin stdout stepfactor stepfraction steppagenumberpen stepping stickframe stickmarksizefactor stickmarkspacefactor swap textpen ticksize tildeframe tildemarksizefactor tinv titlealign titlepagepen titlepageposition titlepen titleskip top trailingzero treeLevelStep treeMinNodeWidth treeNodeStep trembleAngle trembleFrequency trembleRandom undefined unitcircle unitsquare up urlpen urlskip version vertexpen vertexsize viewportmargin viewportsize vline white wye xformStack yellow ylabelwidth zerotickfuzz zerowinding ))
diff --git a/Master/texmf-dist/asymptote/asy-mode.el b/Master/texmf-dist/asymptote/asy-mode.el
index 7ccdfdf1197..c1960e23035 100644
--- a/Master/texmf-dist/asymptote/asy-mode.el
+++ b/Master/texmf-dist/asymptote/asy-mode.el
@@ -1,10 +1,15 @@
-;;; asy-mode.el
+;;; asy-mode.el --- Major mode for editing Asymptote source code.
;; Copyright (C) 2006-8
+
;; Author: Philippe IVALDI 20 August 2006
-;; http://www.piprime.fr/
-;; Modified by: John Bowman
-;;
+;; Maintainer: John Bowman
+;; URL: https://github.com/vectorgraphics/asymptote
+;; Version: 1.6
+;; Keywords: language, mode
+
+;;; License:
+
;; This program is free software ; you can redistribute it and/or modify
;; it under the terms of the GNU Lesser General Public License as published by
;; the Free Software Foundation ; either version 3 of the License, or
@@ -19,7 +24,9 @@
;; along with this program ; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-;; Emacs mode for editing Asymptote source code.
+;;; Commentary
+
+;; Major mode for editing Asymptote source code.
;; INSTALLATION:
;; Place this file (asy-mode.el) and asy-keywords.el in your Emacs load path.
@@ -43,6 +50,8 @@
;;
;; See also paragraph II of the documentation below to automate asy-insinuate-latex.
+;;; Code:
+
(defvar asy-mode-version "1.6")
;;;###autoload
@@ -754,7 +763,7 @@ You should remove the line " (int-to-string (line-number-at-pos)))))))
;; Functions and 'advises' to restrict 'font-lock-unfontify-region'
;; and 'font-lock-fontify-syntactically-region' within lasy-mode
- ;; Special thanks to Olivier Ramaré for his help.
+ ;; Special thanks to Olivier Ramaré for his help.
(when (and (fboundp 'font-lock-add-keywords) (> emacs-major-version 21))
(defun lasy-mode-at-pos (pos &optional interior strictly)
"If point at POS is in an asy environment return the list (start end)."
@@ -1160,7 +1169,7 @@ See `asy-insinuate-latex'."
(defvar lasy-run-tex nil)
(defun lasy-asydef()
- "Return the content between the tags \begin{asydef} and \end{asydef}."
+ "Return the content between the tags \\begin{asydef} and \\end{asydef}."
(save-excursion
(if (re-search-backward "\\\\begin{asydef}" 0 t)
(buffer-substring
@@ -1588,3 +1597,4 @@ If optional argument Force is t then force compilation."
(define-key asy-mode-map (kbd "<C-M-S-return>") 'asy-master-tex-view-ps2pdf-f)
(provide `asy-mode)
+;;; asy-mode.el ends here
diff --git a/Master/texmf-dist/asymptote/bezulate.asy b/Master/texmf-dist/asymptote/bezulate.asy
index 60be8cb7045..38d35718d4a 100644
--- a/Master/texmf-dist/asymptote/bezulate.asy
+++ b/Master/texmf-dist/asymptote/bezulate.asy
@@ -2,7 +2,7 @@
private real fuzz=sqrtEpsilon;
real duplicateFuzz=1e-3; // Work around font errors.
-real maxrefinements=7;
+real maxrefinements=10;
private real[][] intersections(pair a, pair b, path p)
{
@@ -248,7 +248,8 @@ path subdivide(path p)
path q;
int l=length(p);
for(int i=0; i < l; ++i)
- q=q&subpath(p,i,i+0.5)&subpath(p,i+0.5,i+1);
+ q=q&(straight(p,i) ? subpath(p,i,i+1) :
+ subpath(p,i,i+0.5)&subpath(p,i+0.5,i+1));
return cyclic(p) ? q&cycle : q;
}
diff --git a/Master/texmf-dist/asymptote/contour3.asy b/Master/texmf-dist/asymptote/contour3.asy
index 3d925be684e..4977a351bf2 100644
--- a/Master/texmf-dist/asymptote/contour3.asy
+++ b/Master/texmf-dist/asymptote/contour3.asy
@@ -473,9 +473,7 @@ surface surface(vertex[][] g)
surface s=surface(g.length);
for(int i=0; i < g.length; ++i) {
vertex[] cur=g[i];
- s.s[i]=patch(new triple[] {cur[0].v,cur[0].v,cur[1].v,cur[2].v},
- normals=new triple[] {cur[0].normal,cur[0].normal,
- cur[1].normal,cur[2].normal});
+ s.s[i]=patch(cur[0].v--cur[1].v--cur[2].v--cycle);
}
return s;
}
diff --git a/Master/texmf-dist/asymptote/embed.asy b/Master/texmf-dist/asymptote/embed.asy
index 588ad79c283..88495f12128 100644
--- a/Master/texmf-dist/asymptote/embed.asy
+++ b/Master/texmf-dist/asymptote/embed.asy
@@ -2,11 +2,6 @@ if(latex()) {
usepackage("hyperref");
texpreamble("\hypersetup{"+settings.hyperrefOptions+"}");
usepackage("media9","bigfiles");
- texpreamble("\newif\ifplaybutton");
- texpreamble("\count255=\the\catcode`\@\makeatletter%
-\@ifpackagelater{media9}{2013/11/15}{}{\playbuttontrue}%
-\catcode`\@=\the\count255
-%");
}
// For documentation of the options see
@@ -19,11 +14,7 @@ string embedplayer(string name, string text="", string options="",
if(width != 0) options += ",width="+(string) (width/pt)+"pt";
if(height != 0) options += ",height="+(string) (height/pt)+"pt";
return "%
-\ifplaybutton%
-\includemedia["+options+"]{"+text+"}{"+name+"}%
-\else%
-\includemedia[noplaybutton,"+options+"]{"+text+"}{"+name+"}%
-\fi";
+\includemedia[noplaybutton,"+options+"]{"+text+"}{"+name+"}";
}
// Embed media in pdf file
diff --git a/Master/texmf-dist/asymptote/math.asy b/Master/texmf-dist/asymptote/math.asy
index 47044a75df1..9d10e2b7794 100644
--- a/Master/texmf-dist/asymptote/math.asy
+++ b/Master/texmf-dist/asymptote/math.asy
@@ -423,3 +423,29 @@ pair[][] fft(pair[][] a, int sign=1)
}
return transpose(A);
}
+
+// Given a matrix A with independent columns, return
+// the unique vector y minimizing |Ay - b|^2 (the L2 norm).
+// If the columns of A are not linearly independent,
+// throw an error (if warn == true) or return an empty array
+// (if warn == false).
+real[] leastsquares(real[][] A, real[] b, bool warn=true)
+{
+ real[] solution=solve(AtA(A),b*A,warn=false);
+ if (solution.length == 0 && warn)
+ abort("Cannot compute least-squares approximation for " +
+ "a matrix with linearly dependent columns.");
+ return solution;
+}
+
+// Namespace
+struct rootfinder_settings {
+ static real roottolerance = 1e-4;
+}
+
+real findroot(real f(real), real a, real b,
+ real tolerance=rootfinder_settings.roottolerance,
+ real fa=f(a), real fb=f(b))
+{
+ return _findroot(f,a,b,tolerance,fa,fb);
+}
diff --git a/Master/texmf-dist/asymptote/plain_strings.asy b/Master/texmf-dist/asymptote/plain_strings.asy
index f4c856e8ad9..a88e3863416 100644
--- a/Master/texmf-dist/asymptote/plain_strings.asy
+++ b/Master/texmf-dist/asymptote/plain_strings.asy
@@ -179,6 +179,11 @@ string graphic(string name, string options="")
return "\externalfigure["+name+"]["+options+"]";
}
+string graphicscale(real x)
+{
+ return string(settings.tex == "context" ? 1000*x : x);
+}
+
string minipage(string s, real width=100bp)
{
if(latex())
@@ -223,4 +228,25 @@ string phantom(string s)
return settings.tex != "none" ? "\phantom{"+s+"}" : "";
}
+string[] spinner=new string[] {'|','/','-','\\'};
+spinner.cyclic=true;
+
+void progress(bool3 init=default)
+{
+ static int count=-1;
+ static int lastseconds=-1;
+ if(init == true) {
+ lastseconds=0;
+ write(stdout,' ',flush);
+ } else
+ if(init == default) {
+ int seconds=seconds();
+ if(seconds > lastseconds) {
+ lastseconds=seconds;
+ write(stdout,'\b'+spinner[++count],flush);
+ }
+ } else
+ write(stdout,'\b',flush);
+}
+
restricted int ocgindex=0;
diff --git a/Master/texmf-dist/asymptote/smoothcontour3.asy b/Master/texmf-dist/asymptote/smoothcontour3.asy
index 216f3269d92..4fe26654283 100644
--- a/Master/texmf-dist/asymptote/smoothcontour3.asy
+++ b/Master/texmf-dist/asymptote/smoothcontour3.asy
@@ -19,69 +19,7 @@
import graph_settings; // for nmesh
import three;
-
-/***********************************************/
-/******** LINEAR ALGEBRA ROUTINES **************/
-/******** LEAST-SQUARES **************/
-/***********************************************/
-
-// Apply a matrix to a vector.
-real[] apply(real[][] matrix, real[] v) {
- real[] ans = new real[matrix.length];
- for (int r = 0; r < matrix.length; ++r) {
- ans[r] = 0;
- for (int c = 0; c < v.length; ++c) {
- ans[r] += matrix[r][c] * v[c];
- }
- }
- return ans;
-}
-
-// Apply the transpose of a matrix to a vector,
-// without actually forming the transpose.
-real[] applytranspose(real[][] matrix, real[] v) {
- real[] ans = new real[matrix[0].length];
- for (int r = 0; r < ans.length; ++r) ans[r] = 0;
- for (int c = 0; c < matrix.length; ++c) {
- for (int r = 0; r < ans.length; ++r) {
- ans[r] += matrix[c][r] * v[c];
- }
- }
- return ans;
-}
-
-// For a matrix A, returns the matrix product
-// (A transposed) * A.
-// The transpose of A is never actually formed.
-real[][] AtA(real[][] matrix) {
- real[][] toreturn = new real[matrix[0].length][matrix[0].length];
- for (int i = 0; i < toreturn.length; ++i) {
- for (int j = 0; j < toreturn.length; ++j) {
- toreturn [i][j] = 0;
- }
- }
- for (int k = 0; k < matrix.length; ++k) {
- for (int i = 0; i < toreturn.length; ++i) {
- for (int j = 0; j < toreturn.length; ++j) {
- toreturn[i][j] += matrix[k][i] * matrix[k][j];
- }
- }
- }
- return toreturn;
-}
-
-// Assuming A is a matrix with independent columns, returns
-// the unique vector y minimizing |Ay - b|^2 (the L2 norm).
-// If the columns of A are not linearly independent,
-// throws an error (if warn == true) or returns an empty array
-// (if warn == false).
-real[] leastsquares(real[][] A, real[] b, bool warn = true) {
- real[] solution = solve(AtA(A), applytranspose(A, b), warn=false);
- if (solution.length == 0 && warn)
- abort("Cannot compute least-squares approximation for " +
- "a matrix with linearly dependent columns.");
- return solution;
-}
+import math;
/***********************************************/
/******** CREATING BEZIER PATCHES **************/
@@ -126,7 +64,7 @@ function[] bernstein = new function[] {B03, B13, B23, B33};
// the specified boundary path. However, the entries in the array
// remain intact.
patch patchwithnormals(path3 external, triple[] u0normals, triple[] u1normals,
- triple[] v0normals, triple[] v1normals)
+ triple[] v0normals, triple[] v1normals)
{
assert(cyclic(external));
assert(length(external) == 4);
@@ -275,8 +213,8 @@ patch patchwithnormals(path3 external, triple[] u0normals, triple[] u1normals,
real[] solution = leastsquares(matrix, rightvector, warn=false);
if (solution.length == 0) { // if the matrix was singular
- write("Warning: unable to solve matrix for specifying normals "
- + "on bezier patch. Using standard method.");
+ write("Warning: unable to solve matrix for specifying edge normals "
+ + "on bezier patch. Using coons patch.");
return patch(external);
}
@@ -284,22 +222,95 @@ patch patchwithnormals(path3 external, triple[] u0normals, triple[] u1normals,
for (int j = 1; j <= 2; ++j) {
int position = 3 * (2 * (i-1) + (j-1));
controlpoints[i][j] = (solution[position],
- solution[position+1],
- solution[position+2]);
+ solution[position+1],
+ solution[position+2]);
}
}
return patch(controlpoints);
}
-// A wrapper for the previous function when the normal direction
+// This function attempts to produce a Bezier triangle
+// with the specified boundary path and normal directions at the
+// edge midpoints. The bezier triangle should be normal to
+// n1 at point(external, 0.5),
+// normal to n2 at point(external, 1.5), and
+// normal to n3 at point(external, 2.5).
+// The actual normal (as computed by the patch.normal() function)
+// may be parallel to the specified normal, antiparallel, or
+// even zero.
+//
+// A small amount of deviation is allowed in order to stabilize
+// the algorithm (by keeping the mixed partials at the corners from
+// growing too large).
+patch trianglewithnormals(path3 external, triple n1,
+ triple n2, triple n3) {
+ assert(cyclic(external));
+ assert(length(external) == 3);
+ // Use the formal symbols a3, a2b, abc, etc. to denote the control points,
+ // following the Wikipedia article on Bezier triangles.
+ triple a3 = point(external, 0), a2b = postcontrol(external, 0),
+ ab2 = precontrol(external, 1), b3 = point(external, 1),
+ b2c = postcontrol(external, 1), bc2 = precontrol(external, 2),
+ c3 = point(external, 2), ac2 = postcontrol(external, 2),
+ a2c = precontrol(external, 0);
+
+ // Use orthogonal projection to ensure that the normal vectors are
+ // actually normal to the boundary path.
+ triple tangent = dir(external, 0.5);
+ n1 -= dot(n1,tangent)*tangent;
+ n1 = unit(n1);
+
+ tangent = dir(external, 1.5);
+ n2 -= dot(n2,tangent)*tangent;
+ n2 = unit(n2);
+
+ tangent = dir(external, 2.5);
+ n3 -= dot(n3,tangent)*tangent;
+ n3 = unit(n3);
+
+ real wild = 2 * wildnessweight;
+ real[][] matrix = { {n1.x, n1.y, n1.z},
+ {n2.x, n2.y, n2.z},
+ {n3.x, n3.y, n3.z},
+ { wild, 0, 0},
+ { 0, wild, 0},
+ { 0, 0, wild} };
+ real[] rightvector =
+ { dot(n1, (a3 + 3a2b + 3ab2 + b3 - 2a2c - 2b2c)) / 4,
+ dot(n2, (b3 + 3b2c + 3bc2 + c3 - 2ab2 - 2ac2)) / 4,
+ dot(n3, (c3 + 3ac2 + 3a2c + a3 - 2bc2 - 2a2b)) / 4 };
+
+ // The inner control point that minimizes the sum of squares of
+ // the mixed partials on the corners.
+ triple tameinnercontrol =
+ ((a2b + a2c - a3) + (ab2 + b2c - b3) + (ac2 + bc2 - c3)) / 3;
+ rightvector.append(wild * new real[]
+ {tameinnercontrol.x, tameinnercontrol.y, tameinnercontrol.z});
+ real[] solution = leastsquares(matrix, rightvector, warn=false);
+ if (solution.length == 0) { // if the matrix was singular
+ write("Warning: unable to solve matrix for specifying edge normals "
+ + "on bezier triangle. Using coons triangle.");
+ return patch(external);
+ }
+ triple innercontrol = (solution[0], solution[1], solution[2]);
+ return patch(external, innercontrol);
+}
+
+// A wrapper for the previous functions when the normal direction
// is given as a function of direction. The wrapper can also
// accommodate cyclic boundary paths of between one and four
// segments, although the results are best by far when there
-// are four segments.
+// are three or four segments.
patch patchwithnormals(path3 external, triple normalat(triple)) {
assert(cyclic(external));
assert(1 <= length(external) && length(external) <= 4);
+ if (length(external) == 3) {
+ triple n1 = normalat(point(external, 0.5));
+ triple n2 = normalat(point(external, 1.5));
+ triple n3 = normalat(point(external, 2.5));
+ return trianglewithnormals(external, n1, n2, n3);
+ }
while (length(external) < 4) external = external -- cycle;
triple[] u0normals = new triple[3];
triple[] u1normals = new triple[3];
@@ -315,82 +326,6 @@ patch patchwithnormals(path3 external, triple normalat(triple)) {
}
/***********************************************/
-/*********** ROOT-FINDER UTILITY ***************/
-/***********************************************/
-
-// Namespace
-struct rootfinder_settings {
- static real roottolerance = 1e-4;
-}
-
-// Find a root for the specified continuous (but not
-// necessarily differentiable) function. Whatever
-// value t is returned, it is guaranteed that either
-// t is within tolerance of a sign change, or
-// abs(f(t)) <= 0.1 tolerance.
-// An error is thrown if fa and fb are both positive
-// or both negative.
-//
-// In the current implementation, binary search is interleaved
-// with a modified version of linear interpolation.
-real findroot(real f(real), real a, real b,
- real tolerance = rootfinder_settings.roottolerance,
- real fa = f(a), real fb = f(b))
-{
- if (fa == 0) return a;
- if (fb == 0) return b;
- real g(real);
- if (fa < 0) {
- assert(fb > 0);
- g = f;
- } else {
- assert(fb < 0);
- fa = -fa;
- fb = -fb;
- g = new real(real t) { return -f(t); };
- }
-
- real t = a;
- real ft = fa;
-
- while (b - a > tolerance && abs(ft) > 0.1*tolerance) {
- t = a + (b - a) / 2;
- ft = g(t);
- if (ft == 0) return t;
- else if (ft > 0) {
- b = t;
- fb = ft;
- } else if (ft < 0) {
- a = t;
- fa = ft;
- }
-
- // linear interpolation
- t = a - (b - a) / (fb - fa) * fa;
-
- // If the interpolated value is close to one edge of
- // the interval, move it farther away from the edge in
- // an effort to catch the root in the middle.
- if (t - a < (b-a)/8) t = a + 2*(t-a);
- else if (b - t < (b-a)/8) t = b - 2*(b-t);
-
- assert(t >= a && t <= b);
-
- ft = g(t);
- if (ft == 0) return t;
- else if (ft > 0) {
- b = t;
- fb = ft;
- } else if (ft < 0) {
- a = t;
- fa = ft;
- }
-
- }
- return a - (b - a) / (fb - fa) * fa;
-}
-
-/***********************************************/
/********* DUAL CUBE GRAPH UTILITY *************/
/***********************************************/
@@ -466,8 +401,8 @@ struct int_to_intset {
void add(int key, int value) {
for (int i = 0; i < keys.length; ++i) {
if (keys[i] == key) {
- values[i].add(value);
- return;
+ values[i].add(value);
+ return;
}
}
keys.push(key);
@@ -561,9 +496,9 @@ int[] makecircle(edge[] edges) {
if (adjacentvertices.length != 2) return null;
for (int v : adjacentvertices) {
if (v != lastvertex) {
- lastvertex = currentvertex;
- currentvertex = v;
- break;
+ lastvertex = currentvertex;
+ currentvertex = v;
+ break;
}
}
} while (currentvertex != startvertex);
@@ -597,9 +532,10 @@ string operator cast(positionedvector vv) {
// The angle, in degrees, between two vectors.
real angledegrees(triple a, triple b) {
- real lengthprod = abs(a) * abs(b);
+ real dotprod = dot(a,b);
+ real lengthprod = max(abs(a) * abs(b), abs(dotprod));
if (lengthprod == 0) return 0;
- return aCos(dot(a,b) / lengthprod);
+ return aCos(dotprod / lengthprod);
}
// A path (single curved segment) between two points. At each point
@@ -622,10 +558,10 @@ path3 pathbetween(positionedvector v1, positionedvector v2) {
// the span of v1 and v2. If v1 and v2 are dependent, returns an empty array
// (if warn==false) or throws an error (if warn==true).
real[] projecttospan_findcoeffs(triple toproject, triple v1, triple v2,
- bool warn=false) {
+ bool warn=false) {
real[][] matrix = {{v1.x, v2.x},
- {v1.y, v2.y},
- {v1.z, v2.z}};
+ {v1.y, v2.y},
+ {v1.z, v2.z}};
real[] desiredanswer = {toproject.x, toproject.y, toproject.z};
return leastsquares(matrix, desiredanswer, warn=warn);
}
@@ -635,7 +571,7 @@ real[] projecttospan_findcoeffs(triple toproject, triple v1, triple v2,
// a >= mincoeff and b >= mincoeff. If v1 and v2 are linearly dependent,
// return a random (positive) linear combination.
triple projecttospan(triple toproject, triple v1, triple v2,
- real mincoeff = 0.05) {
+ real mincoeff = 0.05) {
real[] coeffs = projecttospan_findcoeffs(toproject, v1, v2, warn=false);
real a, b;
if (coeffs.length == 0) {
@@ -701,25 +637,25 @@ path3 bisector(path3 edgecycle, int[] savevertices) {
int opposite = i + 3;
triple vec = unit(point(edgecycle, opposite) - point(edgecycle, i));
real[] coeffsbegin = projecttospan_findcoeffs(vec, forwarddirections[i],
- backwarddirections[i]);
+ backwarddirections[i]);
if (coeffsbegin.length == 0) continue;
coeffsbegin[0] = max(coeffsbegin[0], mincoeff);
coeffsbegin[1] = max(coeffsbegin[1], mincoeff);
real[] coeffsend = projecttospan_findcoeffs(-vec, forwarddirections[opposite],
- backwarddirections[opposite]);
+ backwarddirections[opposite]);
if (coeffsend.length == 0) continue;
coeffsend[0] = max(coeffsend[0], mincoeff);
coeffsend[1] = max(coeffsend[1], mincoeff);
real goodness = angles[i] * angles[opposite] * coeffsbegin[0] * coeffsend[0]
- * coeffsbegin[1] * coeffsend[1];
+ * coeffsbegin[1] * coeffsend[1];
if (goodness > maxgoodness) {
maxgoodness = goodness;
directionout = coeffsbegin[0] * forwarddirections[i] +
- coeffsbegin[1] * backwarddirections[i];
+ coeffsbegin[1] * backwarddirections[i];
directionin = -(coeffsend[0] * forwarddirections[opposite] +
- coeffsend[1] * backwarddirections[opposite]);
+ coeffsend[1] * backwarddirections[opposite]);
chosenindex = i;
}
}
@@ -738,7 +674,7 @@ path3 bisector(path3 edgecycle, int[] savevertices) {
// A path between two specified points (with specified normals) that lies
// within a specified face of a rectangular solid.
path3 pathinface(positionedvector v1, positionedvector v2,
- triple facenorm, triple edge1normout, triple edge2normout)
+ triple facenorm, triple edge1normout, triple edge2normout)
{
triple dir1 = cross(v1.direction, facenorm);
real dotprod = dot(dir1, edge1normout);
@@ -769,15 +705,16 @@ triple normalout(int face) {
// A path between two specified points (with specified normals) that lies
// within a specified face of a rectangular solid.
path3 pathinface(positionedvector v1, positionedvector v2,
- int face, int edge1face, int edge2face) {
+ int face, int edge1face, int edge2face) {
return pathinface(v1, v2, normalout(face), normalout(edge1face),
- normalout(edge2face));
+ normalout(edge2face));
}
/***********************************************/
/******** DRAWING IMPLICIT SURFACES ************/
/***********************************************/
+// DEPRECATED
// Quadrilateralization:
// Produce a surface (array of *nondegenerate* Bezier patches) with a
// specified three-segment boundary. The surface should approximate the
@@ -787,11 +724,12 @@ path3 pathinface(positionedvector v1, positionedvector v2,
// specified rectangular region, returns a length-zero array.
//
// Dividing a triangle into smaller quadrilaterals this way is opposite
-// the usual trend in mathematics. However, the pathwithnormals algorithm
-// does a poor job of choosing a good surface when the boundary path does
+// the usual trend in mathematics. However, *before the introduction of bezier
+// triangles,* the pathwithnormals algorithm
+// did a poor job of choosing a good surface when the boundary path did
// not consist of four positive-length segments.
patch[] triangletoquads(path3 external, real f(triple), triple grad(triple),
- triple a, triple b) {
+ triple a, triple b) {
static real epsilon = 1e-3;
assert(length(external) == 3);
assert(cyclic(external));
@@ -867,6 +805,65 @@ patch[] triangletoquads(path3 external, real f(triple), triple grad(triple),
patchwithnormals(quad2, grad)};
}
+// Attempts to fill the path external (which should by a cyclic path consisting of
+// three segments) with bezier triangle(s). Returns an empty array if it fails.
+//
+// In more detail: A single bezier triangle is computed using trianglewithnormals. The normals of
+// the resulting triangle at the midpoint of each edge are computed. If any of these normals
+// is in the negative f direction, the external triangle is subdivided into four external triangles
+// and the same procedure is applied to each. If one or more of them has an incorrectly oriented
+// edge normal, the function gives up and returns an empty array.
+//
+// Thus, the returned array consists of 0, 1, or 4 bezier triangles; no other array lengths
+// are possible.
+//
+// This function assumes that the path orientation is consistent with f (and its gradient)
+// -- i.e., that
+// at a corner, (tangent in) x (tangent out) is in the positive f direction.
+patch[] maketriangle(path3 external, real f(triple),
+ triple grad(triple), bool allowsubdivide = true) {
+ assert(cyclic(external));
+ assert(length(external) == 3);
+ triple m1 = point(external, 0.5);
+ triple n1 = unit(grad(m1));
+ triple m2 = point(external, 1.5);
+ triple n2 = unit(grad(m2));
+ triple m3 = point(external, 2.5);
+ triple n3 = unit(grad(m3));
+ patch beziertriangle = trianglewithnormals(external, n1, n2, n3);
+ if (dot(n1, beziertriangle.normal(0.5, 0)) >= 0 &&
+ dot(n2, beziertriangle.normal(0.5, 0.5)) >= 0 &&
+ dot(n3, beziertriangle.normal(0, 0.5)) >= 0)
+ return new patch[] {beziertriangle};
+
+ if (!allowsubdivide) return new patch[0];
+
+ positionedvector m1 = positionedvector(m1, n1);
+ positionedvector m2 = positionedvector(m2, n2);
+ positionedvector m3 = positionedvector(m3, n3);
+ path3 p12 = pathbetween(m1, m2);
+ path3 p23 = pathbetween(m2, m3);
+ path3 p31 = pathbetween(m3, m1);
+ patch[] triangles = maketriangle(p12 & p23 & p31 & cycle, f, grad=grad,
+ allowsubdivide=false);
+ if (triangles.length < 1) return new patch[0];
+
+ triangles.append(maketriangle(subpath(external, -0.5, 0.5) & reverse(p31) & cycle,
+ f, grad=grad, allowsubdivide=false));
+ if (triangles.length < 2) return new patch[0];
+
+ triangles.append(maketriangle(subpath(external, 0.5, 1.5) & reverse(p12) & cycle,
+ f, grad=grad, allowsubdivide=false));
+ if (triangles.length < 3) return new patch[0];
+
+ triangles.append(maketriangle(subpath(external, 1.5, 2.5) & reverse(p23) & cycle,
+ f, grad=grad, allowsubdivide=false));
+ if (triangles.length < 4) return new patch[0];
+
+ return triangles;
+}
+
+
// Returns true if the point is "nonsingular" (in the sense that the magnitude
// of the gradient is not too small) AND very close to the zero locus of f
// (assuming f is locally linear).
@@ -891,14 +888,14 @@ bool checkptincube(triple pt, triple a, triple b) {
if (zmin > zmax) { real t = zmax; zmax=zmin; zmin=t; }
return ((xmin <= pt.x) && (pt.x <= xmax) &&
- (ymin <= pt.y) && (pt.y <= ymax) &&
- (zmin <= pt.z) && (pt.z <= zmax));
+ (ymin <= pt.y) && (pt.y <= ymax) &&
+ (zmin <= pt.z) && (pt.z <= zmax));
}
// A convenience function for combining the previous two tests.
bool checkpt(triple testpt, real f(triple), triple grad(triple),
- triple a, triple b) {
+ triple a, triple b) {
return checkptincube(testpt, a, b) &&
check_fpt_zero(testpt, f, grad);
}
@@ -910,8 +907,8 @@ bool checkpt(triple testpt, real f(triple), triple grad(triple),
// array, which merely indicates that the boundary cycle is too small
// to be worth filling in.
patch[] quadpatches(path3 edgecycle, positionedvector[] corners,
- real f(triple), triple grad(triple),
- triple a, triple b) {
+ real f(triple), triple grad(triple),
+ triple a, triple b, bool usetriangles) {
assert(corners.cyclic);
// The tolerance for considering two points "essentially identical."
@@ -924,8 +921,8 @@ patch[] quadpatches(path3 edgecycle, positionedvector[] corners,
if (corners.length == 2) return new patch[0];
corners.delete(i);
edgecycle = subpath(edgecycle, 0, i)
- & subpath(edgecycle, i+1, length(edgecycle))
- & cycle;
+ & subpath(edgecycle, i+1, length(edgecycle))
+ & cycle;
--i;
assert(length(edgecycle) == corners.length);
}
@@ -937,9 +934,9 @@ patch[] quadpatches(path3 edgecycle, positionedvector[] corners,
if (corners.length == 2) {
// If the area is too small, just ignore it; otherwise, subdivide.
real area0 = abs(cross(-dir(edgecycle, 0, sign=-1, normalize=false),
- dir(edgecycle, 0, sign=1, normalize=false)));
+ dir(edgecycle, 0, sign=1, normalize=false)));
real area1 = abs(cross(-dir(edgecycle, 1, sign=-1, normalize=false),
- dir(edgecycle, 1, sign=1, normalize=false)));
+ dir(edgecycle, 1, sign=1, normalize=false)));
if (area0 < areatolerance && area1 < areatolerance) return new patch[0];
else return null;
}
@@ -947,13 +944,14 @@ patch[] quadpatches(path3 edgecycle, positionedvector[] corners,
for (int i = 0; i < length(edgecycle); ++i) {
if (angledegrees(dir(edgecycle,i,sign=1),
- dir(edgecycle,i+1,sign=-1)) > 80) {
+ dir(edgecycle,i+1,sign=-1)) > 80) {
return null;
}
}
if (length(edgecycle) == 3) {
- patch[] toreturn = triangletoquads(edgecycle, f, grad, a, b);
+ patch[] toreturn = usetriangles ? maketriangle(edgecycle, f, grad)
+ : triangletoquads(edgecycle, f, grad, a, b);
if (toreturn.length == 0) return null;
else return toreturn;
}
@@ -974,8 +972,9 @@ patch[] quadpatches(path3 edgecycle, positionedvector[] corners,
& reverse(middleguide) & cycle;
if (length(edgecycle) == 5) {
path3 secondpatch = middleguide
- & subpath(edgecycle, bisectorindices[1], 5+bisectorindices[0]) & cycle;
- toreturn = triangletoquads(secondpatch, f, grad, a, b);
+ & subpath(edgecycle, bisectorindices[1], 5+bisectorindices[0]) & cycle;
+ toreturn = usetriangles ? maketriangle(secondpatch, f, grad)
+ : triangletoquads(secondpatch, f, grad, a, b);
if (toreturn.length == 0) return null;
toreturn.push(patchwithnormals(firstpatch, grad));
} else {
@@ -984,7 +983,7 @@ patch[] quadpatches(path3 edgecycle, positionedvector[] corners,
& subpath(edgecycle, bisectorindices[1], 6+bisectorindices[0])
& cycle;
toreturn = new patch[] {patchwithnormals(firstpatch, grad),
- patchwithnormals(secondpatch, grad)};
+ patchwithnormals(secondpatch, grad)};
}
return toreturn;
}
@@ -995,8 +994,8 @@ vectorfunction nGrad(real f(triple)) {
static real epsilon = 1e-3;
return new triple(triple v) {
return ( (f(v + epsilon*X) - f(v - epsilon*X)) / (2 epsilon),
- (f(v + epsilon*Y) - f(v - epsilon*Y)) / (2 epsilon),
- (f(v + epsilon*Z) - f(v - epsilon*Z)) / (2 epsilon) );
+ (f(v + epsilon*Y) - f(v - epsilon*Y)) / (2 epsilon),
+ (f(v + epsilon*Z) - f(v - epsilon*Z)) / (2 epsilon) );
};
}
@@ -1015,18 +1014,18 @@ triple operator cast(evaluatedpoint p) { return p.pt; }
// Compute the values of a function at every vertex of an nx by ny by nz
// array of rectangular solids.
evaluatedpoint[][][] make3dgrid(triple a, triple b, int nx, int ny, int nz,
- real f(triple), bool allowzero = false)
+ real f(triple), bool allowzero = false)
{
evaluatedpoint[][][] toreturn = new evaluatedpoint[nx+1][ny+1][nz+1];
for (int i = 0; i <= nx; ++i) {
for (int j = 0; j <= ny; ++j) {
for (int k = 0; k <= nz; ++k) {
- triple pt = (interp(a.x, b.x, i/nx),
- interp(a.y, b.y, j/ny),
- interp(a.z, b.z, k/nz));
- real value = f(pt);
- if (value == 0 && !allowzero) value = 1e-5;
- toreturn[i][j][k] = evaluatedpoint(pt, value);
+ triple pt = (interp(a.x, b.x, i/nx),
+ interp(a.y, b.y, j/ny),
+ interp(a.z, b.z, k/nz));
+ real value = f(pt);
+ if (value == 0 && !allowzero) value = 1e-5;
+ toreturn[i][j][k] = evaluatedpoint(pt, value);
}
}
}
@@ -1045,8 +1044,8 @@ T[][] slice(T[][] a, int start1, int end1, int start2, int end2) {
return toreturn;
}
T[][][] slice(T[][][] a, int start1, int end1,
- int start2, int end2,
- int start3, int end3) {
+ int start2, int end2,
+ int start3, int end3) {
T[][][] toreturn = new T[end1-start1][][];
for (int i = start1; i < end1; ++i) {
toreturn[i-start1] = slice(a[i], start2, end2, start3, end3);
@@ -1062,8 +1061,8 @@ T[][] slice(T[][] a, int start1, int end1, int start2, int end2) {
return toreturn;
}
T[][][] slice(T[][][] a, int start1, int end1,
- int start2, int end2,
- int start3, int end3) {
+ int start2, int end2,
+ int start3, int end3) {
T[][][] toreturn = new T[end1-start1][][];
for (int i = start1; i < end1; ++i) {
toreturn[i-start1] = slice(a[i], start2, end2, start3, end3);
@@ -1083,73 +1082,74 @@ struct gridwithzeros {
triple grad(triple);
real f(triple);
int maxdepth;
+ bool usetriangles;
// Populate the edges with zeros that have a sign change and are not already
// populated.
void fillzeros() {
for (int j = 0; j < ny+1; ++j) {
for (int k = 0; k < nz+1; ++k) {
- real y = corners[0][j][k].pt.y;
- real z = corners[0][j][k].pt.z;
- real f_along_x(real t) { return f((t, y, z)); }
- for (int i = 0; i < nx; ++i) {
- if (xdirzeros[i][j][k] != null) continue;
- evaluatedpoint start = corners[i][j][k];
- evaluatedpoint end = corners[i+1][j][k];
- if ((start.value > 0 && end.value > 0) || (start.value < 0 && end.value < 0))
- xdirzeros[i][j][k] = null;
- else {
- triple root = (0,y,z);
- root += X * findroot(f_along_x, start.pt.x, end.pt.x,
- fa=start.value, fb=end.value);
- triple normal = grad(root);
- xdirzeros[i][j][k] = positionedvector(root, normal);
- }
- }
+ real y = corners[0][j][k].pt.y;
+ real z = corners[0][j][k].pt.z;
+ real f_along_x(real t) { return f((t, y, z)); }
+ for (int i = 0; i < nx; ++i) {
+ if (xdirzeros[i][j][k] != null) continue;
+ evaluatedpoint start = corners[i][j][k];
+ evaluatedpoint end = corners[i+1][j][k];
+ if ((start.value > 0 && end.value > 0) || (start.value < 0 && end.value < 0))
+ xdirzeros[i][j][k] = null;
+ else {
+ triple root = (0,y,z);
+ root += X * findroot(f_along_x, start.pt.x, end.pt.x,
+ fa=start.value, fb=end.value);
+ triple normal = grad(root);
+ xdirzeros[i][j][k] = positionedvector(root, normal);
+ }
+ }
}
}
for (int i = 0; i < nx+1; ++i) {
for (int k = 0; k < nz+1; ++k) {
- real x = corners[i][0][k].pt.x;
- real z = corners[i][0][k].pt.z;
- real f_along_y(real t) { return f((x, t, z)); }
- for (int j = 0; j < ny; ++j) {
- if (ydirzeros[i][j][k] != null) continue;
- evaluatedpoint start = corners[i][j][k];
- evaluatedpoint end = corners[i][j+1][k];
- if ((start.value > 0 && end.value > 0) || (start.value < 0 && end.value < 0))
- ydirzeros[i][j][k] = null;
- else {
- triple root = (x,0,z);
- root += Y * findroot(f_along_y, start.pt.y, end.pt.y,
- fa=start.value, fb=end.value);
- triple normal = grad(root);
- ydirzeros[i][j][k] = positionedvector(root, normal);
- }
- }
+ real x = corners[i][0][k].pt.x;
+ real z = corners[i][0][k].pt.z;
+ real f_along_y(real t) { return f((x, t, z)); }
+ for (int j = 0; j < ny; ++j) {
+ if (ydirzeros[i][j][k] != null) continue;
+ evaluatedpoint start = corners[i][j][k];
+ evaluatedpoint end = corners[i][j+1][k];
+ if ((start.value > 0 && end.value > 0) || (start.value < 0 && end.value < 0))
+ ydirzeros[i][j][k] = null;
+ else {
+ triple root = (x,0,z);
+ root += Y * findroot(f_along_y, start.pt.y, end.pt.y,
+ fa=start.value, fb=end.value);
+ triple normal = grad(root);
+ ydirzeros[i][j][k] = positionedvector(root, normal);
+ }
+ }
}
}
for (int i = 0; i < nx+1; ++i) {
for (int j = 0; j < ny+1; ++j) {
- real x = corners[i][j][0].pt.x;
- real y = corners[i][j][0].pt.y;
- real f_along_z(real t) { return f((x, y, t)); }
- for (int k = 0; k < nz; ++k) {
- if (zdirzeros[i][j][k] != null) continue;
- evaluatedpoint start = corners[i][j][k];
- evaluatedpoint end = corners[i][j][k+1];
- if ((start.value > 0 && end.value > 0) || (start.value < 0 && end.value < 0))
- zdirzeros[i][j][k] = null;
- else {
- triple root = (x,y,0);
- root += Z * findroot(f_along_z, start.pt.z, end.pt.z,
- fa=start.value, fb=end.value);
- triple normal = grad(root);
- zdirzeros[i][j][k] = positionedvector(root, normal);
- }
- }
+ real x = corners[i][j][0].pt.x;
+ real y = corners[i][j][0].pt.y;
+ real f_along_z(real t) { return f((x, y, t)); }
+ for (int k = 0; k < nz; ++k) {
+ if (zdirzeros[i][j][k] != null) continue;
+ evaluatedpoint start = corners[i][j][k];
+ evaluatedpoint end = corners[i][j][k+1];
+ if ((start.value > 0 && end.value > 0) || (start.value < 0 && end.value < 0))
+ zdirzeros[i][j][k] = null;
+ else {
+ triple root = (x,y,0);
+ root += Z * findroot(f_along_z, start.pt.z, end.pt.z,
+ fa=start.value, fb=end.value);
+ triple normal = grad(root);
+ zdirzeros[i][j][k] = positionedvector(root, normal);
+ }
+ }
}
}
}
@@ -1159,14 +1159,15 @@ struct gridwithzeros {
// maximum subdivision depth. When a cube at maxdepth cannot be resolved to
// patches, it is left empty.
void operator init(int nx, int ny, int nz,
- real f(triple), triple a, triple b,
- int maxdepth = 6) {
+ real f(triple), triple a, triple b,
+ int maxdepth = 6, bool usetriangles) {
this.nx = nx;
this.ny = ny;
this.nz = nz;
grad = nGrad(f);
this.f = f;
this.maxdepth = maxdepth;
+ this.usetriangles = usetriangles;
corners = make3dgrid(a, b, nx, ny, nz, f);
xdirzeros = new positionedvector[nx][ny+1][nz+1];
ydirzeros = new positionedvector[nx+1][ny][nz+1];
@@ -1174,11 +1175,11 @@ struct gridwithzeros {
for (int i = 0; i <= nx; ++i) {
for (int j = 0; j <= ny; ++j) {
- for (int k = 0; k <= nz; ++k) {
- if (i < nx) xdirzeros[i][j][k] = null;
- if (j < ny) ydirzeros[i][j][k] = null;
- if (k < nz) zdirzeros[i][j][k] = null;
- }
+ for (int k = 0; k <= nz; ++k) {
+ if (i < nx) xdirzeros[i][j][k] = null;
+ if (j < ny) ydirzeros[i][j][k] = null;
+ if (k < nz) zdirzeros[i][j][k] = null;
+ }
}
}
@@ -1206,18 +1207,18 @@ struct gridwithzeros {
corners = new evaluatedpoint[nx+1][ny+1][nz+1];
for (int i = 0; i <= nx; ++i) {
for (int j = 0; j <= ny; ++j) {
- for (int k = 0; k <= nz; ++k) {
- if (i % 2 == 0 && j % 2 == 0 && k % 2 == 0) {
- corners[i][j][k] = oldcorners[quotient(i,2)][quotient(j,2)][quotient(k,2)];
- } else {
- triple pt = (interp(a.x, b.x, i/nx),
- interp(a.y, b.y, j/ny),
- interp(a.z, b.z, k/nz));
- real value = f(pt);
- if (value == 0) value = 1e-5;
- corners[i][j][k] = evaluatedpoint(pt, value);
- }
- }
+ for (int k = 0; k <= nz; ++k) {
+ if (i % 2 == 0 && j % 2 == 0 && k % 2 == 0) {
+ corners[i][j][k] = oldcorners[quotient(i,2)][quotient(j,2)][quotient(k,2)];
+ } else {
+ triple pt = (interp(a.x, b.x, i/nx),
+ interp(a.y, b.y, j/ny),
+ interp(a.z, b.z, k/nz));
+ real value = f(pt);
+ if (value == 0) value = 1e-5;
+ corners[i][j][k] = evaluatedpoint(pt, value);
+ }
+ }
}
}
@@ -1225,23 +1226,23 @@ struct gridwithzeros {
xdirzeros = new positionedvector[nx][ny+1][nz+1];
for (int i = 0; i < nx; ++i) {
for (int j = 0; j < ny + 1; ++j) {
- for (int k = 0; k < nz + 1; ++k) {
- if (j % 2 != 0 || k % 2 != 0) {
- xdirzeros[i][j][k] = null;
- } else {
- positionedvector zero = oldxdir[quotient(i,2)][quotient(j,2)][quotient(k,2)];
- if (zero == null) {
- xdirzeros[i][j][k] = null;
- continue;
- }
- real x = zero.position.x;
- if (x > interp(a.x, b.x, i/nx) && x < interp(a.x, b.x, (i+1)/nx)) {
- xdirzeros[i][j][k] = zero;
- } else {
- xdirzeros[i][j][k] = null;
- }
- }
- }
+ for (int k = 0; k < nz + 1; ++k) {
+ if (j % 2 != 0 || k % 2 != 0) {
+ xdirzeros[i][j][k] = null;
+ } else {
+ positionedvector zero = oldxdir[quotient(i,2)][quotient(j,2)][quotient(k,2)];
+ if (zero == null) {
+ xdirzeros[i][j][k] = null;
+ continue;
+ }
+ real x = zero.position.x;
+ if (x > interp(a.x, b.x, i/nx) && x < interp(a.x, b.x, (i+1)/nx)) {
+ xdirzeros[i][j][k] = zero;
+ } else {
+ xdirzeros[i][j][k] = null;
+ }
+ }
+ }
}
}
@@ -1249,23 +1250,23 @@ struct gridwithzeros {
ydirzeros = new positionedvector[nx+1][ny][nz+1];
for (int i = 0; i < nx+1; ++i) {
for (int j = 0; j < ny; ++j) {
- for (int k = 0; k < nz + 1; ++k) {
- if (i % 2 != 0 || k % 2 != 0) {
- ydirzeros[i][j][k] = null;
- } else {
- positionedvector zero = oldydir[quotient(i,2)][quotient(j,2)][quotient(k,2)];
- if (zero == null) {
- ydirzeros[i][j][k] = null;
- continue;
- }
- real y = zero.position.y;
- if (y > interp(a.y, b.y, j/ny) && y < interp(a.y, b.y, (j+1)/ny)) {
- ydirzeros[i][j][k] = zero;
- } else {
- ydirzeros[i][j][k] = null;
- }
- }
- }
+ for (int k = 0; k < nz + 1; ++k) {
+ if (i % 2 != 0 || k % 2 != 0) {
+ ydirzeros[i][j][k] = null;
+ } else {
+ positionedvector zero = oldydir[quotient(i,2)][quotient(j,2)][quotient(k,2)];
+ if (zero == null) {
+ ydirzeros[i][j][k] = null;
+ continue;
+ }
+ real y = zero.position.y;
+ if (y > interp(a.y, b.y, j/ny) && y < interp(a.y, b.y, (j+1)/ny)) {
+ ydirzeros[i][j][k] = zero;
+ } else {
+ ydirzeros[i][j][k] = null;
+ }
+ }
+ }
}
}
@@ -1273,23 +1274,23 @@ struct gridwithzeros {
zdirzeros = new positionedvector[nx+1][ny+1][nz];
for (int i = 0; i < nx + 1; ++i) {
for (int j = 0; j < ny + 1; ++j) {
- for (int k = 0; k < nz; ++k) {
- if (i % 2 != 0 || j % 2 != 0) {
- zdirzeros[i][j][k] = null;
- } else {
- positionedvector zero = oldzdir[quotient(i,2)][quotient(j,2)][quotient(k,2)];
- if (zero == null) {
- zdirzeros[i][j][k] = null;
- continue;
- }
- real z = zero.position.z;
- if (z > interp(a.z, b.z, k/nz) && z < interp(a.z, b.z, (k+1)/nz)) {
- zdirzeros[i][j][k] = zero;
- } else {
- zdirzeros[i][j][k] = null;
- }
- }
- }
+ for (int k = 0; k < nz; ++k) {
+ if (i % 2 != 0 || j % 2 != 0) {
+ zdirzeros[i][j][k] = null;
+ } else {
+ positionedvector zero = oldzdir[quotient(i,2)][quotient(j,2)][quotient(k,2)];
+ if (zero == null) {
+ zdirzeros[i][j][k] = null;
+ continue;
+ }
+ real z = zero.position.z;
+ if (z > interp(a.z, b.z, k/nz) && z < interp(a.z, b.z, (k+1)/nz)) {
+ zdirzeros[i][j][k] = zero;
+ } else {
+ zdirzeros[i][j][k] = null;
+ }
+ }
+ }
}
}
@@ -1316,14 +1317,14 @@ struct gridwithzeros {
void pushifnonnull(positionedvector v) {
if (v != null) {
- zeroedges.push(edge(currentface, nextface));
- zeros.push(v);
+ zeroedges.push(edge(currentface, nextface));
+ zeros.push(v);
}
}
positionedvector findzero(int face1, int face2) {
edge e = edge(face1, face2);
for (int i = 0; i < zeroedges.length; ++i) {
- if (zeroedges[i] == e) return zeros[i];
+ if (zeroedges[i] == e) return zeros[i];
}
return null;
}
@@ -1365,7 +1366,7 @@ struct gridwithzeros {
patch[] subdividecube() {
if (!subdivide()) {
- return new patch[0];
+ return new patch[0];
}
return draw(reportactive);
}
@@ -1386,19 +1387,31 @@ struct gridwithzeros {
path3 edgecycle;
for (int i = 0; i < faceorder.length; ++i) {
path3 currentpath = pathinface(patchcorners[i], patchcorners[i+1],
- faceorder[i+1], faceorder[i],
- faceorder[i+2]);
+ faceorder[i+1], faceorder[i],
+ faceorder[i+2]);
triple testpoint = point(currentpath, 0.5);
if (!checkpt(testpoint, f, grad, corners[0][0][0], corners[1][1][1])) {
- return subdividecube();
+ return subdividecube();
}
edgecycle = edgecycle & currentpath;
}
edgecycle = edgecycle & cycle;
+
+ { // Ensure the outward normals are pointing in the same direction as the gradient.
+ triple tangentin = patchcorners[0].position - precontrol(edgecycle, 0);
+ triple tangentout = postcontrol(edgecycle, 0) - patchcorners[0].position;
+ triple normal = cross(tangentin, tangentout);
+ if (dot(normal, patchcorners[0].direction) < 0) {
+ edgecycle = reverse(edgecycle);
+ patchcorners = patchcorners[-sequence(patchcorners.length)];
+ patchcorners.cyclic = true;
+ }
+ }
+
patch[] toreturn = quadpatches(edgecycle, patchcorners, f, grad,
- corners[0][0][0], corners[1][1][1]);
+ corners[0][0][0], corners[1][1][1], usetriangles);
if (alias(toreturn, null)) return subdividecube();
return toreturn;
}
@@ -1413,6 +1426,7 @@ struct gridwithzeros {
cube.ny = 1;
cube.nz = 1;
cube.maxdepth = maxdepth;
+ cube.usetriangles = usetriangles;
cube.corners = slice(corners,i,i+2,j,j+2,k,k+2);
cube.xdirzeros = slice(xdirzeros,i,i+1,j,j+2,k,k+2);
cube.ydirzeros = slice(ydirzeros,i,i+2,j,j+1,k,k+2);
@@ -1434,6 +1448,7 @@ struct gridwithzeros {
// grid will subdivide all the way to maxdepth if necessary to find points
// on the surface.
draw = new patch[](bool[] reportactive = null) {
+ if (alias(reportactive, null)) progress(true);
// A list of all the patches not already drawn but known
// to contain part of the surface. This "queue" is
// actually implemented as stack for simplicity, since
@@ -1444,49 +1459,49 @@ struct gridwithzeros {
bool[][][] enqueued = new bool[nx][ny][nz];
for (int i = 0; i < enqueued.length; ++i) {
for (int j = 0; j < enqueued[i].length; ++j) {
- for (int k = 0; k < enqueued[i][j].length; ++k) {
- enqueued[i][j][k] = false;
- }
+ for (int k = 0; k < enqueued[i][j].length; ++k) {
+ enqueued[i][j][k] = false;
+ }
}
}
void enqueue(int i, int j, int k) {
if (i >= 0 && i < nx
- && j >= 0 && j < ny
- && k >= 0 && k < nz
- && !enqueued[i][j][k]) {
- queue.push((i,j,k));
- enqueued[i][j][k] = true;
+ && j >= 0 && j < ny
+ && k >= 0 && k < nz
+ && !enqueued[i][j][k]) {
+ queue.push((i,j,k));
+ enqueued[i][j][k] = true;
}
if (!alias(reportactive, null)) {
- if (i < 0) reportactive[XLOW] = true;
- if (i >= nx) reportactive[XHIGH] = true;
- if (j < 0) reportactive[YLOW] = true;
- if (j >= ny) reportactive[YHIGH] = true;
- if (k < 0) reportactive[ZLOW] = true;
- if (k >= nz) reportactive[ZHIGH] = true;
+ if (i < 0) reportactive[XLOW] = true;
+ if (i >= nx) reportactive[XHIGH] = true;
+ if (j < 0) reportactive[YLOW] = true;
+ if (j >= ny) reportactive[YHIGH] = true;
+ if (k < 0) reportactive[ZLOW] = true;
+ if (k >= nz) reportactive[ZHIGH] = true;
}
}
for (int i = 0; i < nx+1; ++i) {
for (int j = 0; j < ny+1; ++j) {
- for (int k = 0; k < nz+1; ++k) {
- if (i < nx && xdirzeros[i][j][k] != null) {
- for (int jj = j-1; jj <= j; ++jj)
- for (int kk = k-1; kk <= k; ++kk)
- enqueue(i, jj, kk);
- }
- if (j < ny && ydirzeros[i][j][k] != null) {
- for (int ii = i-1; ii <= i; ++ii)
- for (int kk = k-1; kk <= k; ++kk)
- enqueue(ii, j, kk);
- }
- if (k < nz && zdirzeros[i][j][k] != null) {
- for (int ii = i-1; ii <= i; ++ii)
- for (int jj = j-1; jj <= j; ++jj)
- enqueue(ii, jj, k);
- }
- }
+ for (int k = 0; k < nz+1; ++k) {
+ if (i < nx && xdirzeros[i][j][k] != null) {
+ for (int jj = j-1; jj <= j; ++jj)
+ for (int kk = k-1; kk <= k; ++kk)
+ enqueue(i, jj, kk);
+ }
+ if (j < ny && ydirzeros[i][j][k] != null) {
+ for (int ii = i-1; ii <= i; ++ii)
+ for (int kk = k-1; kk <= k; ++kk)
+ enqueue(ii, j, kk);
+ }
+ if (k < nz && zdirzeros[i][j][k] != null) {
+ for (int ii = i-1; ii <= i; ++ii)
+ for (int jj = j-1; jj <= j; ++jj)
+ enqueue(ii, jj, k);
+ }
+ }
}
}
@@ -1510,9 +1525,9 @@ struct gridwithzeros {
if (reportface[ZLOW]) enqueue(i,j,k-1);
if (reportface[ZHIGH]) enqueue(i,j,k+1);
surface.append(toappend);
- if (settings.verbose > 1 && alias(reportactive, null)) write(stdout, '.');
+ if (alias(reportactive, null)) progress();
}
- if (settings.verbose > 1 && alias(reportactive, null)) write(stdout, '\n');
+ if (alias(reportactive, null)) progress(false);
return surface;
};
}
@@ -1540,22 +1555,25 @@ struct gridwithzeros {
// maxdepth - the maximum depth to which the algorithm will subdivide in
// an effort to find patches that closely approximate the true surface.
surface implicitsurface(real f(triple) = null, real ff(real,real,real) = null,
- triple a, triple b,
- int n = nmesh,
- bool keyword overlapedges = false,
- int keyword nx=n, int keyword ny=n,
- int keyword nz=n,
- int keyword maxdepth = 8) {
+ triple a, triple b,
+ int n = nmesh,
+ bool keyword overlapedges = false,
+ int keyword nx=n, int keyword ny=n,
+ int keyword nz=n,
+ int keyword maxdepth = 8,
+ bool keyword usetriangles=true) {
if (f == null && ff == null)
abort("implicitsurface called without specifying a function.");
if (f != null && ff != null)
abort("Only specify one function when calling implicitsurface.");
if (f == null) f = new real(triple w) { return ff(w.x, w.y, w.z); };
- gridwithzeros grid = gridwithzeros(nx, ny, nz, f, a, b, maxdepth=maxdepth);
+ gridwithzeros grid = gridwithzeros(nx, ny, nz, f, a, b, maxdepth=maxdepth,
+ usetriangles=usetriangles);
patch[] patches = grid.draw();
if (overlapedges) {
for (int i = 0; i < patches.length; ++i) {
- triple center = patches[i].point(1/2,1/2);
+ triple center = (patches[i].triangular ?
+ patches[i].point(1/3, 1/3) : patches[i].point(1/2,1/2));
patches[i] = shift(center) * scale3(1.01) * shift(-center) * patches[i];
}
}
diff --git a/Master/texmf-dist/asymptote/three_surface.asy b/Master/texmf-dist/asymptote/three_surface.asy
index f2f21eb826c..c6d439e9fb0 100644
--- a/Master/texmf-dist/asymptote/three_surface.asy
+++ b/Master/texmf-dist/asymptote/three_surface.asy
@@ -9,12 +9,21 @@ string meshname(string name) {return name+" mesh";}
private real Fuzz=10.0*realEpsilon;
private real nineth=1/9;
+// Return the default Coons interior control point for a Bezier triangle
+// based on the cyclic path3 external.
+triple coons3(path3 external) {
+ return 0.25*(precontrol(external,0)+postcontrol(external,0)+
+ precontrol(external,1)+postcontrol(external,1)+
+ precontrol(external,2)+postcontrol(external,2))-
+ (point(external,0)+point(external,1)+point(external,2))/6;
+}
+
struct patch {
triple[][] P;
- triple[] normals; // Optionally specify 4 normal vectors at the corners.
pen[] colors; // Optionally specify 4 corner colors.
bool straight; // Patch is based on a piecewise straight external path.
bool3 planar; // Patch is planar.
+ bool triangular; // Patch is a Bezier triangle.
path3 external() {
return straight ? P[0][0]--P[3][0]--P[3][3]--P[0][3]--cycle :
@@ -24,22 +33,44 @@ struct patch {
P[0][3]..controls P[0][2] and P[0][1]..cycle;
}
+ path3 externaltriangular() {
+ return
+ P[0][0]..controls P[1][0] and P[2][0]..
+ P[3][0]..controls P[3][1] and P[3][2]..
+ P[3][3]..controls P[2][2] and P[1][1]..cycle;
+ }
+
triple[] internal() {
return new triple[] {P[1][1],P[2][1],P[2][2],P[1][2]};
}
+ triple[] internaltriangular() {
+ return new triple[] {P[2][1]};
+ }
+
triple cornermean() {
return 0.25*(P[0][0]+P[0][3]+P[3][0]+P[3][3]);
}
+ triple cornermeantriangular() {
+ return (P[0][0]+P[3][0]+P[3][3])/3;
+ }
+
triple[] corners() {return new triple[] {P[0][0],P[3][0],P[3][3],P[0][3]};}
+ triple[] cornerstriangular() {return new triple[] {P[0][0],P[3][0],P[3][3]};}
real[] map(real f(triple)) {
return new real[] {f(P[0][0]),f(P[3][0]),f(P[3][3]),f(P[0][3])};
}
+ real[] maptriangular(real f(triple)) {
+ return new real[] {f(P[0][0]),f(P[3][0]),f(P[3][3])};
+ }
+
triple Bu(int j, real u) {return bezier(P[0][j],P[1][j],P[2][j],P[3][j],u);}
- triple BuP(int j, real u) {return bezierP(P[0][j],P[1][j],P[2][j],P[3][j],u);}
+ triple BuP(int j, real u) {
+ return bezierP(P[0][j],P[1][j],P[2][j],P[3][j],u);
+ }
triple BuPP(int j, real u) {
return bezierPP(P[0][j],P[1][j],P[2][j],P[3][j],u);
}
@@ -53,7 +84,9 @@ struct patch {
}
triple Bv(int i, real v) {return bezier(P[i][0],P[i][1],P[i][2],P[i][3],v);}
- triple BvP(int i, real v) {return bezierP(P[i][0],P[i][1],P[i][2],P[i][3],v);}
+ triple BvP(int i, real v) {
+ return bezierP(P[i][0],P[i][1],P[i][2],P[i][3],v);
+ }
triple BvPP(int i, real v) {
return bezierPP(P[i][0],P[i][1],P[i][2],P[i][3],v);
}
@@ -131,13 +164,96 @@ struct patch {
return abs(n) > epsilon ? n : normal0(0,1,epsilon);
}
+ triple pointtriangular(real u, real v) {
+ real w=1-u-v;
+ return w^2*(w*P[0][0]+3*(u*P[1][0]+v*P[1][1]))+
+ u^2*(3*(w*P[2][0]+v*P[3][1])+u*P[3][0])+
+ 6*u*v*w*P[2][1]+v^2*(3*(w*P[2][2]+u*P[3][2])+v*P[3][3]);
+ }
+
+ triple bu(real u, real v) {
+ // Compute one-third of the directional derivative of a Bezier triangle
+ // in the u direction at (u,v).
+ real w=1-u-v;
+ return -w^2*P[0][0]+w*(w-2*u)*P[1][0]-2*w*v*P[1][1]+u*(2*w-u)*P[2][0]+
+ 2*v*(w-u)*P[2][1]-v^2*P[2][2]+u^2*P[3][0]+2*u*v*P[3][1]+v^2*P[3][2];
+ }
+
+ triple buu(real u, real v) {
+ // Compute one-sixth of the second directional derivative of a Bezier
+ // triangle in the u direction at (u,v).
+ real w=1-u-v;
+ return w*P[0][0]+(u-2*w)*P[1][0]+v*P[1][1]+(w-2*u)*P[2][0]-2*v*P[2][1]+
+ u*P[3][0]+v*P[3][1];
+ }
+
+ triple buuu() {
+ // Compute one-sixth of the third directional derivative of a Bezier
+ // triangle in the u direction at (u,v).
+ return -P[0][0]+3*P[1][0]-3*P[2][0]+P[3][0];
+ }
+
+ triple bv(real u, real v) {
+ // Compute one-third of the directional derivative of a Bezier triangle
+ // in the v direction at (u,v).
+ real w=1-u-v;
+ return -w^2*P[0][0]-2*u*w*P[1][0]+w*(w-2*v)*P[1][1]-u^2*P[2][0]+
+ 2*u*(w-v)*P[2][1]+v*(2*w-v)*P[2][2]+u*u*P[3][1]+2*u*v*P[3][2]+
+ v^2*P[3][3];
+ }
+
+ triple bvv(real u, real v) {
+ // Compute one-sixth of the second directional derivative of a Bezier
+ // triangle in the v direction at (u,v).
+ real w=1-u-v;
+ return w*P[0][0]+u*P[1][0]+(v-2*w)*P[1][1]-2*u*P[2][1]+(w-2*v)*P[2][2]+
+ u*P[3][2]+v*P[3][3];
+ }
+
+ triple bvvv() {
+ // Compute one-sixth of the third directional derivative of a Bezier
+ // triangle in the v direction at (u,v).
+ return -P[0][0]+3*P[1][1]-3*P[2][2]+P[3][3];
+ }
+
+ // compute normal vectors for a degenerate Bezier triangle
+ private triple normaltriangular0(real u, real v, real epsilon) {
+ triple n=9*(cross(buu(u,v),bv(u,v))+
+ cross(bu(u,v),bvv(u,v)));
+ return abs(n) > epsilon ? n :
+ 9*cross(buu(u,v),bvv(u,v))+
+ 3*(cross(buuu(),bv(u,v))+cross(bu(u,v),bvvv())+
+ cross(buuu(),bvv(u,v))+cross(buu(u,v),bvvv()))+
+ cross(buuu(),bvvv());
+ }
+
+ // Compute the normal of a Bezier triangle at (u,v)
+ triple normaltriangular(real u, real v) {
+ triple n=9*cross(bu(u,v),bv(u,v));
+ real epsilon=fuzz*change2(P);
+ return (abs(n) > epsilon) ? n : normal0(u,v,epsilon);
+ }
+
+ triple normal00triangular() {
+ triple n=9*cross(P[1][0]-P[0][0],P[1][1]-P[0][0]);
+ real epsilon=fuzz*change2(P);
+ return abs(n) > epsilon ? n : normaltriangular0(0,0,epsilon);
+ }
+
+ triple normal10triangular() {
+ triple n=9*cross(P[3][0]-P[2][0],P[3][1]-P[2][0]);
+ real epsilon=fuzz*change2(P);
+ return abs(n) > epsilon ? n : normaltriangular0(1,0,epsilon);
+ }
+
+ triple normal01triangular() {
+ triple n=9*cross(P[3][2]-P[2][2],P[3][3]-P[2][2]);
+ real epsilon=fuzz*change2(P);
+ return abs(n) > epsilon ? n : normaltriangular0(0,1,epsilon);
+ }
+
pen[] colors(material m, light light=currentlight) {
bool nocolors=colors.length == 0;
- if(normals.length > 0)
- return new pen[] {color(normals[0],nocolors ? m : colors[0],light),
- color(normals[1],nocolors ? m : colors[1],light),
- color(normals[2],nocolors ? m : colors[2],light),
- color(normals[3],nocolors ? m : colors[3],light)};
if(planar) {
triple normal=normal(0.5,0.5);
return new pen[] {color(normal,nocolors ? m : colors[0],light),
@@ -151,12 +267,40 @@ struct patch {
color(normal01(),nocolors ? m : colors[3],light)};
}
+ pen[] colorstriangular(material m, light light=currentlight) {
+ bool nocolors=colors.length == 0;
+ if(planar) {
+ triple normal=normal(1/3,1/3);
+ return new pen[] {color(normal,nocolors ? m : colors[0],light),
+ color(normal,nocolors ? m : colors[1],light),
+ color(normal,nocolors ? m : colors[2],light)};
+ }
+ return new pen[] {color(normal00(),nocolors ? m : colors[0],light),
+ color(normal10(),nocolors ? m : colors[1],light),
+ color(normal01(),nocolors ? m : colors[2],light)};
+ }
+
triple min3,max3;
bool havemin3,havemax3;
void init() {
havemin3=false;
havemax3=false;
+ if(triangular) {
+ external=externaltriangular;
+ internal=internaltriangular;
+ cornermean=cornermeantriangular;
+ corners=cornerstriangular;
+ map=maptriangular;
+ point=pointtriangular;
+ normal=normaltriangular;
+ normal00=normal00triangular;
+ normal10=normal10triangular;
+ normal01=normal01triangular;
+ colors=colorstriangular;
+ uequals=new path3(real u) {return nullpath3;};
+ vequals=new path3(real u) {return nullpath3;};
+ }
}
triple min(triple bound=P[0][0]) {
@@ -191,63 +335,81 @@ struct patch {
return minratio(Q,d*bound)/d; // d is negative
}
- void operator init(triple[][] P, triple[] normals=new triple[],
+ void operator init(triple[][] P,
pen[] colors=new pen[], bool straight=false,
- bool3 planar=default, bool copy=true) {
- init();
+ bool3 planar=default, bool triangular=false,
+ bool copy=true) {
this.P=copy ? copy(P) : P;
- if(normals.length != 0)
- this.normals=copy(normals);
if(colors.length != 0)
this.colors=copy(colors);
- this.planar=planar;
this.straight=straight;
+ this.planar=planar;
+ this.triangular=triangular;
+ init();
}
void operator init(pair[][] P, triple plane(pair)=XYplane,
- bool straight=false) {
+ bool straight=false, bool triangular=false) {
triple[][] Q=new triple[4][];
for(int i=0; i < 4; ++i) {
pair[] Pi=P[i];
Q[i]=sequence(new triple(int j) {return plane(Pi[j]);},4);
}
- operator init(Q,straight);
- planar=true;
+ operator init(Q,straight,planar=true,triangular);
}
void operator init(patch s) {
- operator init(s.P,s.normals,s.colors,s.straight);
- }
+ operator init(s.P,s.colors,s.straight,s.planar,s.triangular);
+ }
- // A constructor for a convex cyclic path3 of length <= 4 with optional
- // arrays of 4 internal points, corner normals, and pens.
- void operator init(path3 external, triple[] internal=new triple[],
- triple[] normals=new triple[], pen[] colors=new pen[],
+ // A constructor for a cyclic path3 of length 3 with a specified
+ // internal point, corner normals, and pens (rendered as a Bezier triangle).
+ void operator init(path3 external, triple internal, pen[] colors=new pen[],
bool3 planar=default) {
+ triangular=true;
+ this.planar=planar;
init();
+ if(colors.length != 0)
+ this.colors=copy(colors);
+
+ P=new triple[][] {
+ {point(external,0)},
+ {postcontrol(external,0),precontrol(external,0)},
+ {precontrol(external,1),internal,postcontrol(external,2)},
+ {point(external,1),postcontrol(external,1),precontrol(external,2),
+ point(external,2)}
+ };
+ }
+ // A constructor for a convex cyclic path3 of length <= 4 with optional
+ // arrays of internal points (4 for a Bezier patch, 1 for a Bezier
+ // triangle), and pens.
+ void operator init(path3 external, triple[] internal=new triple[],
+ pen[] colors=new pen[], bool3 planar=default) {
if(internal.length == 0 && planar == default)
this.planar=normal(external) != O;
else this.planar=planar;
int L=length(external);
+
+ if(L == 3) {
+ operator init(external,internal.length == 1 ? internal[0] :
+ coons3(external),colors,this.planar);
+ straight=piecewisestraight(external);
+ return;
+ }
+
if(L > 4 || !cyclic(external))
abort("cyclic path3 of length <= 4 expected");
if(L == 1) {
external=external--cycle--cycle--cycle;
if(colors.length > 0) colors.append(array(3,colors[0]));
- if(normals.length > 0) normals.append(array(3,normals[0]));
} else if(L == 2) {
external=external--cycle--cycle;
if(colors.length > 0) colors.append(array(2,colors[0]));
- if(normals.length > 0) normals.append(array(2,normals[0]));
- } else if(L == 3) {
- external=external--cycle;
- if(colors.length > 0) colors.push(colors[0]);
- if(normals.length > 0) normals.push(normals[0]);
}
- if(normals.length != 0)
- this.normals=copy(normals);
+
+ init();
if(colors.length != 0)
this.colors=copy(colors);
@@ -261,7 +423,7 @@ struct patch {
+3*(precontrol(external,j-1)+
postcontrol(external,j+1))
-point(external,j+2));
- } else straight=false;
+ }
P=new triple[][] {
{point(external,0),precontrol(external,0),postcontrol(external,3),
@@ -275,16 +437,13 @@ struct patch {
// A constructor for a convex quadrilateral.
void operator init(triple[] external, triple[] internal=new triple[],
- triple[] normals=new triple[], pen[] colors=new pen[],
- bool3 planar=default) {
+ pen[] colors=new pen[], bool3 planar=default) {
init();
if(internal.length == 0 && planar == default)
this.planar=normal(external) != O;
else this.planar=planar;
- if(normals.length != 0)
- this.normals=copy(normals);
if(colors.length != 0)
this.colors=copy(colors);
@@ -313,41 +472,46 @@ struct patch {
patch operator * (transform3 t, patch s)
{
patch S;
- S.P=new triple[4][4];
- for(int i=0; i < 4; ++i) {
+ S.P=new triple[s.P.length][];
+ for(int i=0; i < s.P.length; ++i) {
triple[] si=s.P[i];
triple[] Si=S.P[i];
- for(int j=0; j < 4; ++j)
+ for(int j=0; j < si.length; ++j)
Si[j]=t*si[j];
}
- if(s.normals.length > 0) {
- transform3 t0=shiftless(t);
- t0=determinant(t0) == 0 ? identity4 : transpose(inverse(t0));
- for(int i=0; i < s.normals.length; ++i)
- S.normals[i]=t0*s.normals[i];
- }
-
S.colors=copy(s.colors);
S.planar=s.planar;
S.straight=s.straight;
+ S.triangular=s.triangular;
+ S.init();
return S;
}
patch reverse(patch s)
{
+ assert(!s.triangular);
patch S;
S.P=transpose(s.P);
- if(s.normals.length > 0)
- S.normals=
- new triple[] {s.normals[0],s.normals[3],s.normals[2],s.normals[1]};
- if(s.colors.length > 0)
+ if(s.colors.length > 0)
S.colors=new pen[] {s.colors[0],s.colors[3],s.colors[2],s.colors[1]};
- S.planar=s.planar;
S.straight=s.straight;
+ S.planar=s.planar;
return S;
}
+// Return a degenerate tensor patch representation of a Bezier triangle.
+patch tensor(patch s) {
+ if(!s.triangular) return patch(s);
+ triple[][] P=s.P;
+ return patch(new triple[][] {{P[0][0],P[0][0],P[0][0],P[0][0]},
+ {P[1][0],P[1][0]*2/3+P[1][1]/3,P[1][0]/3+P[1][1]*2/3,P[1][1]},
+ {P[2][0],P[2][0]/3+P[2][1]*2/3,P[2][1]*2/3+P[2][2]/3,P[2][2]},
+ {P[3][0],P[3][1],P[3][2],P[3][3]}},
+ s.colors.length > 0 ? new pen[] {s.colors[0],s.colors[1],s.colors[2],s.colors[0]} : new pen[],
+ s.straight,s.planar,false,false);
+}
+
// Return the tensor product patch control points corresponding to path p
// and points internal.
pair[][] tensor(path p, pair[] internal)
@@ -589,7 +753,7 @@ path[] regularize(path p, bool checkboundary=true)
struct surface {
patch[] s;
- int index[][];
+ int index[][];// Position of patch corresponding to major U,V parameter in s.
bool vcyclic;
bool empty() {
@@ -612,11 +776,11 @@ struct surface {
this.vcyclic=s.vcyclic;
}
- void operator init(triple[][][] P, triple[][] normals=new triple[][],
- pen[][] colors=new pen[][], bool3 planar=default) {
+ void operator init(triple[][][] P, pen[][] colors=new pen[][],
+ bool3 planar=default, bool triangular=false) {
s=sequence(new patch(int i) {
- return patch(P[i],normals.length == 0 ? new triple[] : normals[i],
- colors.length == 0 ? new pen[] : colors[i],planar);
+ return patch(P[i],colors.length == 0 ? new pen[] : colors[i],planar,
+ triangular);
},P.length);
}
@@ -698,11 +862,16 @@ struct surface {
return ucyclic() ? g&cycle : g;
}
- // A constructor for a possibly nonconvex simple cyclic path in a given plane.
+ // A constructor for a possibly nonconvex simple cyclic path in a given
+ // plane.
void operator init(path p, triple plane(pair)=XYplane) {
- bool straight=piecewisestraight(p);
- for(path g : regularize(p))
- s.push(patch(coons(g),plane,straight));
+ for(path g : regularize(p)) {
+ if(length(g) == 3) {
+ path3 G=path3(g,plane);
+ s.push(patch(G,coons3(G),planar=true));
+ } else
+ s.push(patch(coons(g),plane,piecewisestraight(g)));
+ }
}
void operator init(explicit path[] g, triple plane(pair)=XYplane) {
@@ -712,19 +881,17 @@ struct surface {
// A general surface constructor for both planar and nonplanar 3D paths.
void construct(path3 external, triple[] internal=new triple[],
- triple[] normals=new triple[], pen[] colors=new pen[],
- bool3 planar=default) {
+ pen[] colors=new pen[], bool3 planar=default) {
int L=length(external);
if(!cyclic(external)) abort("cyclic path expected");
if(L <= 3 && piecewisestraight(external)) {
- s.push(patch(external,internal,normals,colors,planar=true));
+ s.push(patch(external,internal,colors,planar));
return;
}
// Construct a surface from a possibly nonconvex planar cyclic path3.
- if(planar != false && internal.length == 0 && normals.length == 0 &&
- colors.length == 0) {
+ if(planar != false && internal.length == 0 && colors.length == 0) {
triple n=normal(external);
if(n != O) {
transform3 T=align(n);
@@ -737,7 +904,7 @@ struct surface {
}
if(L <= 4 || internal.length > 0) {
- s.push(patch(external,internal,normals,colors,planar));
+ s.push(patch(external,internal,colors,planar));
return;
}
@@ -746,40 +913,33 @@ struct surface {
pen[] p;
triple[] n;
bool nocolors=colors.length == 0;
- bool nonormals=normals.length == 0;
triple center;
for(int i=0; i < L; ++i)
center += point(external,i);
center *= factor;
if(!nocolors)
p=new pen[] {mean(colors)};
- if(!nonormals)
- n=new triple[] {factor*sum(normals)};
// Use triangles for nonplanar surfaces.
int step=normal(external) == O ? 1 : 2;
int i=0;
int end;
while((end=i+step) < L) {
s.push(patch(subpath(external,i,end)--center--cycle,
- nonormals ? n : concat(normals[i:end+1],n),
nocolors ? p : concat(colors[i:end+1],p),planar));
i=end;
}
s.push(patch(subpath(external,i,L)--center--cycle,
- nonormals ? n : concat(normals[i:],normals[0:1],n),
nocolors ? p : concat(colors[i:],colors[0:1],p),planar));
}
void operator init(path3 external, triple[] internal=new triple[],
- triple[] normals=new triple[], pen[] colors=new pen[],
- bool3 planar=default) {
+ pen[] colors=new pen[], bool3 planar=default) {
s=new patch[];
- construct(external,internal,normals,colors,planar);
+ construct(external,internal,colors,planar);
}
void operator init(explicit path3[] external,
triple[][] internal=new triple[][],
- triple[][] normals=new triple[][],
pen[][] colors=new pen[][], bool3 planar=default) {
s=new patch[];
if(planar == true) {// Assume all path3 elements share a common normal.
@@ -801,14 +961,12 @@ struct surface {
for(int i=0; i < external.length; ++i)
construct(external[i],
internal.length == 0 ? new triple[] : internal[i],
- normals.length == 0 ? new triple[] : normals[i],
colors.length == 0 ? new pen[] : colors[i],planar);
}
void push(path3 external, triple[] internal=new triple[],
- triple[] normals=new triple[] ,pen[] colors=new pen[],
- bool3 planar=default) {
- s.push(patch(external,internal,normals,colors,planar));
+ pen[] colors=new pen[], bool3 planar=default) {
+ s.push(patch(external,internal,colors,planar));
}
// Construct the surface of rotation generated by rotating g
@@ -1111,7 +1269,7 @@ triple[][] subpatch(triple[][] P, pair a, pair b)
patch subpatch(patch s, pair a, pair b)
{
assert(a.x >= 0 && a.y >= 0 && b.x <= 1 && b.y <= 1 &&
- a.x < b.x && a.y < b.y);
+ a.x < b.x && a.y < b.y && !s.triangular);
return patch(subpatch(s.P,a,b),s.straight,s.planar);
}
@@ -1244,8 +1402,14 @@ void draw3D(frame f, int type=0, patch s, triple center=O, material m,
if(prc())
PRCshininess=PRCshininess(m.shininess);
- draw(f,s.P,center,s.straight,m.p,m.opacity,m.shininess,PRCshininess,
- s.planar ? s.normal(0.5,0.5) : O,s.colors,interaction.type,prc);
+ if(s.triangular)
+ drawbeziertriangle(f,s.P,center,s.straight && s.planar,m.p,
+ m.opacity,m.shininess,PRCshininess,s.colors,
+ interaction.type);
+ else
+ draw(f,s.P,center,s.straight && s.planar,m.p,m.opacity,m.shininess,
+ PRCshininess,s.planar ? s.normal(0.5,0.5) : O,s.colors,
+ interaction.type,prc);
}
// Draw triangles on a frame.
@@ -1337,11 +1501,13 @@ void draw(picture pic=currentpicture, triple[] v, int[][] vi,
pic.addPoint(v[viij]);
}
-void drawPRCsphere(frame f, transform3 t=identity4, bool half=false, material m,
- light light=currentlight, render render=defaultrender)
+void drawPRCsphere(frame f, transform3 t=identity4, bool half=false,
+ material m, light light=currentlight,
+ render render=defaultrender)
{
m=material(m,light);
- drawPRCsphere(f,t,half,m.p,m.opacity,PRCshininess(m.shininess),render.sphere);
+ drawPRCsphere(f,t,half,m.p,m.opacity,PRCshininess(m.shininess),
+ render.sphere);
}
void drawPRCcylinder(frame f, transform3 t=identity4, material m,
@@ -1368,9 +1534,15 @@ void drawPRCtube(frame f, path3 center, path3 g, material m,
void tensorshade(transform t=identity(), frame f, patch s,
material m, light light=currentlight, projection P)
{
+
+ pen[] p;
+ if(s.triangular) {
+ p=s.colorstriangular(m,light);
+ p.push(p[0]);
+ s=tensor(s);
+ } else p=s.colors(m,light);
tensorshade(f,box(t*s.min(P),t*s.max(P)),m.diffuse(),
- s.colors(m,light),t*project(s.external(),P,1),
- t*project(s.internal(),P));
+ p,t*project(s.external(),P,1),t*project(s.internal(),P));
}
restricted pen[] nullpens={nullpen};
@@ -1397,7 +1569,7 @@ void draw(transform t=identity(), frame f, surface s, int nu=1, int nv=1,
real[][] depth=new real[s.s.length][];
for(int i=0; i < depth.length; ++i)
- depth[i]=new real[] {abs(camera-s.s[i].cornermean()),i};
+ depth[i]=new real[] {dot(P.normal,camera-s.s[i].cornermean()),i};
depth=sort(depth);
@@ -1414,18 +1586,19 @@ void draw(transform t=identity(), frame f, surface s, int nu=1, int nv=1,
for(int p=depth.length-1; p >= 0; --p) {
real[] a=depth[p];
int k=round(a[1]);
+ patch S=s.s[k];
pen meshpen=meshpen[k];
- if(!invisible(meshpen)) {
+ if(!invisible(meshpen) && !S.triangular) {
if(group)
begingroup3(f,meshname(name),render);
meshpen=modifiers+meshpen;
real step=nu == 0 ? 0 : 1/nu;
for(int i=0; i <= nu; ++i)
- draw(f,s.s[k].uequals(i*step),meshpen,meshlight,partname(i,render),
+ draw(f,S.uequals(i*step),meshpen,meshlight,partname(i,render),
render);
step=nv == 0 ? 0 : 1/nv;
for(int j=0; j <= nv; ++j)
- draw(f,s.s[k].vequals(j*step),meshpen,meshlight,partname(j,render),
+ draw(f,S.vequals(j*step),meshpen,meshlight,partname(j,render),
render);
if(group)
endgroup3(f);
@@ -1444,7 +1617,7 @@ void draw(transform t=identity(), frame f, surface s, int nu=1, int nv=1,
real[][] depth=new real[s.s.length][];
for(int i=0; i < depth.length; ++i)
- depth[i]=new real[] {abs(camera-s.s[i].cornermean()),i};
+ depth[i]=new real[] {dot(P.normal,camera-s.s[i].cornermean()),i};
depth=sort(depth);
@@ -1507,8 +1680,9 @@ void draw(picture pic=currentpicture, surface s, int nu=1, int nv=1,
pen modifiers;
if(is3D()) modifiers=thin()+squarecap;
for(int k=0; k < s.s.length; ++k) {
+ patch S=s.s[k];
pen meshpen=meshpen[k];
- if(!invisible(meshpen)) {
+ if(!invisible(meshpen) && !S.triangular) {
meshpen=modifiers+meshpen;
real step=nu == 0 ? 0 : 1/nu;
for(int i=0; i <= nu; ++i)
diff --git a/Master/texmf-dist/asymptote/three_tube.asy b/Master/texmf-dist/asymptote/three_tube.asy
index bbbd5a65633..25bb9385ec8 100644
--- a/Master/texmf-dist/asymptote/three_tube.asy
+++ b/Master/texmf-dist/asymptote/three_tube.asy
@@ -176,18 +176,24 @@ bool uperiodic(real[][] a) {
int m=a[0].length;
real[] a0=a[0];
real[] a1=a[n-1];
- real epsilon=sqrtEpsilon*norm(a);
- for(int j=0; j < m; ++j)
+ for(int j=0; j < m; ++j) {
+ real norm=0;
+ for(int i=0; i < n; ++i)
+ norm=max(norm,abs(a[i][j]));
+ real epsilon=sqrtEpsilon*norm;
if(abs(a0[j]-a1[j]) > epsilon) return false;
+ }
return true;
}
bool vperiodic(real[][] a) {
int n=a.length;
if(n == 0) return false;
int m=a[0].length-1;
- real epsilon=sqrtEpsilon*norm(a);
- for(int i=0; i < n; ++i)
- if(abs(a[i][0]-a[i][m]) > epsilon) return false;
+ for(int i=0; i < n; ++i) {
+ real[] ai=a[i];
+ real epsilon=sqrtEpsilon*norm(ai);
+ if(abs(ai[0]-ai[m]) > epsilon) return false;
+ }
return true;
}
diff --git a/Master/texmf-dist/asymptote/version.asy b/Master/texmf-dist/asymptote/version.asy
index 1801d9842da..7cd9bd7a245 100644
--- a/Master/texmf-dist/asymptote/version.asy
+++ b/Master/texmf-dist/asymptote/version.asy
@@ -1 +1 @@
-string VERSION="2.35";
+string VERSION="2.37";
diff --git a/Master/texmf-dist/doc/asymptote/CAD.pdf b/Master/texmf-dist/doc/asymptote/CAD.pdf
index 100067e6231..41fbbc97347 100644
--- a/Master/texmf-dist/doc/asymptote/CAD.pdf
+++ b/Master/texmf-dist/doc/asymptote/CAD.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf b/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf
index 5e369f69e61..fe6030b1ff3 100644
--- a/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf
+++ b/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/asymptote/asy-latex.pdf b/Master/texmf-dist/doc/asymptote/asy-latex.pdf
index b8392efb5b8..707a3682690 100644
--- a/Master/texmf-dist/doc/asymptote/asy-latex.pdf
+++ b/Master/texmf-dist/doc/asymptote/asy-latex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/asymptote/asyRefCard.pdf b/Master/texmf-dist/doc/asymptote/asyRefCard.pdf
index adc74a20d99..4dd99ef2fc3 100644
--- a/Master/texmf-dist/doc/asymptote/asyRefCard.pdf
+++ b/Master/texmf-dist/doc/asymptote/asyRefCard.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/asymptote/asymptote.pdf b/Master/texmf-dist/doc/asymptote/asymptote.pdf
index 3c24609c93f..36bc50b8c33 100644
--- a/Master/texmf-dist/doc/asymptote/asymptote.pdf
+++ b/Master/texmf-dist/doc/asymptote/asymptote.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/asymptote/examples/BezierTriangle.asy b/Master/texmf-dist/doc/asymptote/examples/BezierTriangle.asy
new file mode 100644
index 00000000000..2942dbf042f
--- /dev/null
+++ b/Master/texmf-dist/doc/asymptote/examples/BezierTriangle.asy
@@ -0,0 +1,10 @@
+import three;
+currentprojection=perspective(-2,5,1);
+
+size(10cm);
+
+surface s=surface((0,0,0)--(3,0,0)--(1.5,3*sqrt(3)/2,0)--cycle,
+ new triple[] {(1.5,sqrt(3)/2,2)});
+
+draw(s,red);
+
diff --git a/Master/texmf-dist/doc/asymptote/examples/externalprc.tex b/Master/texmf-dist/doc/asymptote/examples/externalprc.tex
index 7c488e78f9c..04718b86a11 100644
--- a/Master/texmf-dist/doc/asymptote/examples/externalprc.tex
+++ b/Master/texmf-dist/doc/asymptote/examples/externalprc.tex
@@ -7,8 +7,7 @@
\documentclass[12pt]{article}
\input cube.pre
\usepackage[bigfiles]{media9}
-\playbuttonfalse
-\RequirePackage{color,graphicx}
+\RequirePackage{asymptote,color,graphicx}
\begin{document}
\input cube.tex
\end{document}
diff --git a/Master/texmf-dist/doc/asymptote/examples/fequlogo.asy b/Master/texmf-dist/doc/asymptote/examples/fequlogo.asy
index e53e1831419..b928e42197b 100644
--- a/Master/texmf-dist/doc/asymptote/examples/fequlogo.asy
+++ b/Master/texmf-dist/doc/asymptote/examples/fequlogo.asy
@@ -7,7 +7,7 @@ import obj;
size(200,0);
size3(200);
-settings.render=8;
+if(settings.render < 0) settings.render=8;
texpreamble("\usepackage[T1]{fontenc}");
texpreamble("\usepackage{ccfonts,eulervm}");
diff --git a/Master/texmf-dist/doc/asymptote/examples/filegraph.asy b/Master/texmf-dist/doc/asymptote/examples/filegraph.asy
index 4b05c5bcbd7..0add531a3e0 100644
--- a/Master/texmf-dist/doc/asymptote/examples/filegraph.asy
+++ b/Master/texmf-dist/doc/asymptote/examples/filegraph.asy
@@ -3,7 +3,7 @@ import graph;
size(200,150,IgnoreAspect);
file in=input("filegraph.dat").line();
-real[][] a=in.dimension(0,0);
+real[][] a=in;
a=transpose(a);
real[] x=a[0];
diff --git a/Master/texmf-dist/doc/asymptote/examples/filesurface.asy b/Master/texmf-dist/doc/asymptote/examples/filesurface.asy
index eef9d37f494..b4817a05863 100644
--- a/Master/texmf-dist/doc/asymptote/examples/filesurface.asy
+++ b/Master/texmf-dist/doc/asymptote/examples/filesurface.asy
@@ -7,7 +7,7 @@ file in=input("filesurface.dat").line();
real[] x=in;
real[] y=in;
-real[][] f=in.dimension(0,0);
+real[][] f=in;
triple f(pair t) {
int i=round(t.x);
diff --git a/Master/texmf-dist/doc/asymptote/examples/lemniscate.asy b/Master/texmf-dist/doc/asymptote/examples/genusthree.asy
index b151e43c18b..b3b7eb7f2b2 100644
--- a/Master/texmf-dist/doc/asymptote/examples/lemniscate.asy
+++ b/Master/texmf-dist/doc/asymptote/examples/genusthree.asy
@@ -1,5 +1,3 @@
-settings.outformat = "png";;
-settings.render = 16;
size(8cm);
import smoothcontour3;
@@ -9,12 +7,17 @@ real erdos(pair z, int n) { return abs(z^n-1)^2 - 1; }
real h = 0.12;
+// Erdos lemniscate of order 3:
real lemn3(real x, real y) { return erdos((x,y), 3); }
+// "Inflate" the order 3 (planar) lemniscate into a
+// smooth surface:
real f(real x, real y, real z) {
return lemn3(x,y)^2 + (16*abs((x,y))^4 + 1) * (z^2 - h^2);
}
+// Draw the implicit surface on a box with diagonally opposite
+// corners at (-3,-3,-3), (3,3,3).
draw(implicitsurface(f,a=(-3,-3,-3),b=(3,3,3),overlapedges=true),
surfacepen=material(diffusepen=gray(0.5),emissivepen=gray(0.4),
specularpen=gray(0.1)));
diff --git a/Master/texmf-dist/doc/asymptote/examples/genustwo.asy b/Master/texmf-dist/doc/asymptote/examples/genustwo.asy
new file mode 100644
index 00000000000..0d346481d04
--- /dev/null
+++ b/Master/texmf-dist/doc/asymptote/examples/genustwo.asy
@@ -0,0 +1,36 @@
+size(10cm,0);
+import smoothcontour3;
+currentprojection=perspective((18,20,10));
+if(settings.render < 0) settings.render=8;
+
+real tuberadius = 0.69;
+
+// Convert to cylindrical coordinates to draw
+// a circle revolved about the z axis.
+real toruscontour(real x, real y, real z) {
+ real r = sqrt(x^2 + y^2);
+ return (r-2)^2 + z^2 - tuberadius^2;
+}
+
+// Take the union of the two tangent tori (by taking
+// the product of the functions defining them). Then
+// add (or subtract) a bit of noise to smooth things
+// out.
+real f(real x, real y, real z) {
+ real f1 = toruscontour(x - 2 - tuberadius, y, z);
+ real f2 = toruscontour(x + 2 + tuberadius, y, z);
+ return f1 * f2 - 0.1;
+}
+
+// The noisy function extends a bit farther than the union of
+// the two tori, so include a bit of extra space in the box.
+triple max = (2*(2+tuberadius), 2+tuberadius, tuberadius)
+ + (0.1, 0.1, 0.1);
+triple min = -max;
+
+// Draw the implicit surface.
+draw(implicitsurface(f, min, max, overlapedges=true,
+ nx=20, nz=5),
+ surfacepen=material(diffusepen=gray(0.6),
+ emissivepen=gray(0.3),
+ specularpen=gray(0.1)));
diff --git a/Master/texmf-dist/doc/asymptote/examples/latexusage.tex b/Master/texmf-dist/doc/asymptote/examples/latexusage.tex
index b70df067963..07b0e56a356 100644
--- a/Master/texmf-dist/doc/asymptote/examples/latexusage.tex
+++ b/Master/texmf-dist/doc/asymptote/examples/latexusage.tex
@@ -1,10 +1,10 @@
\documentclass[12pt]{article}
% Use this form to include EPS (latex) or PDF (pdflatex) files:
-\usepackage{asymptote}
+%\usepackage{asymptote}
% Use this form with latex or pdflatex to include inline LaTeX code by default:
-%\usepackage[inline]{asymptote}
+\usepackage[inline]{asymptote}
% Use this form with latex or pdflatex to create PDF attachments by default:
%\usepackage[attach]{asymptote}
diff --git a/Master/texmf-dist/doc/asymptote/examples/leastsquares.asy b/Master/texmf-dist/doc/asymptote/examples/leastsquares.asy
index cb2b8f3a42b..37477d58858 100644
--- a/Master/texmf-dist/doc/asymptote/examples/leastsquares.asy
+++ b/Master/texmf-dist/doc/asymptote/examples/leastsquares.asy
@@ -5,7 +5,7 @@ import stats;
file fin=input("leastsquares.dat").line();
-real[][] a=fin.dimension(0,0);
+real[][] a=fin;
a=transpose(a);
real[] t=a[0], rho=a[1];
diff --git a/Master/texmf-dist/doc/asymptote/examples/secondaryaxis.asy b/Master/texmf-dist/doc/asymptote/examples/secondaryaxis.asy
index 39f802f935d..27b89b9c384 100644
--- a/Master/texmf-dist/doc/asymptote/examples/secondaryaxis.asy
+++ b/Master/texmf-dist/doc/asymptote/examples/secondaryaxis.asy
@@ -8,7 +8,7 @@ file in=input(data).line().csv();
string[] titlelabel=in;
string[] columnlabel=in;
-real[][] a=in.dimension(0,0);
+real[][] a=in;
a=transpose(a);
real[] t=a[0], susceptible=a[1], infectious=a[2], dead=a[3], larvae=a[4];
real[] susceptibleM=a[5], exposed=a[6],infectiousM=a[7];
diff --git a/Master/texmf-dist/doc/asymptote/examples/tetra.asy b/Master/texmf-dist/doc/asymptote/examples/tetra.asy
new file mode 100644
index 00000000000..a20d27b8dbe
--- /dev/null
+++ b/Master/texmf-dist/doc/asymptote/examples/tetra.asy
@@ -0,0 +1,12 @@
+import graph3;
+unitsize(1cm);
+currentprojection=orthographic(10,5,5);
+triple O=(0,0,0),N=(0,0,10),A=(8.66,0,-5), B=(-4.33,7.5,-5),C=(-4.33,-7.5,-5);
+path3[] D=N--A--B--C--N--B^^A--C;
+draw(surface(A--B--C--cycle),.5*blue+.5*white+opacity(.5));
+draw(surface(N--B--C--cycle),.5*green+.5*white+opacity(.5));
+draw(surface(N--C--A--cycle),.5*yellow+.5*white+opacity(.5));
+draw(surface(N--A--B--cycle),.5*red+.5*white+opacity(.5));
+draw(D,blue+1bp);
+dot(D);dot(O);
+label("$O$",O,E);label("$N$",N,N);label("$A$",A,SE);label("$B$",B,E);label("$C$",C,W+S);
diff --git a/Master/texmf-dist/doc/asymptote/examples/threeviews.asy b/Master/texmf-dist/doc/asymptote/examples/threeviews.asy
index 1bcc36ae8d7..c723abd452b 100644
--- a/Master/texmf-dist/doc/asymptote/examples/threeviews.asy
+++ b/Master/texmf-dist/doc/asymptote/examples/threeviews.asy
@@ -4,11 +4,12 @@ picture pic;
unitsize(pic,5cm);
currentlight.viewport=false;
-settings.render=4;
+if(settings.render < 0) settings.render=4;
settings.toolbar=false;
viewportmargin=(1cm,1cm);
draw(pic,scale3(0.5)*unitsphere,green,render(compression=Low,merge=true));
+
draw(pic,Label("$x$",1),O--X);
draw(pic,Label("$y$",1),O--Y);
draw(pic,Label("$z$",1),O--Z);
diff --git a/Master/texmf-dist/doc/asymptote/examples/vertexshading.asy b/Master/texmf-dist/doc/asymptote/examples/vertexshading.asy
index 13821ec0058..a5555d66f70 100644
--- a/Master/texmf-dist/doc/asymptote/examples/vertexshading.asy
+++ b/Master/texmf-dist/doc/asymptote/examples/vertexshading.asy
@@ -7,3 +7,8 @@ currentprojection=perspective(4,5,5);
draw(surface(unitcircle3,new pen[] {red,green,blue,black}));
draw(surface(shift(Z)*unitsquare3,
new pen[] {red,green+opacity(0.5),blue,black}));
+draw(surface(shift(X)*((0,0,0)..controls (1,0,0) and (2,0,0)..(3,0,0)..
+ controls (2.5,sqrt(3)/2,0) and (2,sqrt(3),0)..
+ (1.5,3*sqrt(3)/2,0)..
+ controls (1,sqrt(3),0) and (0.5,sqrt(3)/2,0)..cycle),
+ new triple[] {(1.5,sqrt(3)/2,2)},new pen[] {red,green,blue}));
diff --git a/Master/texmf-dist/doc/asymptote/examples/westnile.asy b/Master/texmf-dist/doc/asymptote/examples/westnile.asy
index 7f63047983f..222bb38e05e 100644
--- a/Master/texmf-dist/doc/asymptote/examples/westnile.asy
+++ b/Master/texmf-dist/doc/asymptote/examples/westnile.asy
@@ -7,7 +7,7 @@ file in=input(data).line().csv();
string[] columnlabel=in;
-real[][] A=in.dimension(0,0);
+real[][] A=in;
A=transpose(A);
real[] number=A[0], survival=A[1];
diff --git a/Master/texmf-dist/doc/info/asy-faq.info b/Master/texmf-dist/doc/info/asy-faq.info
index a091076031f..035dbfdb1c1 100644
--- a/Master/texmf-dist/doc/info/asy-faq.info
+++ b/Master/texmf-dist/doc/info/asy-faq.info
@@ -10,7 +10,7 @@ END-INFO-DIR-ENTRY
File: asy-faq.info, Node: Top, Next: Question 1.1, Up: (dir)
ASYMPTOTE FREQUENTLY ASKED QUESTIONS
- 19 May 2015
+ 13 Mar 2016
This is the list of Frequently Asked Questions about Asymptote (asy).
@@ -863,8 +863,8 @@ endlabel=false;
(ii) explicitly remove specific ticks and their labels (drawing them
manually; see
-http://asymptote.svn.sourceforge.net/viewvc/asymptote/trunk/asymptote/base/graph.asy
-for the definition of NoZero):
+http://www.github.com/vectorgraphics/asymptote/base/graph.asy for the
+definition of NoZero):
import graph;
@@ -879,8 +879,8 @@ yaxis(Ticks(NoZero));
label("$0$",(0,0),SW);
(iii) explicitly remove specific tick labels and draw them manually (see
-http://asymptote.svn.sourceforge.net/viewvc/asymptote/trunk/asymptote/base/graph.asy
-for the definition of NoZeroFormat):
+http://www.github.com/vectorgraphics/asymptote/base/graph.asy for the
+definition of NoZeroFormat):
import graph;
diff --git a/Master/texmf-dist/doc/info/asymptote.info b/Master/texmf-dist/doc/info/asymptote.info
index 07f0030b75b..980fe6df2fe 100644
--- a/Master/texmf-dist/doc/info/asymptote.info
+++ b/Master/texmf-dist/doc/info/asymptote.info
@@ -1,11 +1,11 @@
-This is asymptote.info, produced by makeinfo version 5.2 from
+This is asymptote.info, produced by makeinfo version 6.0 from
asymptote.texi.
-This file documents 'Asymptote', version 2.35.
+This file documents 'Asymptote', version 2.37.
<http://asymptote.sourceforge.net>
- Copyright (C) 2004-14 Andy Hammerlindl, John Bowman, and Tom Prince.
+ Copyright (C) 2004-16 Andy Hammerlindl, John Bowman, and Tom Prince.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Lesser General Public License
@@ -17,16 +17,16 @@ START-INFO-DIR-ENTRY
END-INFO-DIR-ENTRY

-File: asymptote.info, Node: Top, Next: Description, Up: (dir)
+File: asymptote.info, Node: Top, Next: Description, Prev: (dir), Up: (dir)
Asymptote
*********
-This file documents 'Asymptote', version 2.35.
+This file documents 'Asymptote', version 2.37.
<http://asymptote.sourceforge.net>
- Copyright (C) 2004-14 Andy Hammerlindl, John Bowman, and Tom Prince.
+ Copyright (C) 2004-16 Andy Hammerlindl, John Bowman, and Tom Prince.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Lesser General Public License
@@ -62,9 +62,17 @@ Installation
* Search paths:: Where 'Asymptote' looks for your files
* Compiling from UNIX source:: Building 'Asymptote' from scratch
* Editing modes:: Convenient 'emacs' and 'vim' modes
-* Subversion:: Getting the latest development source
+* Git:: Getting the latest development source
* Uninstall:: Goodbye, 'Asymptote'!
+Tutorial
+
+* Drawing in batch mode:: Run 'Asymptote' on a text file
+* Drawing in interactive mode:: Running 'Asymptote' interactively
+* Figure size:: Specifying the figure size
+* Labels:: Adding 'LaTeX' labels
+* Paths:: Drawing lines and curves
+
Drawing commands
* draw:: Draw a path on a picture or frame
@@ -103,7 +111,6 @@ Functions
* Rest arguments:: Functions with a variable number of arguments
* Mathematical functions:: Standard libm functions
-
Arrays
* Slices:: Python-style array slices
@@ -147,13 +154,14 @@ Base modules
* flowchart:: Flowchart drawing routines
* contour:: Contour lines
* contour3:: Contour surfaces
+* smoothcontour3:: Smooth implicit surfaces
* slopefield:: Slope fields
* ode:: Ordinary differential equations
Graphical User Interface
* GUI installation:: Installing 'xasy'
-* GUI usage::
+* GUI usage:: Using 'xasy' to edit objects

@@ -229,12 +237,16 @@ mathematics typesetting needs, one can write 'Asymptote' modules that
tailor it to specific applications. A scientific graphing module has
already been written (*note graph::). Examples of 'Asymptote' code and
output, including animations, are available at
- <http://asymptote.sourceforge.net/gallery/>.
-Links to many external resources, including an excellent user-written
+ <http://asymptote.sourceforge.net/gallery/>
+Clicking on an example file name in this manual, like 'Pythagoras', will
+display the PDF output, whereas clicking on its '.asy' extension will
+show the corresponding 'Asymptote' code in a separate window.
+
+ Links to many external resources, including an excellent user-written
'Asymptote' tutorial can be found at
- <http://asymptote.sourceforge.net/links.html>.
+ <http://asymptote.sourceforge.net/links.html>
A quick reference card for 'Asymptote' is available at
- <http://asymptote.sourceforge.net/asyRefCard.pdf>.
+ <http://asymptote.sourceforge.net/asyRefCard.pdf>

File: asymptote.info, Node: Installation, Next: Tutorial, Prev: Description, Up: Top
@@ -251,19 +263,19 @@ File: asymptote.info, Node: Installation, Next: Tutorial, Prev: Description,
* Search paths:: Where 'Asymptote' looks for your files
* Compiling from UNIX source:: Building 'Asymptote' from scratch
* Editing modes:: Convenient 'emacs' and 'vim' modes
-* Subversion:: Getting the latest development source
+* Git:: Getting the latest development source
* Uninstall:: Goodbye, 'Asymptote'!
After following the instructions for your specific distribution, please
see also *note Configuring::.
We recommend subscribing to new release announcements at
- <http://freecode.com/projects/asy>
+ <http://sourceforge.net/projects/asymptote>
Users may also wish to monitor the 'Asymptote' forum:
<http://sourceforge.net/p/asymptote/discussion/409349>

-File: asymptote.info, Node: UNIX binary distributions, Next: MacOS X binary distributions, Up: Installation
+File: asymptote.info, Node: UNIX binary distributions, Next: MacOS X binary distributions, Prev: Installation, Up: Installation
2.1 UNIX binary distributions
=============================
@@ -279,7 +291,7 @@ be installed by default in '/usr/local/share/doc/asymptote/examples'.
Fedora users can easily install the most recent version of 'Asymptote'
with the command
-yum --enablerepo=rawhide install asymptote
+dnf --enablerepo=rawhide install asymptote
To install the latest version of 'Asymptote' on a Debian-based
distribution (e.g. Ubuntu, Mepis, Linspire) follow the instructions for
@@ -487,14 +499,16 @@ used; if it is old we recommend first putting
the 'Asymptote' source directory.
On 'UNIX' platforms (other than 'MacOS X'), we recommend using
-version '2.8.1' of the 'freeglut' library. To compile 'freeglut',
+version '3.0.0' of the 'freeglut' library. To compile 'freeglut',
download
- <http://prdownloads.sourceforge.net/freeglut/freeglut-2.8.1.tar.gz>
+ <http://prdownloads.sourceforge.net/freeglut/freeglut-3.0.0.tar.gz>
and type (as the root user):
-gunzip freeglut-2.8.1.tar.gz
-tar -xf freeglut-2.8.1.tar
-cd freeglut-2.8.1
+gunzip freeglut-3.0.0.tar.gz
+tar -xf freeglut-3.0.0.tar
+cd freeglut-3.0.0
./configure --prefix=/usr
+cmake .
+make
make install
cd ..
@@ -517,7 +531,7 @@ done as the root user. To install without root privileges, change the
with './configure --disable-gc'. For a list of other configuration
options, say './configure --help'. For example, one can tell configure
to look for header files and libraries in nonstandard locations:
-./configure CFLAGS=-I/opt/usr/include LDFLAGS=-L/opt/usr/lib
+./configure CXXFLAGS=-I/opt/usr/include LDFLAGS=-L/opt/usr/lib
If you are compiling 'Asymptote' with 'gcc', you will need a
relatively recent version (e.g. 3.4.4 or later). For full interactive
@@ -537,7 +551,7 @@ the configuration variable 'dir' to point to the directory 'base' (in
the top level directory of the 'Asymptote' source code).

-File: asymptote.info, Node: Editing modes, Next: Subversion, Prev: Compiling from UNIX source, Up: Installation
+File: asymptote.info, Node: Editing modes, Next: Git, Prev: Compiling from UNIX source, Up: Installation
2.7 Editing modes
=================
@@ -590,14 +604,15 @@ and putting the generated 'asymptote.xml' file in
'~/.kde/share/apps/katepart/syntax/'.

-File: asymptote.info, Node: Subversion, Next: Uninstall, Prev: Editing modes, Up: Installation
+File: asymptote.info, Node: Git, Next: Uninstall, Prev: Editing modes, Up: Installation
-2.8 Subversion (SVN)
-====================
+2.8 Git
+=======
The following commands are needed to install the latest development
-version of 'Asymptote' using 'Subversion':
-svn co http://svn.code.sf.net/p/asymptote/code/trunk/asymptote
+version of 'Asymptote' using 'git':
+git clone http://github.com/vectorgraphics/asymptote
+
cd asymptote
./autogen.sh
./configure
@@ -607,12 +622,12 @@ make install
To compile without optimization, use the command 'make CFLAGS=-g'.

-File: asymptote.info, Node: Uninstall, Prev: Subversion, Up: Installation
+File: asymptote.info, Node: Uninstall, Prev: Git, Up: Installation
2.9 Uninstall
=============
-To uninstall an 'Linux i386' binary distribution, use the commands
+To uninstall a 'Linux i386' binary distribution, use the commands
tar -zxvf asymptote-x.xx.i386.tgz | xargs --replace=% rm /%
texhash
@@ -626,6 +641,28 @@ File: asymptote.info, Node: Tutorial, Next: Drawing commands, Prev: Installat
3 Tutorial
**********
+* Menu:
+
+* Drawing in batch mode:: Run 'Asymptote' on a text file
+* Drawing in interactive mode:: Running 'Asymptote' interactively
+* Figure size:: Specifying the figure size
+* Labels:: Adding 'LaTeX' labels
+* Paths:: Drawing lines and curves
+
+A concise introduction to 'Asymptote' is given here. For a more
+thorough introduction, see the excellent 'Asymptote' tutorial written by
+Charles Staats:
+
+ <http://math.uchicago.edu/~cstaats/Charles_Staats_III/Notes_and_papers_files/asymptote_tutorial.pdf>
+
+ Another 'Asymptote' tutorial is available as a wiki, with images
+rendered by an online Asymptote engine:
+
+ <http://www.artofproblemsolving.com/wiki/?title=Asymptote_(Vector_Graphics_Language)>
+
+
+File: asymptote.info, Node: Drawing in batch mode, Next: Drawing in interactive mode, Prev: Tutorial, Up: Tutorial
+
3.1 Drawing in batch mode
=========================
@@ -649,6 +686,9 @@ immediately view the result:
Here, the '--' connector joins the two points '(0,0)' and '(100,100)'
with a line segment.
+
+File: asymptote.info, Node: Drawing in interactive mode, Next: Figure size, Prev: Drawing in batch mode, Up: Tutorial
+
3.2 Drawing in interactive mode
===============================
@@ -668,6 +708,9 @@ complete unambiguous words; otherwise, hitting tab again will show the
possible choices. Further commands specific to interactive mode are
described in *note Interactive mode::.
+
+File: asymptote.info, Node: Figure size, Next: Labels, Prev: Drawing in interactive mode, Up: Tutorial
+
3.3 Figure size
===============
@@ -708,6 +751,9 @@ replaced with the predefined variable 'unitsquare', or equivalently,
unitsize(1cm);
draw(unitsquare);
+
+File: asymptote.info, Node: Labels, Next: Paths, Prev: Figure size, Up: Tutorial
+
3.4 Labels
==========
@@ -730,6 +776,9 @@ the 'Asymptote' base module 'plain' (a user who has a local variable
named 'E' may access the compass direction 'E' by prefixing it with the
name of the module where it is defined: 'plain.E').
+
+File: asymptote.info, Node: Paths, Prev: Labels, Up: Tutorial
+
3.5 Paths
=========
@@ -796,12 +845,7 @@ label("(0,0,1)",(0,0,1),Z);
external links posted at <http://asymptote.sourceforge.net>) for further
examples, including two-dimensional and interactive three-dimensional
scientific graphs. Additional examples have been posted by Philippe
-Ivaldi at <http://www.piprime.fr/asymptote>. Excellent user-written
-'Asymptote' tutorials are also available:
-
- <http://www.artofproblemsolving.com/Wiki/index.php/Asymptote:_Basics>
-
- <http://math.uchicago.edu/~cstaats/Charles_Staats_III/Notes_and_papers_files/asymptote_tutorial.pdf>
+Ivaldi at <http://www.piprime.fr/asymptote>.

File: asymptote.info, Node: Drawing commands, Next: Bezier curves, Prev: Tutorial, Up: Top
@@ -842,7 +886,7 @@ currentpicture).
* label:: Label a point on a picture

-File: asymptote.info, Node: draw, Next: fill, Up: Drawing commands
+File: asymptote.info, Node: draw, Next: fill, Prev: Drawing commands, Up: Drawing commands
4.1 draw
========
@@ -1029,8 +1073,8 @@ void gouraudshade(picture pic=currentpicture, path g, bool stroke=false,
In the second form, the elements of 'z' are taken to be successive nodes
of path 'g'. The pens in 'p' must belong to the same color space.
Illustrations of Gouraud shading are provided in the example file
-'Gouraud.asy' and in the solid geometry module 'solids.asy'. The edge
-flags used in Gouraud shading are documented here:
+'Gouraud.asy'. The edge flags used in Gouraud shading are documented
+here:
<http://partners.adobe.com/public/developer/en/ps/sdk/TN5600.SmoothShading.pdf>.
Tensor product shading using fill rule 'fillrule' on patches bounded
@@ -1317,6 +1361,24 @@ File: asymptote.info, Node: Programming, Next: LaTeX usage, Prev: Bezier curv
6 Programming
*************
+* Menu:
+
+* Data types:: void, bool, int, real, pair, triple, string
+* Paths and guides:: Bezier curves
+* Pens:: Colors, line types, line widths, font sizes
+* Transforms:: Affine transforms
+* Frames and pictures:: Canvases for immediate and deferred drawing
+* Files:: Reading and writing your data
+* Variable initializers:: Initialize your variables
+* Structures:: Organize your data
+* Operators:: Arithmetic and logical operators
+* Implicit scaling:: Avoiding those ugly *s
+* Functions:: Traditional and high-order functions
+* Arrays:: Dynamic vectors
+* Casts:: Implicit and explicit casts
+* Import:: Importing external 'Asymptote' modules
+* Static:: Where to allocate your variable?
+
Here is a short introductory example to the 'Asymptote' programming
language that highlights the similarity of its control structures with
those of C, C++, and Java:
@@ -1353,26 +1415,8 @@ for(int k : array) {
In addition, it supports many features beyond the ones found in those
languages.
-* Menu:
-
-* Data types:: void, bool, int, real, pair, triple, string
-* Paths and guides:: Bezier curves
-* Pens:: Colors, line types, line widths, font sizes
-* Transforms:: Affine transforms
-* Frames and pictures:: Canvases for immediate and deferred drawing
-* Files:: Reading and writing your data
-* Variable initializers:: Initialize your variables
-* Structures:: Organize your data
-* Operators:: Arithmetic and logical operators
-* Implicit scaling:: Avoiding those ugly *s
-* Functions:: Traditional and high-order functions
-* Arrays:: Dynamic vectors
-* Casts:: Implicit and explicit casts
-* Import:: Importing external 'Asymptote' modules
-* Static:: Where to allocate your variable?
-

-File: asymptote.info, Node: Data types, Next: Paths and guides, Up: Programming
+File: asymptote.info, Node: Data types, Next: Paths and guides, Prev: Programming, Up: Programming
6.1 Data types
==============
@@ -1411,9 +1455,10 @@ user-defined types):
for reals is '0.0'. Real numbers have precision 'realEpsilon',
with 'realDigits' significant digits. The smallest positive real
number is 'realMin' and the largest positive real number is
- 'realMax'. The variable 'inf' and function 'bool isnan(real x)'
- are useful when floating-point exceptions are masked with the
- '-mask' command-line option (the default in interactive mode).
+ 'realMax'. The variables 'inf' and 'nan', along with the function
+ 'bool isnan(real x)' are useful when floating-point exceptions are
+ masked with the '-mask' command-line option (the default in
+ interactive mode).
'pair'
complex number, that is, an ordered pair of real components
@@ -1656,7 +1701,9 @@ user-defined types):
'string format(string s, int n, string locale="")'
returns a string containing 'n' formatted according to the
C-style format string 's' using locale 'locale' (or the
- current locale if an empty string is specified);
+ current locale if an empty string is specified), following the
+ behaviour of the C function 'fprintf'), except that only one
+ data field is allowed.
'string format(string s=defaultformat, string s=defaultseparator, real x, string locale="")'
returns a string containing 'x' formatted according to the
@@ -2812,10 +2859,12 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform
filltype filltype=NoFill, bool above=true);
The first example adds 'src' to 'currentpicture'; the second one
adds 'src' to 'dest'. The 'group' option specifies whether or not
- the graphical user interface 'xasy' should treat all of the
- elements of 'src' as a single entity (*note GUI::), 'filltype'
- requests optional background filling or clipping, and 'above'
- specifies whether to add 'src' above or below existing objects.
+ the graphical user interface
+ '<http://asymptote.sourceforge.net/gallery/.pdf>.asy' should treat
+ all of the elements of 'src' as a single entity (*note GUI::),
+ 'filltype' requests optional background filling or clipping, and
+ 'above' specifies whether to add 'src' above or below existing
+ objects.
There are also routines to add a picture or frame 'src' specified
in postscript coordinates to another picture 'dest' (or
@@ -3261,7 +3310,7 @@ struct Person {
string lastname;
static Person Person(string firstname, string lastname) {
- Person p;
+ Person p=new Person;
p.firstname=firstname;
p.lastname=lastname;
return p;
@@ -3291,7 +3340,7 @@ structure. That is, it essentially defines the following constructor
(assuming the structure is called 'Foo'):
static Foo Foo(ARGS) {
- Foo instance;
+ Foo instance=new Foo;
instance.operator init(ARGS);
return instance;
}
@@ -3379,7 +3428,7 @@ File: asymptote.info, Node: Operators, Next: Implicit scaling, Prev: Structur
* User-defined operators:: Overloading operators

-File: asymptote.info, Node: Arithmetic & logical, Next: Self & prefix operators, Up: Operators
+File: asymptote.info, Node: Arithmetic & logical, Next: Self & prefix operators, Prev: Operators, Up: Operators
6.9.1 Arithmetic & logical operators
------------------------------------
@@ -3547,6 +3596,13 @@ File: asymptote.info, Node: Functions, Next: Arrays, Prev: Implicit scaling,
6.11 Functions
==============
+* Menu:
+
+* Default arguments:: Default values can appear anywhere
+* Named arguments:: Assigning function arguments by keyword
+* Rest arguments:: Functions with a variable number of arguments
+* Mathematical functions:: Standard libm functions
+
'Asymptote' functions are treated as variables with a signature
(non-function variables have null signatures). Variables with the same
name are allowed, so long as they have distinct signatures.
@@ -3639,15 +3695,8 @@ infinite nested recursion will generate a stack overflow (reported as a
segmentation fault, unless a fully working version of the GNU library
'libsigsegv' (e.g. 2.4 or later) is installed at configuration time).
-* Menu:
-
-* Default arguments:: Default values can appear anywhere
-* Named arguments:: Assigning function arguments by keyword
-* Rest arguments:: Functions with a variable number of arguments
-* Mathematical functions:: Standard libm functions
-

-File: asymptote.info, Node: Default arguments, Next: Named arguments, Up: Functions
+File: asymptote.info, Node: Default arguments, Next: Named arguments, Prev: Functions, Up: Functions
6.11.1 Default arguments
------------------------
@@ -4273,7 +4322,6 @@ in like this:
file fin=input("test.txt");
real[][] A=fin.dimension(2,3);
real[][][] B=fin.dimension(2,3,4);
-Again, an integer limit of zero means no restriction.
Sometimes the array dimensions are stored with the data as integer
fields at the beginning of an array. Such 1, 2, or 3 dimensional arrays
@@ -4289,7 +4337,7 @@ output with the functions 'write(file,T[])', 'write(file,T[][])',
'write(file,T[][][])', respectively.

-File: asymptote.info, Node: Slices, Up: Arrays
+File: asymptote.info, Node: Slices, Prev: Arrays, Up: Arrays
6.12.1 Slices
-------------
@@ -4688,15 +4736,15 @@ File: asymptote.info, Node: LaTeX usage, Next: Base modules, Prev: Programmin
***************
'Asymptote' comes with a convenient 'LaTeX' style file 'asymptote.sty'
-that makes 'LaTeX' 'Asymptote'-aware. Entering 'Asymptote' code
-directly into the 'LaTeX' source file, at the point where it is needed,
-keeps figures organized and avoids the need to invent new file names for
-each figure. Simply add the line '\usepackage{asymptote}' at the
-beginning of your file and enclose your 'Asymptote' code within a
-'\begin{asy}...\end{asy}' environment. As with the 'LaTeX' 'comment'
-environment, the '\end{asy}' command must appear on a line by itself,
-with no trailing commands/comments. A blank line is not allowed after
-'\begin{asy}'.
+(v1.30 or later required) that makes 'LaTeX' 'Asymptote'-aware.
+Entering 'Asymptote' code directly into the 'LaTeX' source file, at the
+point where it is needed, keeps figures organized and avoids the need to
+invent new file names for each figure. Simply add the line
+'\usepackage{asymptote}' at the beginning of your file and enclose your
+'Asymptote' code within a '\begin{asy}...\end{asy}' environment. As
+with the 'LaTeX' 'comment' environment, the '\end{asy}' command must
+appear on a line by itself, with no trailing commands/comments. A blank
+line is not allowed after '\begin{asy}'.
The sample 'LaTeX' file below, named 'latexusage.tex', can be run as
follows:
@@ -4755,10 +4803,10 @@ labels might not show up in DVI viewers that cannot handle raw
\documentclass[12pt]{article}
% Use this form to include EPS (latex) or PDF (pdflatex) files:
-\usepackage{asymptote}
+%\usepackage{asymptote}
% Use this form with latex or pdflatex to include inline LaTeX code by default:
-%\usepackage[inline]{asymptote}
+\usepackage[inline]{asymptote}
% Use this form with latex or pdflatex to create PDF attachments by default:
%\usepackage[attach]{asymptote}
@@ -4919,11 +4967,12 @@ File: asymptote.info, Node: Base modules, Next: Options, Prev: LaTeX usage,
* flowchart:: Flowchart drawing routines
* contour:: Contour lines
* contour3:: Contour surfaces
+* smoothcontour3:: Smooth implicit surfaces
* slopefield:: Slope fields
* ode:: Ordinary differential equations

-File: asymptote.info, Node: plain, Next: simplex, Up: Base modules
+File: asymptote.info, Node: plain, Next: simplex, Prev: Base modules, Up: Base modules
8.1 'plain'
===========
@@ -5515,9 +5564,9 @@ following routines:
'BottomTop(bool extend=false)'
Request a bottom and top axis.
- Custom axis types can be created by following the examples in
- 'graph.asy'. One can easily override the default values for the
- standard axis types:
+ Custom axis types can be created by following the examples in the
+ module 'graph.asy'. One can easily override the default values for
+ the standard axis types:
import graph;
YZero=new axis(bool extend=true) {
@@ -5755,11 +5804,12 @@ following routines:
2. The next example draws a scientific-style graph with a legend. The
position of the legend can be adjusted either explicitly or by
- using the graphical user interface 'xasy' (*note GUI::). If an
- 'UnFill(real xmargin=0, real ymargin=xmargin)' or 'Fill(pen)'
- option is specified to 'add', the legend will obscure any
- underlying objects. Here we illustrate how to clip the portion of
- the picture covered by a label:
+ using the graphical user interface
+ '<http://asymptote.sourceforge.net/gallery/.pdf>.asy' (*note
+ GUI::). If an 'UnFill(real xmargin=0, real ymargin=xmargin)' or
+ 'Fill(pen)' option is specified to 'add', the legend will obscure
+ any underlying objects. Here we illustrate how to clip the portion
+ of the picture covered by a label:
import graph;
@@ -5841,7 +5891,7 @@ following routines:
size(200,150,IgnoreAspect);
file in=input("filegraph.dat").line();
- real[][] a=in.dimension(0,0);
+ real[][] a=in;
a=transpose(a);
real[] x=a[0];
@@ -6254,7 +6304,7 @@ following routines:
string[] titlelabel=in;
string[] columnlabel=in;
- real[][] a=in.dimension(0,0);
+ real[][] a=in;
a=transpose(a);
real[] t=a[0], susceptible=a[1], infectious=a[2], dead=a[3], larvae=a[4];
real[] susceptibleM=a[5], exposed=a[6],infectiousM=a[7];
@@ -6311,7 +6361,7 @@ following routines:
file fin=input("leastsquares.dat").line();
- real[][] a=fin.dimension(0,0);
+ real[][] a=fin;
a=transpose(a);
real[] t=a[0], rho=a[1];
@@ -6737,21 +6787,25 @@ rendering options documented at the beginning of module 'three.asy'.
The examples 'elevation.asy' and 'sphericalharmonic.asy' illustrate
how to draw a surface with patch-dependent colors. The examples
-'vertexshading' and 'smoothelevation' illustrate vertex-dependent
-colors, which is supported for both 'Asymptote''s native 'OpenGL'
-renderer and two-dimensional projections. Since the PRC output format
-does not currently support vertex shading of Bezier surfaces, PRC
-patches are shaded with the mean of the four vertex colors.
+'vertexshading.asy' and 'smoothelevation.asy' illustrate
+vertex-dependent colors, which is supported for both 'Asymptote''s
+native 'OpenGL' renderer and two-dimensional projections. Since the PRC
+output format does not currently support vertex shading of Bezier
+surfaces, PRC patches are shaded with the mean of the four vertex
+colors.
A surface can be constructed from a cyclic 'path3' with the
constructor
surface surface(path3 external, triple[] internal=new triple[],
- triple[] normals=new triple[], pen[] colors=new pen[],
- bool3 planar=default);
+ pen[] colors=new pen[], bool3 planar=default);
and then filled:
+draw(surface(unitsquare3,new triple[] {X,Y,Z,O}),red);
+draw(surface(O--X{Y}..Y{-X}--cycle,new triple[] {Z}),red);
draw(surface(path3(polygon(5))),red,nolight);
draw(surface(unitcircle3),red,nolight);
draw(surface(unitcircle3,new pen[] {red,green,blue,black}),nolight);
+The first example draws a Bezier patch and the second example draws a
+Bezier triangle. The third and fourth examples are planar surfaces.
The last example constructs a patch with vertex-specific colors. A
three-dimensional planar surface in the plane 'plane' can be constructed
from a two-dimensional cyclic path 'g' with the constructor
@@ -6790,7 +6844,7 @@ and force all lines to be drawn with 'linewidth(0)' (one pixel wide,
regardless of the resolution). By default, mesh and contour lines in
three-dimensions are always drawn thin, unless an explicit line width is
given in the pen parameter or the setting 'thin' is set to 'false'. The
-pens 'thin()' and 'thick()' defined in plain_pens.asy can also be used
+pens 'thin()' and 'thick()' defined in 'plain_pens.asy' can also be used
to override these defaults for specific draw commands.
There are four choices for viewing 3D 'Asymptote' output:
@@ -7147,7 +7201,7 @@ real[] intersect(path3 p, surface s, real fuzz=-1);
returns a real array of length 3 containing the intersection times, if
any, of a path 'p' with a surface 's'. The routine
real[][] intersections(path3 p, surface s, real fuzz=-1);
-returns all (unless there are infinitey many) intersection times of a
+returns all (unless there are infinitely many) intersection times of a
path 'p' with a surface 's' as a sorted array of real arrays of length
3, and
triple[] intersectionpoints(path3 p, surface s, real fuzz=-1);
@@ -7858,25 +7912,62 @@ for(int i=0; i < np; ++i)
[triangulate]
- The example 'Gouraudcontour' illustrates how to produce color density
-images over such irregular triangular meshes. 'Asymptote' uses a robust
-version of Paul Bourke's Delaunay triangulation algorithm based on the
-public-domain exact arithmetic predicates written by Jonathan Shewchuk.
+ The example 'Gouraudcontour.asy' illustrates how to produce color
+density images over such irregular triangular meshes. 'Asymptote' uses
+a robust version of Paul Bourke's Delaunay triangulation algorithm based
+on the public-domain exact arithmetic predicates written by Jonathan
+Shewchuk.

-File: asymptote.info, Node: contour3, Next: slopefield, Prev: contour, Up: Base modules
+File: asymptote.info, Node: contour3, Next: smoothcontour3, Prev: contour, Up: Base modules
8.37 'contour3'
===============
This package draws surfaces described as the null space of real-valued
-functions of (x,y,z) or real[][][] matrices. Its usage is illustrated
+functions of (x,y,z) or 'real[][][]' matrices. Its usage is illustrated
in the example file 'magnetic.asy'.

-File: asymptote.info, Node: slopefield, Next: ode, Prev: contour3, Up: Base modules
+File: asymptote.info, Node: smoothcontour3, Next: slopefield, Prev: contour3, Up: Base modules
+
+8.38 'smoothcontour3'
+=====================
-8.38 'slopefield'
+This module, written by Charles Staats, draws implicitly defined
+surfaces with smooth appearance. The purpose of this module is similar
+to that of 'contour3': given a real-valued function f(x,y,z), construct
+the surface described by the equation f(x,y,z) = 0. The
+'smoothcontour3' module generally produces nicer results than
+'contour3', but takes longer to compile. Additionally, the algorithm
+assumes that the function and the surface are both smooth; if they are
+not, then 'contour3' may be a better choice.
+
+ To construct the null surface of a function 'f(triple)' or
+'ff(real,real,real)' over 'box(a,b)', use the routine
+surface implicitsurface(real f(triple)=null,
+ real ff(real,real,real)=null,
+ triple a,
+ triple b,
+ int n=nmesh,
+ bool keyword overlapedges=false,
+ int keyword nx=n,
+ int keyword ny=n,
+ int keyword nz=n,
+ int keyword maxdepth=8,
+ bool usetriangles=true);
+The optional parameter 'overlapedges' attempts to compensate for an
+artifact that can cause the renderer to "see through" the boundary
+between patches. Although it defaults to 'false', it should usually be
+set to 'true'. The example 'genustwo.asy' illustrates the use of this
+function. Additional examples, together with a more in-depth
+explanation of the module's usage and pitfalls, are available at
+<https://github.com/charlesstaats/smoothcontour3>.
+
+
+File: asymptote.info, Node: slopefield, Next: ode, Prev: smoothcontour3, Up: Base modules
+
+8.39 'slopefield'
=================
To draw a slope field for the differential equation dy/dx=f(x,y) (or
@@ -7918,7 +8009,7 @@ draw(curve((0,0),func,(-3,-3),(3,3)),red);

File: asymptote.info, Node: ode, Prev: slopefield, Up: Base modules
-8.39 'ode'
+8.40 'ode'
==========
The 'ode' module, illustrated in the example 'odetest.asy', implements a
@@ -7997,7 +8088,7 @@ Options (negate by replacing - with -no):
-prc Embed 3D PRC graphics in PDF output [true]
-prompt string Prompt [> ]
-prompt2 string Continuation prompt for multiline input [..]
--q,-quiet Suppress welcome message [false]
+-q,-quiet Suppress welcome text and noninteractive stdout [false]
-render n Render 3D graphics using n pixels per bp (-1=auto) [-1]
-resizestep step Resize step [1.2]
-reverse reverse 3D animations [false]
@@ -8236,42 +8327,37 @@ File: asymptote.info, Node: GUI, Next: PostScript to Asymptote, Prev: Interac
11 Graphical User Interface
***************************
+* Menu:
+
+* GUI installation:: Installing 'xasy'
+* GUI usage:: Using 'xasy' to edit objects
+
In the event that adjustments to the final figure are required, the
preliminary Graphical User Interface (GUI) 'xasy' included with
'Asymptote' allows you to move graphical objects and draw new ones. The
modified figure can then be saved as a normal 'Asymptote' file.
-* Menu:
-
-* GUI installation:: Installing 'xasy'
-* GUI usage::
-

-File: asymptote.info, Node: GUI installation, Next: GUI usage, Up: GUI
+File: asymptote.info, Node: GUI installation, Next: GUI usage, Prev: GUI, Up: GUI
11.1 GUI installation
=====================
As 'xasy' is written in the interactive scripting language 'Python/TK',
-it requires 'Python' (<http://www.python.org>), the 'Python Imaging
-Library' (<http://www.pythonware.com/products/pil/>), and the 'tkinter'
-package (included with 'Python' under 'Microsoft Windows') be installed.
-'Fedora Linux' users can either install 'tkinter' with the commands
-yum install tkinter
-yum install tk-devel
+it requires 'Python' (<http://www.python.org>), the 'Pillow' fork of the
+'Python Imaging Library',and the 'tkinter' package (included with
+'Python' under 'Microsoft Windows'). 'Fedora Linux' users can either
+install 'tkinter' and 'Pillow' with the commands
+dnf install tkinter
+dnf install tk-devel
+dnf install python-pillow-tk
or manually install the 'tkinter', 'tix', 'tk', and 'tk-devel' packages.
Pictures are deconstructed into the PNG image format, which supports
full alpha channel transparency. Under 'Microsoft Windows', this
-requires 'Python 2.7.4' and the 'Python Imaging Library':
- <http://www.python.org/ftp/python/2.7.4/python-2.7.4.msi>
- <http://effbot.org/downloads/PIL-1.1.7.win32-py2.7.exe>.
-On 'UNIX' systems, place
-<http://effbot.org/downloads/Imaging-1.1.7.tar.gz> in the 'Asymptote'
-source directory, and type (as the root user):
-tar -zxf Imaging-1.1.7.tar.gz
-cd Imaging-1.1.7
-python setup.py install
+requires 'Python 2.7.4' or later and version '3.1.0' of the 'Pillow'
+fork of the 'Python Imaging Library', available from
+ <http://pypi.python.org/pypi/Pillow>

File: asymptote.info, Node: GUI usage, Prev: GUI installation, Up: GUI
@@ -8333,9 +8419,9 @@ To receive announcements of upcoming releases, please subscribe to
'Asymptote' at
<http://freecode.com/projects/asy>
If you find a bug in 'Asymptote', please check (if possible) whether the
-bug is still present in the latest 'Subversion' developmental code
-(*note Subversion::) before submitting a bug report. New bugs can be
-submitted using the Bug Tracking System at
+bug is still present in the latest 'git' developmental code (*note
+Git::) before submitting a bug report. New bugs can be submitted using
+the Bug Tracking System at
<http://sourceforge.net/projects/asymptote>
To see if the bug has already been fixed, check bugs with Status
'Closed' and recent lines in
@@ -8432,9 +8518,10 @@ author of the program 'MetaPost' that inspired the development of
The authors of 'Asymptote' are Andy Hammerlindl, John Bowman, and Tom
Prince. Sean Healy designed the 'Asymptote' logo. Other contributors
-include Michail Vidiassov, Radoslav Marinov, Orest Shardt, Chris Savage,
-Philippe Ivaldi, Olivier Guibe', Jacques Pienaar, Mark Henning, Steve
-Melenchuk, Martin Wiebusch, and Stefan Knorr.
+include Orest Shardt, Jesse Frohlich, Michail Vidiassov, Charles Staats,
+Philippe Ivaldi, Olivier Guibe', Radoslav Marinov, Jeff Samuelson, Chris
+Savage, Jacques Pienaar, Mark Henning, Steve Melenchuk, Martin Wiebusch,
+and Stefan Knorr.

File: asymptote.info, Node: Index, Prev: Credits, Up: Top
@@ -8476,7 +8563,7 @@ Index
(line 6)
* '-': Arithmetic & logical.
(line 14)
-* '--': Tutorial. (line 123)
+* '--': Paths. (line 16)
* '--' <1>: Self & prefix operators.
(line 6)
* '---': Bezier curves. (line 84)
@@ -8486,8 +8573,9 @@ Index
* '-l': Options. (line 202)
* '-u': Options. (line 193)
* '-V': Configuring. (line 6)
-* '-V' <1>: Tutorial. (line 19)
-* '..': Tutorial. (line 123)
+* '-V' <1>: Drawing in batch mode.
+ (line 16)
+* '..': Paths. (line 16)
* '.asy': Search paths. (line 12)
* '/': Arithmetic & logical.
(line 18)
@@ -8496,7 +8584,7 @@ Index
* 2D graphs: graph. (line 6)
* 3D graphs: graph3. (line 6)
* 3D grids: grid3. (line 6)
-* 3D 'PostScript': three. (line 576)
+* 3D 'PostScript': three. (line 580)
* ':': Arithmetic & logical.
(line 56)
* '::': Bezier curves. (line 70)
@@ -8519,19 +8607,19 @@ Index
(line 50)
* '^=': Self & prefix operators.
(line 6)
-* '^^': Tutorial. (line 130)
+* '^^': Paths. (line 23)
* '|': Arithmetic & logical.
(line 48)
* '||': Arithmetic & logical.
(line 46)
* 'a4': Configuring. (line 59)
-* 'abort': Data types. (line 355)
-* 'abs': Data types. (line 64)
+* 'abort': Data types. (line 358)
+* 'abs': Data types. (line 65)
* 'abs' <1>: Mathematical functions.
(line 35)
* 'accel': Paths and guides. (line 126)
* 'accel' <1>: Paths and guides. (line 132)
-* 'accel' <2>: three. (line 480)
+* 'accel' <2>: three. (line 484)
* 'access': Import. (line 6)
* acknowledgments: Credits. (line 6)
* 'acos': Mathematical functions.
@@ -8543,9 +8631,9 @@ Index
* 'add': Frames and pictures.
(line 212)
* 'add' <1>: Frames and pictures.
- (line 226)
-* 'add' <2>: three. (line 252)
-* 'addViews': three. (line 373)
+ (line 228)
+* 'add' <2>: three. (line 256)
+* 'addViews': three. (line 377)
* 'adjust': Pens. (line 119)
* 'Ai': Mathematical functions.
(line 48)
@@ -8562,46 +8650,47 @@ Index
* 'and': Bezier curves. (line 56)
* 'AND': Arithmetic & logical.
(line 63)
-* 'angle': Data types. (line 72)
+* 'angle': Data types. (line 73)
* 'animate': Configuring. (line 65)
* 'animate' <1>: Files. (line 155)
* 'animate' <2>: animation. (line 12)
* 'animation': animation. (line 6)
* animation: animation. (line 6)
* 'annotate': annotate. (line 6)
-* 'antialias': three. (line 191)
+* 'antialias': three. (line 195)
* 'antialias' <1>: Options. (line 146)
* append: Files. (line 36)
* 'append': Arrays. (line 39)
* 'arc': Paths and guides. (line 24)
* 'Arc': Paths and guides. (line 37)
-* 'arc' <1>: three. (line 263)
+* 'arc' <1>: three. (line 267)
* 'ArcArrow': draw. (line 26)
-* 'ArcArrow3': three. (line 543)
+* 'ArcArrow3': three. (line 547)
* 'ArcArrows': draw. (line 26)
-* 'ArcArrows3': three. (line 543)
+* 'ArcArrows3': three. (line 547)
* 'arclength': Paths and guides. (line 153)
-* 'arclength' <1>: three. (line 480)
+* 'arclength' <1>: three. (line 484)
* 'arcpoint': Paths and guides. (line 163)
* 'arctime': Paths and guides. (line 157)
-* 'arctime' <1>: three. (line 480)
+* 'arctime' <1>: three. (line 484)
* arguments: Default arguments. (line 6)
* arithmetic operators: Arithmetic & logical.
(line 6)
* 'array': Arrays. (line 112)
-* array iteration: Programming. (line 34)
+* array iteration: Programming. (line 52)
* arrays: Arrays. (line 6)
* 'arrow': Drawing commands. (line 31)
* 'Arrow': draw. (line 26)
* 'arrow' <1>: label. (line 70)
-* arrow keys: Tutorial. (line 37)
-* 'Arrow3': three. (line 543)
+* arrow keys: Drawing in interactive mode.
+ (line 11)
+* 'Arrow3': three. (line 547)
* arrows: draw. (line 26)
* 'Arrows': draw. (line 26)
-* 'Arrows3': three. (line 543)
+* 'Arrows3': three. (line 547)
* 'as': Import. (line 67)
-* 'ascii': Data types. (line 300)
-* 'ascii' <1>: Data types. (line 300)
+* 'ascii': Data types. (line 303)
+* 'ascii' <1>: Data types. (line 303)
* 'asin': Mathematical functions.
(line 6)
* 'aSin': Mathematical functions.
@@ -8610,9 +8699,9 @@ Index
(line 6)
* 'Aspect': Frames and pictures.
(line 59)
-* 'assert': Data types. (line 360)
-* assignment: Programming. (line 8)
-* 'asy': Data types. (line 350)
+* 'assert': Data types. (line 363)
+* assignment: Programming. (line 26)
+* 'asy': Data types. (line 353)
* 'asy' <1>: Import. (line 101)
* 'asy-mode': Editing modes. (line 6)
* 'asy.vim': Editing modes. (line 32)
@@ -8630,56 +8719,59 @@ Index
(line 6)
* 'atleast': Bezier curves. (line 56)
* 'attach': Frames and pictures.
- (line 271)
+ (line 273)
* 'attach' <1>: LaTeX usage. (line 50)
-* 'attach' <2>: graph. (line 406)
-* 'autoadjust': three. (line 338)
+* 'attach' <2>: graph. (line 407)
+* 'autoadjust': three. (line 342)
* 'autoimport': Options. (line 113)
-* automatic scaling: graph. (line 690)
-* automatic scaling <1>: graph. (line 690)
+* automatic scaling: graph. (line 691)
+* automatic scaling <1>: graph. (line 691)
* 'axialshade': fill. (line 43)
-* 'axis': graph. (line 905)
-* 'axis' <1>: graph. (line 988)
+* 'axis': graph. (line 906)
+* 'axis' <1>: graph. (line 989)
* 'axis' <2>: graph3. (line 66)
* 'axis' <3>: graph3. (line 82)
-* 'azimuth': Data types. (line 152)
+* 'azimuth': Data types. (line 153)
* 'babel': babel. (line 6)
* background color: Frames and pictures.
(line 180)
-* 'BackView': three. (line 366)
+* 'BackView': three. (line 370)
* 'Bar': draw. (line 19)
-* 'Bar3': three. (line 543)
+* 'Bar3': three. (line 547)
* 'Bars': draw. (line 19)
-* 'Bars3': three. (line 543)
+* 'Bars3': three. (line 547)
* 'barsize': draw. (line 19)
* base modules: Base modules. (line 6)
* 'basealign': Pens. (line 177)
* 'baseline': label. (line 90)
-* batch mode: Tutorial. (line 5)
-* 'beep': Data types. (line 373)
+* batch mode: Drawing in batch mode.
+ (line 6)
+* 'beep': Data types. (line 376)
* 'BeginArcArrow': draw. (line 26)
-* 'BeginArcArrow3': three. (line 543)
+* 'BeginArcArrow3': three. (line 547)
* 'BeginArrow': draw. (line 26)
-* 'BeginArrow3': three. (line 543)
+* 'BeginArrow3': three. (line 547)
* 'BeginBar': draw. (line 19)
-* 'BeginBar3': three. (line 543)
+* 'BeginBar3': three. (line 547)
* 'BeginDotMargin': draw. (line 42)
-* 'BeginDotMargin3': three. (line 559)
+* 'BeginDotMargin3': three. (line 563)
* 'BeginMargin': draw. (line 42)
-* 'BeginMargin3': three. (line 559)
+* 'BeginMargin3': three. (line 563)
* 'BeginPenMargin': draw. (line 42)
-* 'BeginPenMargin2': three. (line 559)
-* 'BeginPenMargin3': three. (line 559)
+* 'BeginPenMargin2': three. (line 563)
+* 'BeginPenMargin3': three. (line 563)
* 'BeginPoint': label. (line 55)
* Bessel: Mathematical functions.
(line 48)
* 'bevel': flowchart. (line 72)
* 'beveljoin': Pens. (line 145)
* Bezier curves: Bezier curves. (line 6)
-* 'bezulate': three. (line 102)
+* 'Bezier patch': three. (line 88)
+* 'Bezier triangle': three. (line 88)
+* 'bezulate': three. (line 106)
* 'Bi': Mathematical functions.
(line 48)
-* 'Billboard': three. (line 450)
+* 'Billboard': three. (line 454)
* 'binary': Files. (line 76)
* binary format: Files. (line 76)
* binary operators: Arithmetic & logical.
@@ -8687,7 +8779,7 @@ Index
* 'binarytree': binarytree. (line 6)
* 'Bi_deriv': Mathematical functions.
(line 48)
-* 'black stripes': three. (line 191)
+* 'black stripes': three. (line 195)
* 'Blank': draw. (line 26)
* 'block.bottom': flowchart. (line 19)
* 'block.bottomleft': flowchart. (line 19)
@@ -8706,7 +8798,7 @@ Index
(line 6)
* 'Bottom': graph. (line 132)
* 'BottomTop': graph. (line 138)
-* 'BottomView': three. (line 366)
+* 'BottomView': three. (line 370)
* bounding box: Frames and pictures.
(line 180)
* 'Bounds': graph3. (line 21)
@@ -8714,25 +8806,26 @@ Index
(line 25)
* 'box' <1>: Frames and pictures.
(line 130)
-* 'box' <2>: three. (line 285)
-* 'box' <3>: three. (line 287)
-* 'bp': Tutorial. (line 26)
+* 'box' <2>: three. (line 289)
+* 'box' <3>: three. (line 291)
+* 'bp': Drawing in batch mode.
+ (line 23)
* 'brace': Paths and guides. (line 51)
-* 'break': Programming. (line 30)
+* 'break': Programming. (line 48)
* 'breakpoints': Debugger. (line 21)
* brick: Pens. (line 265)
-* broken axis: graph. (line 801)
+* broken axis: graph. (line 802)
* bug reports: Help. (line 19)
* 'buildcycle': Paths and guides. (line 270)
* 'Button-1': GUI. (line 6)
* 'Button-2': GUI. (line 6)
* 'BWRainbow': palette. (line 15)
* 'BWRainbow2': palette. (line 18)
-* 'C' string: Data types. (line 215)
+* 'C' string: Data types. (line 216)
* 'CAD': CAD. (line 6)
* 'calculateTransform': Frames and pictures.
(line 118)
-* 'camera': three. (line 332)
+* 'camera': three. (line 336)
* casts: Casts. (line 6)
* 'cbrt': Mathematical functions.
(line 6)
@@ -8740,7 +8833,7 @@ Index
* 'ceil': Mathematical functions.
(line 26)
* 'Center': label. (line 60)
-* 'center': three. (line 315)
+* 'center': three. (line 319)
* checker: Pens. (line 265)
* Chinese: unicode. (line 12)
* 'choose': Mathematical functions.
@@ -8749,20 +8842,20 @@ Index
(line 48)
* 'circle': Paths and guides. (line 10)
* 'Circle': Paths and guides. (line 18)
-* 'circle' <1>: three. (line 259)
+* 'circle' <1>: three. (line 263)
* 'circle' <2>: flowchart. (line 61)
* 'circlebarframe': markers. (line 18)
* CJK: unicode. (line 12)
* 'clamped': graph. (line 36)
* 'clear': Files. (line 93)
* 'clear' <1>: Debugger. (line 23)
-* 'clip': fill. (line 114)
+* 'clip': clip. (line 6)
* 'CLZ': Arithmetic & logical.
(line 63)
-* 'cm': Tutorial. (line 63)
+* 'cm': Figure size. (line 18)
* 'cmd': Configuring. (line 32)
* 'cmyk': Pens. (line 34)
-* 'colatitude': Data types. (line 157)
+* 'colatitude': Data types. (line 158)
* color: Pens. (line 23)
* 'coloredNodes': tube. (line 25)
* 'coloredpath': tube. (line 18)
@@ -8774,12 +8867,12 @@ Index
* command-line options: Configuring. (line 84)
* command-line options <1>: Options. (line 6)
* comment character: Files. (line 16)
-* compass directions: Tutorial. (line 103)
+* compass directions: Labels. (line 18)
* Compiling from UNIX source: Compiling from UNIX source.
(line 6)
* 'complement': Arrays. (line 140)
* 'concat': Arrays. (line 167)
-* conditional: Programming. (line 8)
+* conditional: Programming. (line 26)
* conditional <1>: Arithmetic & logical.
(line 56)
* 'config': Configuring. (line 65)
@@ -8787,10 +8880,10 @@ Index
* configuration file: Configuring. (line 22)
* configuration file <1>: Options. (line 117)
* configuring: Configuring. (line 6)
-* 'conj': Data types. (line 61)
+* 'conj': Data types. (line 62)
* constructors: Structures. (line 91)
* 'context': Options. (line 146)
-* 'continue': Programming. (line 30)
+* 'continue': Programming. (line 48)
* 'continue' <1>: Debugger. (line 31)
* 'contour': contour. (line 6)
* 'contour3': contour3. (line 6)
@@ -8811,11 +8904,11 @@ Index
* 'cosh': Mathematical functions.
(line 6)
* 'cputime': Structures. (line 169)
-* 'crop': graph. (line 639)
-* cropping graphs: graph. (line 639)
-* 'cross': Data types. (line 105)
-* 'cross' <1>: Data types. (line 195)
-* 'cross' <2>: graph. (line 480)
+* 'crop': graph. (line 640)
+* cropping graphs: graph. (line 640)
+* 'cross': Data types. (line 106)
+* 'cross' <1>: Data types. (line 196)
+* 'cross' <2>: graph. (line 481)
* 'crossframe': markers. (line 22)
* crosshatch: Pens. (line 282)
* 'csv': Arrays. (line 351)
@@ -8826,33 +8919,33 @@ Index
* 'curl' <1>: three. (line 6)
* 'curlSpecifier': Paths and guides. (line 408)
* 'currentpen': Pens. (line 6)
-* 'currentprojection': three. (line 363)
+* 'currentprojection': three. (line 367)
* 'curve': slopefield. (line 20)
* custom axis types: graph. (line 141)
-* custom mark routine: graph. (line 577)
+* custom mark routine: graph. (line 578)
* custom tick locations: graph. (line 233)
* 'cut': Paths and guides. (line 251)
-* 'cycle': Tutorial. (line 74)
-* 'cycle' <1>: Tutorial. (line 123)
+* 'cycle': Figure size. (line 29)
+* 'cycle' <1>: Paths. (line 16)
* 'cycle' <2>: three. (line 6)
* 'cyclic': Paths and guides. (line 85)
* 'cyclic' <1>: Paths and guides. (line 376)
* 'cyclic' <2>: Arrays. (line 39)
-* 'cyclic' <3>: three. (line 480)
+* 'cyclic' <3>: three. (line 484)
* Cyrillic: unicode. (line 7)
* 'dashdotted': Pens. (line 98)
* 'dashed': Pens. (line 98)
* data types: Data types. (line 6)
-* 'date': Data types. (line 312)
+* 'date': Data types. (line 315)
* Debian: UNIX binary distributions.
(line 19)
* debugger: Debugger. (line 6)
-* declaration: Programming. (line 8)
+* declaration: Programming. (line 26)
* 'deconstruct': GUI usage. (line 6)
* default arguments: Default arguments. (line 6)
* 'defaultformat': graph. (line 175)
* 'DefaultHead': draw. (line 26)
-* 'DefaultHead3': three. (line 543)
+* 'DefaultHead3': three. (line 547)
* 'defaultpen': Pens. (line 45)
* 'defaultpen' <1>: Pens. (line 118)
* 'defaultpen' <2>: Pens. (line 123)
@@ -8862,7 +8955,7 @@ Index
* 'defaultpen' <6>: Pens. (line 367)
* 'defaultrender': three. (line 46)
* 'deferred drawing': simplex. (line 6)
-* 'degrees': Data types. (line 77)
+* 'degrees': Data types. (line 78)
* 'degrees' <1>: Mathematical functions.
(line 17)
* 'Degrees': Mathematical functions.
@@ -8874,36 +8967,37 @@ Index
* 'diamond': flowchart. (line 54)
* 'dimension': Arrays. (line 356)
* 'dir': Search paths. (line 9)
-* 'dir' <1>: Data types. (line 89)
-* 'dir' <2>: Data types. (line 179)
+* 'dir' <1>: Data types. (line 90)
+* 'dir' <2>: Data types. (line 180)
* 'dir' <3>: Paths and guides. (line 109)
-* 'dir' <4>: three. (line 480)
+* 'dir' <4>: three. (line 484)
* direction specifier: Bezier curves. (line 6)
* directory: Files. (line 25)
* 'dirSpecifier': Paths and guides. (line 390)
* 'dirtime': Paths and guides. (line 166)
* 'display': Configuring. (line 65)
-* 'do': Programming. (line 30)
+* 'do': Programming. (line 48)
* 'DOSendl': Files. (line 61)
* 'DOSnewl': Files. (line 61)
* 'dot': draw. (line 82)
-* 'dot' <1>: Data types. (line 102)
-* 'dot' <2>: Data types. (line 192)
+* 'dot' <1>: Data types. (line 103)
+* 'dot' <2>: Data types. (line 193)
* 'dot' <3>: Arrays. (line 248)
* 'dot' <4>: Arrays. (line 251)
* 'DotMargin': draw. (line 42)
-* 'DotMargin3': three. (line 559)
+* 'DotMargin3': three. (line 563)
* 'DotMargins': draw. (line 42)
-* 'DotMargins3': three. (line 559)
+* 'DotMargins3': three. (line 563)
* 'dotted': Pens. (line 98)
-* 'double deferred drawing': three. (line 237)
+* 'double deferred drawing': three. (line 241)
* double precision: Files. (line 76)
* 'draw': Drawing commands. (line 31)
+* 'draw' <1>: draw. (line 6)
* 'Draw': draw. (line 26)
-* 'draw' <1>: draw. (line 109)
+* 'draw' <2>: draw. (line 109)
* 'Draw' <1>: Frames and pictures.
(line 160)
-* 'draw' <2>: three. (line 110)
+* 'draw' <3>: three. (line 114)
* drawing commands: Drawing commands. (line 6)
* 'drawline': math. (line 9)
* 'drawtree': drawtree. (line 6)
@@ -8912,7 +9006,7 @@ Index
* 'dvisvgm': Configuring. (line 65)
* 'dvisvgm' <1>: Options. (line 151)
* 'dvisvgmOptions': Options. (line 132)
-* 'E': Tutorial. (line 103)
+* 'E': Labels. (line 18)
* 'E' <1>: Mathematical functions.
(line 48)
* Editing modes: Editing modes. (line 6)
@@ -8923,26 +9017,26 @@ Index
(line 25)
* elliptic functions: Mathematical functions.
(line 48)
-* 'else': Programming. (line 8)
+* 'else': Programming. (line 26)
* 'emacs': Editing modes. (line 6)
* 'embed': embed. (line 6)
-* 'Embedded': three. (line 450)
+* 'Embedded': three. (line 454)
* 'empty': Frames and pictures.
(line 7)
* 'EndArcArrow': draw. (line 26)
-* 'EndArcArrow3': three. (line 543)
+* 'EndArcArrow3': three. (line 547)
* 'EndArrow': draw. (line 26)
-* 'EndArrow3': three. (line 543)
+* 'EndArrow3': three. (line 547)
* 'EndBar': draw. (line 19)
-* 'EndBar3': three. (line 543)
+* 'EndBar3': three. (line 547)
* 'EndDotMargin': draw. (line 42)
-* 'EndDotMargin3': three. (line 559)
+* 'EndDotMargin3': three. (line 563)
* 'endl': Files. (line 61)
* 'EndMargin': draw. (line 42)
-* 'EndMargin3': three. (line 559)
+* 'EndMargin3': three. (line 563)
* 'EndPenMargin': draw. (line 42)
-* 'EndPenMargin2': three. (line 559)
-* 'EndPenMargin3': three. (line 559)
+* 'EndPenMargin2': three. (line 563)
+* 'EndPenMargin3': three. (line 563)
* 'EndPoint': label. (line 55)
* 'envelope': Frames and pictures.
(line 25)
@@ -8953,31 +9047,32 @@ Index
* 'eol' <1>: Arrays. (line 333)
* EPS: label. (line 78)
* 'EPS': Options. (line 146)
-* erase: Tutorial. (line 37)
-* 'erase': Data types. (line 255)
+* erase: Drawing in interactive mode.
+ (line 11)
+* 'erase': Data types. (line 256)
* 'erase' <1>: Frames and pictures.
(line 7)
* 'erase' <2>: Frames and pictures.
- (line 279)
+ (line 281)
* 'erf': Mathematical functions.
(line 6)
* 'erfc': Mathematical functions.
(line 6)
* 'error': Files. (line 16)
* 'error' <1>: Files. (line 93)
-* error bars: graph. (line 531)
-* 'errorbars': graph. (line 480)
+* error bars: graph. (line 532)
+* 'errorbars': graph. (line 481)
* 'eval': Import. (line 97)
* 'eval' <1>: Import. (line 107)
-* evenodd: Tutorial. (line 144)
+* evenodd: Paths. (line 37)
* 'evenodd': Pens. (line 160)
-* 'exit': Data types. (line 364)
+* 'exit': Data types. (line 367)
* 'exit' <1>: Interactive mode. (line 54)
* 'exit' <2>: Debugger. (line 56)
* 'exp': Mathematical functions.
(line 6)
-* 'expi': Data types. (line 85)
-* 'expi' <1>: Data types. (line 175)
+* 'expi': Data types. (line 86)
+* 'expi' <1>: Data types. (line 176)
* 'explicit': Casts. (line 6)
* explicit casts: Casts. (line 21)
* 'expm1': Mathematical functions.
@@ -8988,12 +9083,12 @@ Index
* 'extension': Paths and guides. (line 246)
* 'extension' <1>: MetaPost. (line 10)
* 'external': embed. (line 11)
-* 'extrude': three. (line 474)
+* 'extrude': three. (line 478)
* 'F': Mathematical functions.
(line 48)
* 'fabs': Mathematical functions.
(line 6)
-* 'face': three. (line 584)
+* 'face': three. (line 588)
* 'factorial': Mathematical functions.
(line 39)
* Fedora: UNIX binary distributions.
@@ -9002,12 +9097,13 @@ Index
* 'fft': Arrays. (line 234)
* 'fft' <1>: math. (line 26)
* 'FFTW': Compiling from UNIX source.
- (line 61)
+ (line 63)
* 'file': Files. (line 6)
* 'file' <1>: Debugger. (line 44)
* 'Fill': draw. (line 26)
* 'fill': draw. (line 114)
-* 'fill' <1>: fill. (line 17)
+* 'fill' <1>: fill. (line 6)
+* 'fill' <2>: fill. (line 17)
* 'Fill' <1>: Frames and pictures.
(line 146)
* 'FillDraw': draw. (line 26)
@@ -9016,12 +9112,12 @@ Index
(line 136)
* 'filloutside': fill. (line 27)
* 'fillrule': Pens. (line 160)
-* 'find': Data types. (line 240)
+* 'find': Data types. (line 241)
* 'find' <1>: Arrays. (line 149)
* 'firstcut': Paths and guides. (line 262)
* 'fit': Frames and pictures.
(line 113)
-* 'fit3': three. (line 250)
+* 'fit3': three. (line 254)
* 'fixedscaling': Frames and pictures.
(line 81)
* 'floor': Mathematical functions.
@@ -9035,15 +9131,15 @@ Index
* 'font command': Pens. (line 202)
* 'fontcommand': Pens. (line 217)
* 'fontsize': Pens. (line 188)
-* 'for': Programming. (line 8)
-* 'format': Data types. (line 283)
+* 'for': Programming. (line 26)
+* 'format': Data types. (line 284)
* 'format' <1>: Options. (line 146)
* forum: Help. (line 6)
* 'frame': Frames and pictures.
(line 7)
* 'from': Import. (line 16)
-* 'FrontView': three. (line 366)
-* function declarations: Functions. (line 72)
+* 'FrontView': three. (line 370)
+* function declarations: Functions. (line 79)
* Function shading: fill. (line 99)
* function shading: fill. (line 99)
* functions: Functions. (line 6)
@@ -9060,7 +9156,8 @@ Index
* 'getreal': Files. (line 118)
* 'getstring': Files. (line 118)
* 'gettriple': Files. (line 118)
-* 'glOptions': three. (line 191)
+* git: Git. (line 6)
+* 'glOptions': three. (line 195)
* 'glOptions' <1>: Options. (line 132)
* GNU Scientific Library: Mathematical functions.
(line 48)
@@ -9075,11 +9172,11 @@ Index
* grayscale: Pens. (line 25)
* 'Grayscale': palette. (line 9)
* grid: Pens. (line 265)
-* grid <1>: graph. (line 746)
+* grid <1>: graph. (line 747)
* 'grid3': grid3. (line 6)
* 'gs': Configuring. (line 6)
* 'GSL': Compiling from UNIX source.
- (line 61)
+ (line 63)
* 'gsl': Mathematical functions.
(line 48)
* 'gsOptions': Options. (line 132)
@@ -9095,31 +9192,31 @@ Index
* 'help' <1>: Debugger. (line 30)
* 'Hermite': graph. (line 36)
* 'Hermite(splinetype splinetype': graph. (line 36)
-* 'hex': Data types. (line 297)
+* 'hex': Data types. (line 300)
* 'hex' <1>: Pens. (line 60)
-* 'hexidecimal': Data types. (line 297)
+* 'hexidecimal': Data types. (line 300)
* 'hexidecimal' <1>: Pens. (line 58)
-* hidden surface removal: three. (line 584)
+* hidden surface removal: three. (line 588)
* 'histogram': Mathematical functions.
(line 39)
* 'history': Files. (line 143)
* 'history' <1>: Interactive mode. (line 54)
* 'historylines': Interactive mode. (line 57)
* 'HookHead': draw. (line 26)
-* 'HookHead3': three. (line 543)
+* 'HookHead3': three. (line 547)
* 'Horizontal': flowchart. (line 77)
* 'hyperrefOptions': Options. (line 132)
* 'hypot': Mathematical functions.
(line 6)
* 'I': Mathematical functions.
(line 48)
-* 'iconic': three. (line 191)
+* 'iconic': three. (line 195)
* 'identity': Transforms. (line 24)
* 'identity' <1>: Mathematical functions.
(line 6)
* 'identity' <2>: Arrays. (line 290)
-* 'identity4': three. (line 418)
-* 'if': Programming. (line 8)
+* 'identity4': three. (line 422)
+* 'if': Programming. (line 26)
* 'IgnoreAspect': Frames and pictures.
(line 63)
* 'image': palette. (line 33)
@@ -9131,9 +9228,10 @@ Index
* implicit casts: Casts. (line 6)
* 'implicit linear solver': MetaPost. (line 10)
* implicit scaling: Implicit scaling. (line 6)
+* 'implicitsurface': smoothcontour3. (line 16)
* 'import': Import. (line 45)
-* 'inches': Tutorial. (line 63)
-* 'incircle': Data types. (line 119)
+* 'inches': Figure size. (line 18)
+* 'incircle': Data types. (line 120)
* 'include': Import. (line 126)
* including images: label. (line 78)
* 'increasing': math. (line 59)
@@ -9148,18 +9246,20 @@ Index
* 'input' <1>: Files. (line 12)
* 'input' <2>: Interactive mode. (line 45)
* 'input' <3>: Interactive mode. (line 49)
-* 'insert': Data types. (line 251)
+* 'insert': Data types. (line 252)
* 'insert' <1>: Arrays. (line 39)
* 'inside': Paths and guides. (line 294)
* 'inside' <1>: Paths and guides. (line 299)
* 'inside' <2>: Paths and guides. (line 305)
-* 'insphere': three. (line 506)
+* 'insphere': three. (line 510)
* 'inst': Debugger. (line 35)
* installation: Installation. (line 6)
* 'int': Data types. (line 30)
* integer division: Arithmetic & logical.
(line 6)
-* interactive mode: Interactive mode. (line 6)
+* interactive mode: Drawing in interactive mode.
+ (line 6)
+* interactive mode <1>: Interactive mode. (line 6)
* 'interior': Paths and guides. (line 290)
* international characters: unicode. (line 6)
* 'interp': Arithmetic & logical.
@@ -9167,23 +9267,23 @@ Index
* 'interpolate': interpolate. (line 6)
* 'intersect': Paths and guides. (line 195)
* 'intersect' <1>: math. (line 13)
-* 'intersect' <2>: three. (line 480)
+* 'intersect' <2>: three. (line 484)
* 'intersectionpoint': Paths and guides. (line 238)
* 'intersectionpoint' <1>: math. (line 17)
-* 'intersectionpoint' <2>: three. (line 480)
+* 'intersectionpoint' <2>: three. (line 484)
* 'intersectionpoints': Paths and guides. (line 242)
-* 'intersectionpoints' <1>: three. (line 480)
-* 'intersectionpoints' <2>: three. (line 493)
+* 'intersectionpoints' <1>: three. (line 484)
+* 'intersectionpoints' <2>: three. (line 497)
* 'intersections': Paths and guides. (line 206)
* 'intersections' <1>: Paths and guides. (line 213)
-* 'intersections' <2>: three. (line 480)
-* 'intersections' <3>: three. (line 486)
+* 'intersections' <2>: three. (line 484)
+* 'intersections' <3>: three. (line 490)
* 'InTicks': graph3. (line 35)
* 'intMax': Data types. (line 30)
* 'intMin': Data types. (line 30)
* 'inverse': Transforms. (line 16)
* 'inverse' <1>: Arrays. (line 296)
-* 'invert': three. (line 408)
+* 'invert': three. (line 412)
* 'invisible': Pens. (line 39)
* 'isnan': Data types. (line 35)
* 'i_scaled': Mathematical functions.
@@ -9202,7 +9302,7 @@ Index
* 'keepAspect' <1>: Frames and pictures.
(line 63)
* 'keepAspect' <2>: LaTeX usage. (line 50)
-* keyboard bindings:: three. (line 169)
+* keyboard bindings:: three. (line 173)
* 'keys': Arrays. (line 39)
* 'keyword': Named arguments. (line 37)
* keyword-only: Named arguments. (line 37)
@@ -9210,11 +9310,12 @@ Index
* Korean: unicode. (line 12)
* 'k_scaled': Mathematical functions.
(line 48)
+* 'label': Labels. (line 6)
* 'Label': draw. (line 97)
-* 'label': clip. (line 15)
+* 'label' <1>: label. (line 6)
* 'Label' <1>: label. (line 14)
* Label: graph. (line 330)
-* 'label' <1>: three. (line 444)
+* 'label' <2>: three. (line 448)
* 'labelpath': labelpath. (line 6)
* 'labelpath3': labelpath3. (line 6)
* labelx: graph. (line 330)
@@ -9228,29 +9329,29 @@ Index
* 'LaTeX' usage: LaTeX usage. (line 6)
* 'latexmk': LaTeX usage. (line 30)
* 'latin1': latin1. (line 6)
-* 'latitude': Data types. (line 162)
+* 'latitude': Data types. (line 163)
* 'latticeshade': fill. (line 32)
* 'layer': Drawing commands. (line 16)
* 'leastsquares': stats. (line 6)
-* 'leastsquares' <1>: graph. (line 929)
+* 'leastsquares' <1>: graph. (line 930)
* 'Left': graph. (line 269)
* 'LeftRight': graph. (line 275)
* 'LeftSide': label. (line 60)
* 'LeftTicks': graph. (line 160)
* 'LeftTicks' <1>: graph. (line 233)
-* 'LeftView': three. (line 366)
+* 'LeftView': three. (line 370)
* legend: Drawing commands. (line 31)
* 'legend': draw. (line 64)
-* 'legend' <1>: graph. (line 424)
+* 'legend' <1>: graph. (line 425)
* Legendre: Mathematical functions.
(line 48)
-* 'length': Data types. (line 64)
-* 'length' <1>: Data types. (line 143)
-* 'length' <2>: Data types. (line 237)
+* 'length': Data types. (line 65)
+* 'length' <1>: Data types. (line 144)
+* 'length' <2>: Data types. (line 238)
* 'length' <3>: Paths and guides. (line 76)
* 'length' <4>: Paths and guides. (line 373)
* 'length' <5>: Arrays. (line 39)
-* 'length' <6>: three. (line 480)
+* 'length' <6>: three. (line 484)
* 'letter': Configuring. (line 59)
* 'lexorder': math. (line 67)
* 'lexorder' <1>: math. (line 70)
@@ -9258,35 +9359,35 @@ Index
* 'libgs' <1>: Options. (line 151)
* 'libm' routines: Mathematical functions.
(line 6)
-* 'libsigsegv': Functions. (line 93)
+* 'libsigsegv': Functions. (line 100)
* 'libsigsegv' <1>: Help. (line 28)
-* 'limits': graph. (line 639)
+* 'limits': graph. (line 640)
* 'line': Arrays. (line 333)
* 'line' <1>: Arrays. (line 337)
* line mode: Arrays. (line 333)
-* 'Linear': graph. (line 690)
+* 'Linear': graph. (line 691)
* 'linecap': Pens. (line 135)
* 'linejoin': Pens. (line 145)
* 'lineskip': Pens. (line 188)
* 'linetype': Pens. (line 119)
* 'linewidth': Pens. (line 123)
-* 'locale': Data types. (line 307)
+* 'locale': Data types. (line 310)
* 'log': Mathematical functions.
(line 6)
-* 'Log': graph. (line 690)
-* log-log graph: graph. (line 724)
+* 'Log': graph. (line 691)
+* log-log graph: graph. (line 725)
* 'log10': Mathematical functions.
(line 6)
* 'log1p': Mathematical functions.
(line 6)
-* 'log2' graph: graph. (line 780)
-* logarithmic graph: graph. (line 724)
+* 'log2' graph: graph. (line 781)
+* logarithmic graph: graph. (line 725)
* logical operators: Arithmetic & logical.
(line 6)
* 'longdashdotted': Pens. (line 98)
* 'longdashed': Pens. (line 98)
-* 'longitude': Data types. (line 167)
-* loop: Programming. (line 8)
+* 'longitude': Data types. (line 168)
+* loop: Programming. (line 26)
* 'lualatex': Options. (line 146)
* 'luatex': Options. (line 146)
* 'MacOS X' binary distributions: MacOS X binary distributions.
@@ -9295,17 +9396,17 @@ Index
* 'map': Arrays. (line 131)
* 'Margin': draw. (line 42)
* 'Margin' <1>: draw. (line 42)
-* 'Margin3': three. (line 559)
-* 'Margin3' <1>: three. (line 559)
+* 'Margin3': three. (line 563)
+* 'Margin3' <1>: three. (line 563)
* 'Margins': draw. (line 42)
-* margins: three. (line 243)
-* 'Margins3': three. (line 559)
-* 'mark': graph. (line 480)
+* margins: three. (line 247)
+* 'Margins3': three. (line 563)
+* 'mark': graph. (line 481)
* 'markangle': markers. (line 35)
-* 'marker': graph. (line 480)
+* 'marker': graph. (line 481)
* 'markers': markers. (line 6)
-* 'marknodes': graph. (line 480)
-* 'markuniform': graph. (line 480)
+* 'marknodes': graph. (line 481)
+* 'markuniform': graph. (line 481)
* 'mask': Data types. (line 35)
* 'math': math. (line 6)
* mathematical functions: Mathematical functions.
@@ -9315,12 +9416,12 @@ Index
(line 7)
* 'max' <2>: Arrays. (line 215)
* 'max' <3>: Arrays. (line 225)
-* 'max' <4>: three. (line 480)
-* 'maxbound': Data types. (line 133)
-* 'maxbound' <1>: Data types. (line 203)
-* 'maxtile': three. (line 191)
+* 'max' <4>: three. (line 484)
+* 'maxbound': Data types. (line 134)
+* 'maxbound' <1>: Data types. (line 204)
+* 'maxtile': three. (line 195)
* 'maxtimes': Paths and guides. (line 233)
-* 'maxviewport': three. (line 191)
+* 'maxviewport': three. (line 195)
* 'MetaPost': MetaPost. (line 6)
* 'MetaPost ... ': Bezier curves. (line 70)
* 'MetaPost cutafter': Paths and guides. (line 267)
@@ -9329,9 +9430,9 @@ Index
* 'MetaPost whatever': MetaPost. (line 10)
* Microsoft Windows: Microsoft Windows. (line 6)
* 'MidArcArrow': draw. (line 26)
-* 'MidArcArrow3': three. (line 543)
+* 'MidArcArrow3': three. (line 547)
* 'MidArrow': draw. (line 26)
-* 'MidArrow3': three. (line 543)
+* 'MidArrow3': three. (line 547)
* 'MidPoint': label. (line 55)
* 'midpoint': Paths and guides. (line 180)
* 'min': Paths and guides. (line 275)
@@ -9339,26 +9440,27 @@ Index
(line 7)
* 'min' <2>: Arrays. (line 210)
* 'min' <3>: Arrays. (line 220)
-* 'min' <4>: three. (line 480)
-* 'minbound': Data types. (line 130)
-* 'minbound' <1>: Data types. (line 200)
+* 'min' <4>: three. (line 484)
+* 'minbound': Data types. (line 131)
+* 'minbound' <1>: Data types. (line 201)
* 'minipage': label. (line 116)
* 'mintimes': Paths and guides. (line 228)
* 'miterjoin': Pens. (line 145)
* 'miterlimit': Pens. (line 155)
* 'mktemp': Files. (line 44)
-* 'mm': Tutorial. (line 63)
+* 'mm': Figure size. (line 18)
* 'mode': Files. (line 76)
* 'mode' <1>: Files. (line 89)
* 'monotonic': graph. (line 36)
* mouse: GUI. (line 6)
-* mouse bindings: three. (line 147)
+* mouse bindings: three. (line 151)
* 'Move': Pens. (line 355)
* 'MoveQuiet': Pens. (line 361)
-* 'multisample': three. (line 138)
-* 'N': Tutorial. (line 103)
+* 'multisample': three. (line 142)
+* 'N': Labels. (line 18)
* 'name': Files. (line 89)
* named arguments: Named arguments. (line 6)
+* 'nan': Data types. (line 35)
* 'natural': graph. (line 36)
* 'new': Structures. (line 6)
* 'new' <1>: Arrays. (line 100)
@@ -9377,11 +9479,11 @@ Index
* 'NoFill' <1>: Frames and pictures.
(line 154)
* 'NoMargin': draw. (line 42)
-* 'NoMargin3': three. (line 559)
+* 'NoMargin3': three. (line 563)
* 'None': draw. (line 19)
* 'None' <1>: draw. (line 26)
* 'none': Files. (line 61)
-* 'normal': three. (line 466)
+* 'normal': three. (line 470)
* 'nosafe': Options. (line 170)
* 'NOT': Arithmetic & logical.
(line 63)
@@ -9394,13 +9496,13 @@ Index
(line 140)
* 'nullpen' <2>: Frames and pictures.
(line 149)
-* 'NURBS': three. (line 342)
-* 'O': three. (line 255)
+* 'NURBS': three. (line 346)
+* 'O': three. (line 259)
* 'obj': obj. (line 6)
-* 'oblique': three. (line 298)
-* 'obliqueX': three. (line 305)
-* 'obliqueY': three. (line 311)
-* 'obliqueZ': three. (line 298)
+* 'oblique': three. (line 302)
+* 'obliqueX': three. (line 309)
+* 'obliqueY': three. (line 315)
+* 'obliqueZ': three. (line 302)
* 'ode': ode. (line 6)
* 'offset': Pens. (line 119)
* offset: Options. (line 175)
@@ -9409,7 +9511,7 @@ Index
* 'OmitTickIntervals': graph. (line 223)
* 'opacity': Pens. (line 233)
* open: Files. (line 12)
-* 'OpenGL': three. (line 138)
+* 'OpenGL': three. (line 142)
* 'operator': User-defined operators.
(line 6)
* 'operator --': graph. (line 30)
@@ -9424,42 +9526,43 @@ Index
* options: Options. (line 6)
* 'OR': Arithmetic & logical.
(line 63)
-* 'orient': Data types. (line 107)
-* 'orient' <1>: three. (line 497)
+* 'orient': Data types. (line 108)
+* 'orient' <1>: three. (line 501)
* 'orientation': Frames and pictures.
(line 104)
-* 'orthographic': three. (line 315)
-* 'outformat': three. (line 138)
+* 'orthographic': three. (line 319)
+* 'outformat': three. (line 142)
* 'outprefix': Frames and pictures.
(line 91)
* 'output': Files. (line 36)
* 'output' <1>: Options. (line 146)
* 'OutTicks': graph3. (line 35)
-* overloading functions: Functions. (line 48)
+* overloading functions: Functions. (line 55)
* 'overwrite': Pens. (line 340)
* 'P': Mathematical functions.
(line 48)
* 'pack': label. (line 100)
* packing: Rest arguments. (line 30)
-* 'pair': Tutorial. (line 51)
-* 'pair' <1>: Data types. (line 45)
+* 'pair': Figure size. (line 6)
+* 'pair' <1>: Data types. (line 46)
* 'pairs': Arrays. (line 230)
* 'paperheight': Configuring. (line 59)
* 'papertype': Configuring. (line 59)
* 'paperwidth': Configuring. (line 59)
* 'parallelogram': flowchart. (line 47)
* parametric surface: graph3. (line 99)
-* parametrized curve: graph. (line 639)
+* parametrized curve: graph. (line 640)
* 'partialsum': math. (line 53)
* 'partialsum' <1>: math. (line 56)
* patch-dependent colors: three. (line 79)
-* 'path': Paths and guides. (line 7)
-* 'path' <1>: three. (line 42)
-* 'path' <2>: flowchart. (line 77)
-* path markers: graph. (line 480)
+* 'path': Paths. (line 6)
+* 'path' <1>: Paths and guides. (line 7)
+* 'path' <2>: three. (line 42)
+* 'path' <3>: flowchart. (line 77)
+* path markers: graph. (line 481)
* 'path3': three. (line 6)
* 'path3' <1>: three. (line 42)
-* 'path[]': Tutorial. (line 130)
+* 'path[]': Paths. (line 23)
* patterns: Pens. (line 251)
* 'patterns': patterns. (line 6)
* 'PDF': Options. (line 146)
@@ -9469,50 +9572,50 @@ Index
* 'pdfviewerOptions': Options. (line 132)
* 'pen': Pens. (line 6)
* 'PenMargin': draw. (line 42)
-* 'PenMargin2': three. (line 559)
-* 'PenMargin3': three. (line 559)
+* 'PenMargin2': three. (line 563)
+* 'PenMargin3': three. (line 563)
* 'PenMargins': draw. (line 42)
-* 'PenMargins2': three. (line 559)
-* 'PenMargins3': three. (line 559)
+* 'PenMargins2': three. (line 563)
+* 'PenMargins3': three. (line 563)
* 'periodic': graph. (line 36)
* 'perl': LaTeX usage. (line 30)
* 'perpendicular': geometry. (line 6)
-* 'perspective': three. (line 342)
+* 'perspective': three. (line 346)
* 'picture': Frames and pictures.
(line 39)
* picture alignment: Frames and pictures.
- (line 226)
+ (line 228)
* 'piecewisestraight': Paths and guides. (line 92)
-* 'pixel': three. (line 566)
+* 'pixel': three. (line 570)
* 'Pl': Mathematical functions.
(line 48)
* 'plain': plain. (line 6)
-* 'planar': three. (line 87)
-* 'plane': three. (line 281)
-* 'planeproject': three. (line 463)
+* 'planar': three. (line 88)
+* 'plane': three. (line 285)
+* 'planeproject': three. (line 467)
* 'point': Paths and guides. (line 95)
* 'point' <1>: Paths and guides. (line 379)
-* 'point' <2>: three. (line 480)
-* 'polar': Data types. (line 147)
+* 'point' <2>: three. (line 484)
+* 'polar': Data types. (line 148)
* 'polargraph': graph. (line 88)
-* 'polygon': graph. (line 480)
+* 'polygon': graph. (line 481)
* 'pop': Arrays. (line 39)
* 'Portrait': Frames and pictures.
(line 104)
* 'postcontrol': Paths and guides. (line 146)
-* 'postcontrol' <1>: three. (line 480)
+* 'postcontrol' <1>: three. (line 484)
* postfix operators: Self & prefix operators.
(line 19)
* 'postscript': Frames and pictures.
- (line 292)
+ (line 294)
* 'PostScript fonts': Pens. (line 220)
-* 'PostScript' subpath: Tutorial. (line 130)
+* 'PostScript' subpath: Paths. (line 23)
* 'pow10': Mathematical functions.
(line 6)
-* 'prc': three. (line 212)
+* 'prc': three. (line 216)
* 'precision': Files. (line 93)
* 'precontrol': Paths and guides. (line 139)
-* 'precontrol' <1>: three. (line 480)
+* 'precontrol' <1>: three. (line 484)
* prefix operators: Self & prefix operators.
(line 6)
* 'private': Structures. (line 6)
@@ -9522,15 +9625,16 @@ Index
* 'psview': Microsoft Windows. (line 16)
* 'psviewer': Configuring. (line 6)
* 'psviewerOptions': Options. (line 132)
-* 'pt': Tutorial. (line 63)
+* 'pt': Figure size. (line 18)
* 'public': Structures. (line 6)
* 'push': Arrays. (line 39)
* 'Python' usage: Interactive mode. (line 72)
* 'quadraticroots': Arrays. (line 299)
* 'quadraticroots' <1>: Arrays. (line 304)
* 'quarticroots': math. (line 22)
-* quick reference: Description. (line 77)
-* quit: Tutorial. (line 37)
+* quick reference: Description. (line 81)
+* quit: Drawing in interactive mode.
+ (line 11)
* 'quit': Interactive mode. (line 54)
* 'quit' <1>: Debugger. (line 53)
* 'quote': Import. (line 115)
@@ -9544,13 +9648,13 @@ Index
* 'radians': Mathematical functions.
(line 17)
* 'radius': Paths and guides. (line 135)
-* 'radius' <1>: three. (line 480)
+* 'radius' <1>: three. (line 484)
* 'Rainbow': palette. (line 12)
* 'rand': Mathematical functions.
(line 39)
* 'randMax': Mathematical functions.
(line 39)
-* 'read': Arrays. (line 374)
+* 'read': Arrays. (line 373)
* reading: Files. (line 12)
* reading string arrays: Arrays. (line 343)
* 'readline': Files. (line 135)
@@ -9559,10 +9663,10 @@ Index
* 'realEpsilon': Data types. (line 35)
* 'realMax': Data types. (line 35)
* 'realMin': Data types. (line 35)
-* 'realmult': Data types. (line 99)
+* 'realmult': Data types. (line 100)
* 'rectangle': flowchart. (line 34)
-* recursion: Functions. (line 93)
-* reference: Description. (line 77)
+* recursion: Functions. (line 100)
+* reference: Description. (line 81)
* 'reflect': Transforms. (line 42)
* 'Relative': label. (line 50)
* 'Relative' <1>: label. (line 60)
@@ -9572,22 +9676,22 @@ Index
(line 6)
* 'rename': Files. (line 152)
* 'render': three. (line 46)
-* 'render' <1>: three. (line 138)
+* 'render' <1>: three. (line 142)
* 'render' <2>: Options. (line 146)
-* 'replace': Data types. (line 268)
+* 'replace': Data types. (line 269)
* 'resetdefaultpen': Pens. (line 367)
* rest arguments: Rest arguments. (line 6)
* 'restore': Frames and pictures.
- (line 286)
+ (line 288)
* 'restricted': Structures. (line 6)
* 'return': Debugger. (line 47)
-* 'reverse': Data types. (line 264)
+* 'reverse': Data types. (line 265)
* 'reverse' <1>: Paths and guides. (line 183)
* 'reverse' <2>: Paths and guides. (line 382)
* 'reverse' <3>: Arrays. (line 136)
-* 'reverse' <4>: three. (line 480)
+* 'reverse' <4>: three. (line 484)
* rewind: Files. (line 93)
-* 'rfind': Data types. (line 245)
+* 'rfind': Data types. (line 246)
* 'rgb': Pens. (line 30)
* 'rgb' <1>: Pens. (line 58)
* Riemann zeta function: Mathematical functions.
@@ -9596,9 +9700,9 @@ Index
* 'RightSide': label. (line 60)
* 'RightTicks': graph. (line 160)
* 'RightTicks' <1>: graph. (line 233)
-* 'RightView': three. (line 366)
+* 'RightView': three. (line 370)
* 'Rotate': label. (line 36)
-* 'rotate': three. (line 434)
+* 'rotate': three. (line 438)
* 'Rotate(pair z)': label. (line 39)
* 'round': Mathematical functions.
(line 26)
@@ -9610,31 +9714,31 @@ Index
(line 6)
* runtime imports: Import. (line 97)
* Russian: unicode. (line 7)
-* 'S': Tutorial. (line 103)
+* 'S': Labels. (line 18)
* 'safe': Options. (line 170)
* 'save': Frames and pictures.
- (line 283)
+ (line 285)
* 'saveline': Files. (line 135)
* 'Scale': label. (line 45)
* 'scale': Pens. (line 119)
* 'scale' <1>: Transforms. (line 34)
* 'scale' <2>: Transforms. (line 36)
-* 'scale' <3>: graph. (line 690)
-* 'Scale' <1>: graph. (line 707)
-* 'scale' <4>: three. (line 433)
-* 'scale3': three. (line 431)
-* scaled graph: graph. (line 670)
-* scientific graph: graph. (line 387)
+* 'scale' <3>: graph. (line 691)
+* 'Scale' <1>: graph. (line 708)
+* 'scale' <4>: three. (line 437)
+* 'scale3': three. (line 435)
+* scaled graph: graph. (line 671)
+* scientific graph: graph. (line 388)
* 'scroll': Files. (line 109)
* 'search': Arrays. (line 154)
* 'search' <1>: Arrays. (line 160)
* search paths: Search paths. (line 6)
* 'Seascape': Frames and pictures.
(line 110)
-* secondary axis: graph. (line 833)
-* 'secondaryX': graph. (line 833)
-* 'secondaryY': graph. (line 833)
-* 'seconds': Data types. (line 321)
+* secondary axis: graph. (line 834)
+* 'secondaryX': graph. (line 834)
+* 'secondaryY': graph. (line 834)
+* 'seconds': Data types. (line 324)
* 'seek': Files. (line 93)
* 'seekeof': Files. (line 93)
* 'segment': math. (line 50)
@@ -9651,11 +9755,11 @@ Index
* 'shift': Transforms. (line 26)
* 'shift' <1>: Transforms. (line 28)
* 'shift' <2>: Transforms. (line 44)
-* 'shift' <3>: three. (line 423)
+* 'shift' <3>: three. (line 427)
* 'shiftless': Transforms. (line 44)
* 'shipout': Frames and pictures.
(line 91)
-* 'showtarget': three. (line 315)
+* 'showtarget': three. (line 319)
* 'Si': Mathematical functions.
(line 48)
* 'signedint': Files. (line 76)
@@ -9675,21 +9779,22 @@ Index
* 'singlereal' <1>: Files. (line 89)
* 'sinh': Mathematical functions.
(line 6)
-* 'SixViews': three. (line 381)
-* 'SixViewsFR': three. (line 381)
-* 'SixViewsUS': three. (line 381)
-* 'size': Paths and guides. (line 81)
-* 'size' <1>: Paths and guides. (line 370)
-* 'size' <2>: Frames and pictures.
- (line 48)
+* 'SixViews': three. (line 385)
+* 'SixViewsFR': three. (line 385)
+* 'SixViewsUS': three. (line 385)
+* 'size': Figure size. (line 6)
+* 'size' <1>: Paths and guides. (line 81)
+* 'size' <2>: Paths and guides. (line 370)
* 'size' <3>: Frames and pictures.
+ (line 48)
+* 'size' <4>: Frames and pictures.
(line 74)
-* 'size' <4>: three. (line 480)
-* 'size' <5>: Options. (line 146)
-* 'size3': three. (line 240)
+* 'size' <5>: three. (line 484)
+* 'size' <6>: Options. (line 146)
+* 'size3': three. (line 244)
* 'Slant': label. (line 42)
* 'slant': Transforms. (line 38)
-* 'sleep': Data types. (line 367)
+* 'sleep': Data types. (line 370)
* 'slice': Paths and guides. (line 251)
* 'slice' <1>: Paths and guides. (line 262)
* slices: Slices. (line 6)
@@ -9697,6 +9802,7 @@ Index
* 'slope': math. (line 44)
* 'slope' <1>: math. (line 47)
* 'slopefield': slopefield. (line 6)
+* 'smoothcontour3': smoothcontour3. (line 6)
* 'sncndn': Mathematical functions.
(line 48)
* 'solid': Pens. (line 98)
@@ -9708,14 +9814,14 @@ Index
* 'sort' <2>: Arrays. (line 193)
* 'Spline': graph. (line 33)
* 'Spline' <1>: graph3. (line 99)
-* 'split': Data types. (line 277)
+* 'split': Data types. (line 278)
* 'sqrt': Mathematical functions.
(line 6)
* 'squarecap': Pens. (line 135)
* 'srand': Mathematical functions.
(line 39)
-* stack overflow: Functions. (line 93)
-* stack overflow <1>: Functions. (line 93)
+* stack overflow: Functions. (line 100)
+* stack overflow <1>: Functions. (line 100)
* stack overflow <2>: Help. (line 28)
* 'static': Static. (line 6)
* 'stats': stats. (line 6)
@@ -9726,76 +9832,75 @@ Index
* 'stop': Debugger. (line 10)
* 'straight': Paths and guides. (line 88)
* 'Straight': graph. (line 30)
-* 'straight' <1>: three. (line 480)
-* 'strftime': Data types. (line 312)
-* 'strftime' <1>: Data types. (line 337)
-* 'string': Data types. (line 206)
-* 'string' <1>: Data types. (line 303)
+* 'straight' <1>: three. (line 484)
+* 'strftime': Data types. (line 315)
+* 'strftime' <1>: Data types. (line 340)
+* 'string': Data types. (line 207)
+* 'string' <1>: Data types. (line 306)
* 'stroke': fill. (line 36)
-* 'stroke' <1>: fill. (line 113)
+* 'stroke' <1>: clip. (line 6)
* 'strokepath': Paths and guides. (line 309)
-* 'strptime': Data types. (line 321)
+* 'strptime': Data types. (line 324)
* 'struct': Structures. (line 6)
* structures: Structures. (line 6)
* 'subpath': Paths and guides. (line 186)
-* 'subpath' <1>: three. (line 480)
+* 'subpath' <1>: three. (line 484)
* subpictures: Frames and pictures.
(line 113)
-* 'substr': Data types. (line 260)
-* Subversion: Subversion. (line 6)
+* 'substr': Data types. (line 261)
* 'sum': Arrays. (line 205)
-* superpath: Tutorial. (line 130)
+* superpath: Paths. (line 23)
* 'Suppress': Pens. (line 347)
* 'SuppressQuiet': Pens. (line 351)
* 'surface': three. (line 46)
-* 'surface' <1>: three. (line 87)
-* 'surface' <2>: three. (line 98)
+* 'surface' <1>: three. (line 88)
+* 'surface' <2>: three. (line 102)
* 'surface' <3>: graph3. (line 99)
* 'SVG': Options. (line 151)
-* SVN: Subversion. (line 6)
-* 'system': Data types. (line 345)
+* 'system': Data types. (line 348)
* 'system' <1>: Options. (line 170)
* 'syzygy': syzygy. (line 6)
* 'tab': Files. (line 61)
-* tab completion: Tutorial. (line 37)
+* tab completion: Drawing in interactive mode.
+ (line 11)
* 'tan': Mathematical functions.
(line 6)
* 'Tan': Mathematical functions.
(line 20)
* 'tanh': Mathematical functions.
(line 6)
-* 'target': three. (line 315)
+* 'target': three. (line 319)
* 'tell': Files. (line 93)
* 'tension': Bezier curves. (line 56)
* 'tension' <1>: three. (line 6)
* 'tensionSpecifier': Paths and guides. (line 402)
* tensor product shading: fill. (line 77)
* 'tensorshade': fill. (line 77)
-* 'tessellation': three. (line 110)
+* 'tessellation': three. (line 114)
* 'tex': Frames and pictures.
- (line 300)
+ (line 302)
* 'tex' <1>: Options. (line 146)
* 'TeX fonts': Pens. (line 211)
-* TeX string: Data types. (line 206)
+* TeX string: Data types. (line 207)
* 'texcommand': Configuring. (line 65)
* 'TeXHead': draw. (line 26)
-* 'TeXHead3': three. (line 543)
+* 'TeXHead3': three. (line 547)
* 'texpath': Configuring. (line 65)
* 'texpath' <1>: label. (line 113)
* 'texpreamble': Frames and pictures.
- (line 309)
+ (line 311)
* 'texreset': Frames and pictures.
- (line 313)
+ (line 315)
* textbook graph: graph. (line 360)
* 'tgz': UNIX binary distributions.
(line 6)
-* 'thick': three. (line 121)
-* 'thin': three. (line 121)
+* 'thick': three. (line 125)
+* 'thin': three. (line 125)
* 'this': Structures. (line 6)
* 'three': three. (line 6)
-* 'ThreeViews': three. (line 381)
-* 'ThreeViewsFR': three. (line 381)
-* 'ThreeViewsUS': three. (line 381)
+* 'ThreeViews': three. (line 385)
+* 'ThreeViewsFR': three. (line 385)
+* 'ThreeViewsUS': three. (line 385)
* tick: graph. (line 330)
* 'ticks': graph. (line 160)
* 'Ticks': graph. (line 160)
@@ -9803,39 +9908,39 @@ Index
* 'tildeframe': markers. (line 24)
* tile: Pens. (line 265)
* tilings: Pens. (line 251)
-* 'time': Data types. (line 312)
-* 'time' <1>: Data types. (line 337)
+* 'time': Data types. (line 315)
+* 'time' <1>: Data types. (line 340)
* 'time' <2>: math. (line 30)
* 'time' <3>: math. (line 34)
* 'times': Paths and guides. (line 220)
* 'times' <1>: Paths and guides. (line 224)
* 'Top': graph. (line 135)
-* 'TopView': three. (line 366)
+* 'TopView': three. (line 370)
* 'trace': Debugger. (line 50)
* 'trailingzero': graph. (line 175)
* 'transform': Transforms. (line 6)
-* 'transform' <1>: three. (line 455)
-* 'transform3': three. (line 418)
+* 'transform' <1>: three. (line 459)
+* 'transform3': three. (line 422)
* transparency: Pens. (line 233)
* 'transpose': Arrays. (line 197)
* 'transpose' <1>: Arrays. (line 200)
* 'tree': tree. (line 6)
* 'trembling': trembling. (line 6)
* 'triangle': geometry. (line 6)
-* 'triangles': three. (line 110)
+* 'triangles': three. (line 114)
* 'triangulate': contour. (line 149)
* 'tridiagonal': Arrays. (line 255)
* trigonometric integrals: Mathematical functions.
(line 48)
-* 'triple': Data types. (line 136)
+* 'triple': Data types. (line 137)
* 'TrueMargin': draw. (line 42)
-* 'TrueMargin3': three. (line 559)
-* 'tube': three. (line 121)
+* 'TrueMargin3': three. (line 563)
+* 'tube': three. (line 125)
* 'tube' <1>: tube. (line 6)
* tutorial: Tutorial. (line 6)
* 'type1cm': Pens. (line 188)
-* 'typedef': Data types. (line 376)
-* 'typedef' <1>: Functions. (line 39)
+* 'typedef': Data types. (line 379)
+* 'typedef' <1>: Functions. (line 46)
* 'U3D': embed. (line 22)
* 'undefined': Paths and guides. (line 283)
* 'UnFill': draw. (line 26)
@@ -9846,86 +9951,86 @@ Index
(line 168)
* 'unicode': unicode. (line 6)
* 'uniform': Arrays. (line 145)
-* Uninstall: Uninstall. (line 6)
+* uninstall: Uninstall. (line 6)
* 'unique': math. (line 63)
-* 'unit': Data types. (line 82)
-* 'unit' <1>: Data types. (line 172)
-* 'unitbox': Tutorial. (line 151)
-* 'unitbox' <1>: three. (line 287)
-* 'unitcircle': Tutorial. (line 124)
-* 'unitcircle' <1>: Tutorial. (line 124)
-* 'unitcircle' <2>: three. (line 255)
+* 'unit': Data types. (line 83)
+* 'unit' <1>: Data types. (line 173)
+* 'unitbox': Paths. (line 44)
+* 'unitbox' <1>: three. (line 291)
+* 'unitcircle': Paths. (line 17)
+* 'unitcircle' <1>: Paths. (line 17)
+* 'unitcircle' <2>: three. (line 259)
* 'unitrand': Mathematical functions.
(line 39)
-* 'unitsize': Tutorial. (line 84)
+* 'unitsize': Figure size. (line 39)
* 'unitsize' <1>: Frames and pictures.
(line 69)
* UNIX binary distributions: UNIX binary distributions.
(line 6)
* unpacking: Rest arguments. (line 39)
* 'unravel': Import. (line 29)
-* 'up': three. (line 315)
+* 'up': three. (line 319)
* 'update': Files. (line 36)
* 'UpsideDown': Frames and pictures.
(line 104)
* 'UpsideDown' <1>: Frames and pictures.
(line 110)
* 'usepackage': Frames and pictures.
- (line 316)
-* user coordinates: Tutorial. (line 84)
+ (line 318)
+* user coordinates: Figure size. (line 39)
* user-defined operators: User-defined operators.
(line 6)
-* 'usleep': Data types. (line 370)
+* 'usleep': Data types. (line 373)
* 'value': math. (line 38)
* 'value' <1>: math. (line 41)
* 'var': Variable initializers.
(line 55)
* variable initializers: Variable initializers.
(line 6)
-* 'vectorfield': graph. (line 1004)
-* 'vectorfield' <1>: graph. (line 1043)
+* 'vectorfield': graph. (line 1005)
+* 'vectorfield' <1>: graph. (line 1044)
* 'vectorfield3': graph3. (line 157)
* vectorization: Arrays. (line 312)
* verbatim: Frames and pictures.
- (line 292)
+ (line 294)
* vertex-dependent colors: three. (line 79)
* 'Vertical': flowchart. (line 77)
* 'viewportheight': LaTeX usage. (line 50)
-* 'viewportmargin': three. (line 243)
-* 'viewportsize': three. (line 243)
+* 'viewportmargin': three. (line 247)
+* 'viewportsize': three. (line 247)
* 'viewportwidth': LaTeX usage. (line 50)
-* 'views': three. (line 212)
+* 'views': three. (line 216)
* 'vim': Editing modes. (line 32)
* virtual functions: Structures. (line 181)
* 'void': Data types. (line 10)
-* 'W': Tutorial. (line 103)
+* 'W': Labels. (line 18)
* 'whatever': Paths and guides. (line 246)
* 'Wheel': palette. (line 22)
* wheel mouse: GUI. (line 6)
-* 'while': Programming. (line 30)
+* 'while': Programming. (line 48)
* white-space string delimiter mode: Arrays. (line 343)
* 'width': LaTeX usage. (line 50)
* 'windingnumber': Paths and guides. (line 283)
* 'word': Arrays. (line 343)
* 'write': Files. (line 53)
-* 'write' <1>: Arrays. (line 383)
-* 'X': three. (line 255)
+* 'write' <1>: Arrays. (line 382)
+* 'X': three. (line 259)
* 'xasy': GUI. (line 6)
* 'xaxis3': graph3. (line 7)
* 'xdr': Files. (line 76)
* 'xelatex': Options. (line 146)
* 'XEquals': graph. (line 265)
* 'xequals': graph. (line 278)
-* 'xlimits': graph. (line 639)
+* 'xlimits': graph. (line 640)
* 'XOR': Arithmetic & logical.
(line 63)
-* 'xpart': Data types. (line 93)
-* 'xpart' <1>: Data types. (line 183)
+* 'xpart': Data types. (line 94)
+* 'xpart' <1>: Data types. (line 184)
* 'xscale': Transforms. (line 30)
-* 'xscale3': three. (line 425)
+* 'xscale3': three. (line 429)
* xtick: graph. (line 330)
-* 'XY': three. (line 440)
-* 'XY' <1>: three. (line 455)
+* 'XY': three. (line 444)
+* 'XY' <1>: three. (line 459)
* 'XYEquals': graph3. (line 21)
* 'XYZero': graph3. (line 21)
* 'XZEquals': graph3. (line 21)
@@ -9935,22 +10040,22 @@ Index
(line 6)
* 'Y' <1>: Mathematical functions.
(line 48)
-* 'Y' <2>: three. (line 255)
+* 'Y' <2>: three. (line 259)
* 'yaxis3': graph3. (line 7)
* 'YEquals': graph. (line 128)
* 'yequals': graph. (line 278)
-* 'ylimits': graph. (line 639)
-* 'ypart': Data types. (line 96)
-* 'ypart' <1>: Data types. (line 186)
+* 'ylimits': graph. (line 640)
+* 'ypart': Data types. (line 97)
+* 'ypart' <1>: Data types. (line 187)
* 'yscale': Transforms. (line 32)
-* 'yscale3': three. (line 427)
+* 'yscale3': three. (line 431)
* ytick: graph. (line 330)
-* 'YX': three. (line 455)
-* 'YZ': three. (line 455)
+* 'YX': three. (line 459)
+* 'YZ': three. (line 459)
* 'YZEquals': graph3. (line 21)
* 'YZero': graph. (line 123)
* 'YZZero': graph3. (line 21)
-* 'Z': three. (line 255)
+* 'Z': three. (line 259)
* 'zaxis3': graph3. (line 7)
* 'zerowinding': Pens. (line 160)
* 'zero_Ai': Mathematical functions.
@@ -9965,155 +10070,161 @@ Index
(line 48)
* 'zeta': Mathematical functions.
(line 48)
-* 'zpart': Data types. (line 189)
-* 'zscale3': three. (line 429)
-* 'ZX': three. (line 455)
-* 'ZX' <1>: three. (line 455)
-* 'ZY': three. (line 455)
+* 'zpart': Data types. (line 190)
+* 'zscale3': three. (line 433)
+* 'ZX': three. (line 459)
+* 'ZX' <1>: three. (line 459)
+* 'ZY': three. (line 459)

Tag Table:
Node: Top570
-Node: Description6852
-Node: Installation10467
-Node: UNIX binary distributions11502
-Node: MacOS X binary distributions12607
-Node: Microsoft Windows13161
-Ref: psview13886
-Node: Configuring14822
-Node: Search paths19057
-Node: Compiling from UNIX source19896
-Node: Editing modes22911
-Node: Subversion25339
-Node: Uninstall25787
-Node: Tutorial26137
-Ref: unitcircle30685
-Node: Drawing commands32830
-Node: draw34545
-Ref: arrows35702
-Node: fill40950
-Ref: gradient shading41996
-Node: clip46558
-Node: label47154
-Ref: Label47754
-Node: Bezier curves53598
-Node: Programming57495
-Ref: array iteration58310
-Node: Data types59415
-Ref: format69817
-Node: Paths and guides74118
-Ref: circle74372
-Ref: extension84054
-Node: Pens90833
-Ref: fillrule98340
-Ref: basealign99244
-Ref: transparency102078
-Ref: makepen105623
-Ref: overwrite106501
-Node: Transforms107715
-Node: Frames and pictures109497
-Ref: envelope110655
-Ref: size111748
-Ref: unitsize112735
-Ref: shipout113808
-Ref: filltype116159
-Ref: add119331
-Ref: add about120280
-Ref: tex123284
-Node: Files124179
-Ref: cd125166
-Ref: scroll129851
-Node: Variable initializers132769
-Node: Structures135486
-Node: Operators142964
-Node: Arithmetic & logical143278
-Node: Self & prefix operators145219
-Node: User-defined operators146008
-Node: Implicit scaling146918
-Node: Functions147481
-Ref: stack overflow150266
-Node: Default arguments150831
-Node: Named arguments151569
-Node: Rest arguments154139
-Node: Mathematical functions157260
-Node: Arrays161923
-Ref: sort168905
-Ref: tridiagonal171334
-Ref: solve172565
-Node: Slices176758
-Node: Casts180651
-Node: Import182622
-Node: Static187869
-Node: LaTeX usage190762
-Node: Base modules197242
-Node: plain199742
-Node: simplex200395
-Node: math200669
-Node: interpolate203378
-Node: geometry203657
-Node: trembling204251
-Node: stats204520
-Node: patterns204780
-Node: markers205016
-Node: tree206876
-Node: binarytree207061
-Node: drawtree207727
-Node: syzygy207928
-Node: feynman208202
-Node: roundedpath208477
-Node: animation208760
-Ref: animate209181
-Node: embed210298
-Node: slide211253
-Node: MetaPost211594
-Node: unicode212313
-Node: latin1213187
-Node: babel213556
-Node: labelpath213786
-Node: labelpath3214607
-Node: annotate214918
-Node: CAD215388
-Node: graph215699
-Ref: ticks222838
-Ref: pathmarkers236433
-Ref: marker236903
-Ref: markuniform237257
-Ref: errorbars239055
-Ref: automatic scaling243339
-Node: palette254645
-Ref: images254763
-Ref: image258937
-Ref: logimage259457
-Ref: penimage260562
-Ref: penfunctionimage260824
-Node: three261595
-Ref: PostScript3D288387
-Node: obj290126
-Node: graph3290375
-Ref: GaussianSurface295654
-Node: grid3296803
-Node: solids297587
-Node: tube298579
-Node: flowchart300813
-Node: contour305421
-Node: contour3310728
-Node: slopefield311035
-Node: ode312517
-Node: Options312774
-Ref: configuration file318914
-Ref: settings318914
-Ref: texengines320157
-Ref: convert320157
-Node: Interactive mode323480
-Ref: history325629
-Node: GUI326933
-Node: GUI installation327437
-Node: GUI usage328562
-Node: PostScript to Asymptote329470
-Node: Help330228
-Node: Debugger331918
-Node: Credits333674
-Node: Index334608
+Node: Description7279
+Node: Installation11100
+Node: UNIX binary distributions12144
+Node: MacOS X binary distributions13270
+Node: Microsoft Windows13824
+Ref: psview14549
+Node: Configuring15485
+Node: Search paths19720
+Node: Compiling from UNIX source20559
+Node: Editing modes23589
+Node: Git26010
+Node: Uninstall26409
+Node: Tutorial26751
+Node: Drawing in batch mode27639
+Node: Drawing in interactive mode28514
+Node: Figure size29546
+Node: Labels31138
+Node: Paths31965
+Ref: unitcircle32580
+Node: Drawing commands34480
+Node: draw36195
+Ref: arrows37377
+Node: fill42625
+Ref: gradient shading43671
+Node: clip48187
+Node: label48783
+Ref: Label49383
+Node: Bezier curves55227
+Node: Programming59124
+Ref: array iteration60877
+Node: Data types61044
+Ref: format71494
+Node: Paths and guides75913
+Ref: circle76167
+Ref: extension85849
+Node: Pens92628
+Ref: fillrule100135
+Ref: basealign101039
+Ref: transparency103873
+Ref: makepen107418
+Ref: overwrite108296
+Node: Transforms109510
+Node: Frames and pictures111292
+Ref: envelope112450
+Ref: size113543
+Ref: unitsize114530
+Ref: shipout115603
+Ref: filltype117954
+Ref: add121126
+Ref: add about122132
+Ref: tex125136
+Node: Files126031
+Ref: cd127018
+Ref: scroll131703
+Node: Variable initializers134621
+Node: Structures137338
+Node: Operators144835
+Node: Arithmetic & logical145149
+Node: Self & prefix operators147108
+Node: User-defined operators147897
+Node: Implicit scaling148807
+Node: Functions149370
+Ref: stack overflow152438
+Node: Default arguments152720
+Node: Named arguments153476
+Node: Rest arguments156046
+Node: Mathematical functions159167
+Node: Arrays163830
+Ref: sort170812
+Ref: tridiagonal173241
+Ref: solve174472
+Node: Slices178611
+Node: Casts182519
+Node: Import184490
+Node: Static189737
+Node: LaTeX usage192630
+Node: Base modules199135
+Node: plain201692
+Node: simplex202366
+Node: math202640
+Node: interpolate205349
+Node: geometry205628
+Node: trembling206222
+Node: stats206491
+Node: patterns206751
+Node: markers206987
+Node: tree208847
+Node: binarytree209032
+Node: drawtree209698
+Node: syzygy209899
+Node: feynman210173
+Node: roundedpath210448
+Node: animation210731
+Ref: animate211152
+Node: embed212269
+Node: slide213224
+Node: MetaPost213565
+Node: unicode214284
+Node: latin1215158
+Node: babel215527
+Node: labelpath215757
+Node: labelpath3216578
+Node: annotate216889
+Node: CAD217359
+Node: graph217670
+Ref: ticks224820
+Ref: pathmarkers238452
+Ref: marker238922
+Ref: markuniform239276
+Ref: errorbars241074
+Ref: automatic scaling245358
+Node: palette256634
+Ref: images256752
+Ref: image260926
+Ref: logimage261446
+Ref: penimage262551
+Ref: penfunctionimage262813
+Node: three263584
+Ref: PostScript3D290593
+Node: obj292332
+Node: graph3292581
+Ref: GaussianSurface297860
+Node: grid3299009
+Node: solids299793
+Node: tube300785
+Node: flowchart303019
+Node: contour307627
+Node: contour3312938
+Node: smoothcontour3313251
+Node: slopefield314970
+Node: ode316458
+Node: Options316715
+Ref: configuration file322878
+Ref: settings322878
+Ref: texengines324121
+Ref: convert324121
+Node: Interactive mode327444
+Ref: history329593
+Node: GUI330897
+Node: GUI installation331448
+Node: GUI usage332359
+Node: PostScript to Asymptote333267
+Node: Help334025
+Node: Debugger335701
+Node: Credits337457
+Node: Index338439

End Tag Table
diff --git a/Master/texmf-dist/doc/man/man1/asy.1 b/Master/texmf-dist/doc/man/man1/asy.1
index 8fd79e1fdec..e8fbc42290d 100644
--- a/Master/texmf-dist/doc/man/man1/asy.1
+++ b/Master/texmf-dist/doc/man/man1/asy.1
@@ -212,7 +212,7 @@ Prompt [> ].
Continuation prompt for multiline input [..].
.TP
.B \-q,\-quiet
-Suppress welcome message [false].
+Suppress welcome text and noninteractive stdout [false].
.TP
.B \-render n
Render 3D graphics using n pixels per bp (-1=auto) [-1].
diff --git a/Master/texmf-dist/doc/man/man1/asy.man1.pdf b/Master/texmf-dist/doc/man/man1/asy.man1.pdf
index 66048e06110..6ce442fccb7 100644
--- a/Master/texmf-dist/doc/man/man1/asy.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/asy.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/xasy.man1.pdf b/Master/texmf-dist/doc/man/man1/xasy.man1.pdf
index a5386651c2a..3087d4f3a92 100644
--- a/Master/texmf-dist/doc/man/man1/xasy.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/xasy.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/asymptote/asymptote.sty b/Master/texmf-dist/tex/latex/asymptote/asymptote.sty
index 2915f1238d1..94fdd4fe7a0 100644
--- a/Master/texmf-dist/tex/latex/asymptote/asymptote.sty
+++ b/Master/texmf-dist/tex/latex/asymptote/asymptote.sty
@@ -17,10 +17,11 @@
%% Licence: GPL2+
%%
\ProvidesPackage{asymptote}
- [2015/05/10 v1.29 Asymptote style file for LaTeX]
+ [2016/02/09 v1.30 Asymptote style file for LaTeX]
\def\Asymptote{{\tt Asymptote}}
\InputIfFileExists{\jobname.pre}{}{}
\newbox\ASYbox
+\newdimen\ASYdimen
\newcounter{asy}
\newwrite\AsyStream
\newwrite\AsyPreStream