Georg Brandl avatar Georg Brandl committed 573e4c9

Add Asymptote lexer, by Olivier Guibe.

Comments (0)

Files changed (6)

 * Laurent Gautier -- R/S lexer
 * Krzysiek Goj -- Scala lexer
 * Matt Good -- Genshi, Cheetah lexers
+* Olivier Guibe -- Asymptote lexer
 * Matthew Harrison -- SVG formatter
 * Steven Hazel -- Tcl lexer
 * Aslak Hellesøy -- Gherkin lexer
 
 - Lexers added:
 
+  * Asymptote
   * Go
   * Gherkin (Cucumber)
   * CMake

pygments/lexers/_asybuiltins.py

+# -*- coding: utf-8 -*-
+"""
+    pygments.lexers._asylist
+    ~~~~~~~~~~~~~~~~~~~~~~~~
+
+    This file contains the asy-function names and asy-variable names of Asymptote
+
+    Do not edit the ASYFUNCNAME and ASYVARNAME dict by hand.
+    TODO : perl/python script in Asymptote SVN similar to asy-list.pl but only
+    for function and variable names.
+
+
+    :copyright: 2009 by Olivier Guibé
+    :license: BSD, see LICENSE for more details.
+"""
+
+ASYFUNCNAME = set([
+    'AND',
+    'Arc',
+    'ArcArrow',
+    'ArcArrows',
+    'Arrow',
+    'Arrows',
+    'Automatic',
+    'AvantGarde',
+    'BBox',
+    'BWRainbow',
+    'BWRainbow2',
+    'Bar',
+    'Bars',
+    'BeginArcArrow',
+    'BeginArrow',
+    'BeginBar',
+    'BeginDotMargin',
+    'BeginMargin',
+    'BeginPenMargin',
+    'Blank',
+    'Bookman',
+    'Bottom',
+    'BottomTop',
+    'Bounds',
+    'Break',
+    'Broken',
+    'BrokenLog',
+    'Ceil',
+    'Circle',
+    'CircleBarIntervalMarker',
+    'Cos',
+    'Courier',
+    'CrossIntervalMarker',
+    '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',
+    'J',
+    'Label',
+    'Landscape',
+    'Left',
+    'LeftRight',
+    'LeftTicks',
+    'Legend',
+    'Linear',
+    'Link',
+    'Log',
+    'LogFormat',
+    'Margin',
+    'Margins',
+    'Mark',
+    'MidArcArrow',
+    'MidArrow',
+    'NOT',
+    'NewCenturySchoolBook',
+    'NoBox',
+    'NoMargin',
+    'NoModifier',
+    'NoTicks',
+    'NoTicks3',
+    'NoZero',
+    'NoZeroFormat',
+    'None',
+    'OR',
+    'OmitFormat',
+    'OmitTick',
+    'OutTicks',
+    'Ox',
+    'Oy',
+    'Palatino',
+    'PaletteTicks',
+    'Pen',
+    'PenMargin',
+    'PenMargins',
+    'Pentype',
+    'Portrait',
+    'RadialShade',
+    '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',
+    'Z',
+    'ZX',
+    'ZXgrid',
+    'ZYgrid',
+    'ZapfChancery',
+    'ZapfDingbats',
+    '_cputime',
+    '_draw',
+    '_eval',
+    '_image',
+    '_labelpath',
+    '_projection',
+    '_strokepath',
+    '_texpath',
+    'aCos',
+    'aSin',
+    'aTan',
+    'abort',
+    'abs',
+    'accel',
+    'acos',
+    'acosh',
+    'acot',
+    'acsc',
+    'add',
+    'addArrow',
+    'addMargins',
+    'addSaveFunction',
+    'addnode',
+    'addnodes',
+    'addpenarc',
+    'addpenline',
+    'addseg',
+    'adjust',
+    'alias',
+    'align',
+    'all',
+    'altitude',
+    'angabscissa',
+    'angle',
+    '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',
+    'asec',
+    'asin',
+    'asinh',
+    'ask',
+    'assert',
+    'asy',
+    'asycode',
+    'asydir',
+    'asyfigure',
+    'asyfilecode',
+    'asyinclude',
+    'asywrite',
+    'atan',
+    'atan2',
+    'atanh',
+    'atbreakpoint',
+    'atexit',
+    'atime',
+    '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',
+    'binput',
+    'bins',
+    'bisector',
+    'bisectorpoint',
+    'blend',
+    'boutput',
+    'box',
+    'bqe',
+    'breakpoint',
+    'breakpoints',
+    'brick',
+    'buildRestoreDefaults',
+    'buildRestoreThunk',
+    'buildcycle',
+    'bulletcolor',
+    'canonical',
+    'canonicalcartesiansystem',
+    'cartesiansystem',
+    'case1',
+    'case2',
+    'case3',
+    'cbrt',
+    'cd',
+    'ceil',
+    'center',
+    'centerToFocus',
+    'centroid',
+    'cevian',
+    'change2',
+    'changecoordsys',
+    'checkSegment',
+    'checkconditionlength',
+    'checker',
+    'checklengths',
+    'checkposition',
+    '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',
+    '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',
+    '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',
+    'drawPhoton',
+    'drawScalar',
+    'drawVertex',
+    'drawVertexBox',
+    'drawVertexBoxO',
+    'drawVertexBoxX',
+    'drawVertexO',
+    'drawVertexOX',
+    'drawVertexTriangle',
+    'drawVertexTriangleO',
+    'drawVertexX',
+    'drawarrow',
+    'drawarrow2',
+    'drawline',
+    'drawtick',
+    'duplicate',
+    'elle',
+    'ellipse',
+    'ellipsenodesnumber',
+    'embed',
+    'embed3',
+    'empty',
+    'enclose',
+    'end',
+    'endScript',
+    'endclip',
+    'endgroup',
+    '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',
+    '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',
+    'incenter',
+    'incentral',
+    'incircle',
+    'increasing',
+    'incrementposition',
+    'indexedTransform',
+    'indexedfigure',
+    'initXasyMode',
+    'initdefaults',
+    'input',
+    'inradius',
+    'insert',
+    'inside',
+    'integrate',
+    'interactive',
+    'interior',
+    'interp',
+    'interpolate',
+    'intersect',
+    'intersection',
+    'intersectionpoint',
+    'intersectionpoints',
+    'intersections',
+    'intouch',
+    'inverse',
+    'inversion',
+    'invisible',
+    'is3D',
+    'isDuplicate',
+    'isogonal',
+    'isogonalconjugate',
+    'isotomic',
+    'isotomicconjugate',
+    'isparabola',
+    'italic',
+    'item',
+    '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',
+    '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',
+    'magnetize',
+    'makeNode',
+    'makedraw',
+    'makepen',
+    'map',
+    'margin',
+    'markangle',
+    'markangleradius',
+    'markanglespace',
+    'markarc',
+    'marker',
+    'markinterval',
+    'marknodes',
+    'markrightangle',
+    'markuniform',
+    'mass',
+    'masscenter',
+    'massformat',
+    'math',
+    'max',
+    'max3',
+    'maxbezier',
+    'maxbound',
+    'maxcoords',
+    'maxlength',
+    'maxratio',
+    'maxtimes',
+    'mean',
+    'medial',
+    'median',
+    'midpoint',
+    'min',
+    'min3',
+    'minbezier',
+    'minbound',
+    'minipage',
+    'minratio',
+    'mintimes',
+    'miterlimit',
+    'momArrowPath',
+    'momarrowsize',
+    'monotonic',
+    'multifigure',
+    'nativeformat',
+    'natural',
+    'needshipout',
+    'newl',
+    'newpage',
+    'newslide',
+    'newton',
+    'newtree',
+    'nextframe',
+    'nextnormal',
+    'nextpage',
+    'nib',
+    'nodabscissa',
+    'none',
+    'norm',
+    'normalvideo',
+    'notaknot',
+    'nowarn',
+    'numberpage',
+    'nurb',
+    'object',
+    'offset',
+    'onpath',
+    'opacity',
+    'opposite',
+    'orientation',
+    'orig_circlenodesnumber',
+    'orig_circlenodesnumber1',
+    'orig_draw',
+    'orig_ellipsenodesnumber',
+    'orig_ellipsenodesnumber1',
+    'orig_hyperbolanodesnumber',
+    'orig_parabolanodesnumber',
+    'origin',
+    'orthic',
+    'orthocentercenter',
+    'outformat',
+    'outline',
+    'outprefix',
+    'output',
+    'overloadedMessage',
+    'overwrite',
+    'pack',
+    'pad',
+    'pairs',
+    'palette',
+    'parabola',
+    'parabolanodesnumber',
+    'parallel',
+    'partialsum',
+    'path',
+    'path3',
+    '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',
+    'precision',
+    'precontrol',
+    'prepend',
+    'print_random_addresses',
+    'project',
+    'projection',
+    'purge',
+    'pwhermite',
+    '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',
+    'sequence',
+    'setpens',
+    'sgn',
+    'sgnd',
+    'sharpangle',
+    'sharpdegrees',
+    'shift',
+    'shiftless',
+    'shipout',
+    'shipout3',
+    'show',
+    'side',
+    'simeq',
+    'simpson',
+    'sin',
+    'single',
+    'sinh',
+    'size',
+    'size3',
+    'skewness',
+    'skip',
+    'slant',
+    'sleep',
+    'slope',
+    'slopefield',
+    'solve',
+    'solveBVP',
+    'sort',
+    'sourceline',
+    'sphere',
+    'split',
+    'sqrt',
+    'square',
+    'srand',
+    'standardizecoordsys',
+    'startScript',
+    'startTrembling',
+    'stdev',
+    'step',
+    'stickframe',
+    'stickmarksize',
+    'stickmarkspace',
+    'stop',
+    'straight',
+    'straightness',
+    'string',
+    'stripdirectory',
+    'stripextension',
+    'stripfile',
+    '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',
+    'tremble',
+    'trembleFuzz',
+    'tremble_circlenodesnumber',
+    'tremble_circlenodesnumber1',
+    'tremble_draw',
+    'tremble_ellipsenodesnumber',
+    'tremble_ellipsenodesnumber1',
+    'tremble_hyperbolanodesnumber',
+    'tremble_marknodes',
+    'tremble_markuniform',
+    'tremble_parabolanodesnumber',
+    'triangle',
+    'triangleAbc',
+    'triangleabc',
+    'triangulate',
+    'tricoef',
+    'tridiagonal',
+    'trilinear',
+    'trim',
+    'trueMagnetize',
+    'truepoint',
+    'tube',
+    'uncycle',
+    'unfill',
+    'uniform',
+    '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',
+    'xinput',
+    'xlimits',
+    'xoutput',
+    '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'
+])
+
+ASYVARNAME = set([
+    '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',
+    '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',
+    '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',
+    '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',
+    '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',
+    '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',
+    'VERSION',
+    'Value',
+    'Vertical',
+    'Violet',
+    'VioletRed',
+    'W',
+    'WNW',
+    'WSW',
+    'Wheat',
+    'White',
+    'WhiteSmoke',
+    'WildStrawberry',
+    'XYAlign',
+    'YAlign',
+    'Yellow',
+    'YellowGreen',
+    'YellowOrange',
+    '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',
+    'beveljoin',
+    'bigvertexpen',
+    'bigvertexsize',
+    'black',
+    'blue',
+    'bm',
+    'bottom',
+    'bp',
+    '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',
+    'defaultfilename',
+    'defaultformat',
+    'defaultmassformat',
+    'defaultpen',
+    'diagnostics',
+    'differentlengths',
+    'dot',
+    'dotfactor',
+    'dotframe',
+    'dotted',
+    'doublelinepen',
+    'doublelinespacing',
+    'down',
+    'duplicateFuzz',
+    'ellipsenodesnumberfactor',
+    'eps',
+    'epsgeo',
+    'epsilon',
+    'evenodd',
+    'extendcap',
+    'fermionpen',
+    'figureborder',
+    'figuremattpen',
+    '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',
+    'magneticPoints',
+    'magneticRadius',
+    'mantissaBits',
+    'markangleradius',
+    'markangleradiusfactor',
+    'markanglespace',
+    'markanglespacefactor',
+    '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',
+    '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',
+    'textpen',
+    'ticksize',
+    'tildeframe',
+    'tildemarksizefactor',
+    'tinv',
+    'titlealign',
+    'titlepagepen',
+    'titlepageposition',
+    'titlepen',
+    'titleskip',
+    'top',
+    'trailingzero',
+    'treeLevelStep',
+    'treeMinNodeWidth',
+    'treeNodeStep',
+    'trembleAngle',
+    'trembleFrequency',
+    'trembleRandom',
+    'tremblingMode',
+    'undefined',
+    'unitcircle',
+    'unitsquare',
+    'up',
+    'urlpen',
+    'urlskip',
+    'version',
+    'vertexpen',
+    'vertexsize',
+    'viewportmargin',
+    'viewportsize',
+    'vline',
+    'white',
+    'wye',
+    'xformStack',
+    'yellow',
+    'ylabelwidth',
+    'zerotickfuzz',
+    'zerowinding'
+])

pygments/lexers/_mapping.py

     'AntlrRubyLexer': ('pygments.lexers.parsers', 'ANTLR With Ruby Target', ('antlr-ruby', 'antlr-rb'), ('*.G', '*.g'), ()),
     'ApacheConfLexer': ('pygments.lexers.text', 'ApacheConf', ('apacheconf', 'aconf', 'apache'), ('.htaccess', 'apache.conf', 'apache2.conf'), ('text/x-apacheconf',)),
     'AppleScriptLexer': ('pygments.lexers.other', 'AppleScript', ('applescript',), ('*.applescript',), ()),
+    'AsymptoteLexer': ('pygments.lexers.other', 'Asymptote', ('asy',), ('*.asy',), ('text/x-asymptote',)),
     'BBCodeLexer': ('pygments.lexers.text', 'BBCode', ('bbcode',), (), ('text/x-bbcode',)),
     'BaseMakefileLexer': ('pygments.lexers.text', 'Makefile', ('basemake',), (), ()),
     'BashLexer': ('pygments.lexers.other', 'Bash', ('bash', 'sh'), ('*.sh', '*.ebuild', '*.eclass'), ('application/x-sh', 'application/x-shellscript')),

pygments/lexers/other.py

            'MOOCodeLexer', 'SmalltalkLexer', 'TcshLexer', 'LogtalkLexer',
            'GnuplotLexer', 'PovrayLexer', 'AppleScriptLexer',
            'BashSessionLexer', 'ModelicaLexer', 'RebolLexer', 'ABAPLexer',
-           'NewspeakLexer', 'GherkinLexer']
+           'NewspeakLexer', 'GherkinLexer', 'AsymptoteLexer']
 
 line_re  = re.compile('.*?\n')
 
             (r'(\s|.)', Text),
         ]
     }
+
+
+class AsymptoteLexer(RegexLexer):
+    """
+    For `Asymptote <http://asymptote.sf.net/>`_ source code.
+
+    *New in Pygments 1.2.*
+    """
+    name = 'Asymptote'
+    aliases = ['asy', 'asymptote']
+    filenames = ['*.asy']
+    mimetypes = ['text/x-asymptote']
+
+    #: optional Comment or Whitespace
+    _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+'
+
+    tokens = {
+        'whitespace': [
+            (r'\n', Text),
+            (r'\s+', Text),
+            (r'\\\n', Text), # line continuation
+            (r'//(\n|(.|\n)*?[^\\]\n)', Comment),
+            (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment),
+        ],
+        'statements': [
+            # simple string (TeX friendly)
+            (r'"(\\\\|\\"|[^"])*"', String),
+            # C style string (with character escapes)
+            (r"'", String, 'string'),
+            (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?', Number.Float),
+            (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
+            (r'0x[0-9a-fA-F]+[Ll]?', Number.Hex),
+            (r'0[0-7]+[Ll]?', Number.Oct),
+            (r'\d+[Ll]?', Number.Integer),
+            (r'[~!%^&*+=|?:<>/-]', Operator),
+            (r'[()\[\],.]', Punctuation),
+            (r'\b(case)(.+?)(:)', bygroups(Keyword, using(this), Text)),
+            (r'(and|controls|tension|atleast|curl|if|else|while|for|do|'
+             r'return|break|continue|struct|typedef|new|access|import|'
+             r'unravel|from|include|quote|static|public|private|restricted|'
+             r'this|explicit|true|false|null|cycle|newframe|operator)\b', Keyword),
+            # Since an asy-type-name can be also an asy-function-name,
+            # in the following we test if the string "  [a-zA-Z]" follows
+            # the Keyword.Type.
+            # Of course it is not perfect !
+            (r'(Braid|FitResult|Label|Legend|TreeNode|abscissa|arc|arrowhead|'
+             r'binarytree|binarytreeNode|block|bool|bool3|bounds|bqe|circle|'
+             r'conic|coord|coordsys|cputime|ellipse|file|filltype|frame|grid3|'
+             r'guide|horner|hsv|hyperbola|indexedTransform|int|inversion|key|'
+             r'light|line|linefit|marginT|marker|mass|object|pair|parabola|path|'
+             r'path3|pen|picture|point|position|projection|real|revolution|'
+             r'scaleT|scientific|segment|side|slice|splitface|string|surface|'
+             r'tensionSpecifier|ticklocate|ticksgridT|tickvalues|transform|'
+             r'transformation|tree|triangle|trilinear|triple|vector|'
+             r'vertex|void)(?=([ ]{1,}[a-zA-Z]))', Keyword.Type),
+            # Now the asy-type-name which are not asy-function-name
+            # except yours !
+            # Perhaps useless
+            (r'(Braid|FitResult|TreeNode|abscissa|arrowhead|block|bool|bool3|'
+             r'bounds|coord|frame|guide|horner|int|linefit|marginT|pair|pen|'
+             r'picture|position|real|revolution|slice|splitface|ticksgridT|'
+             r'tickvalues|tree|triple|vertex|void)\b', Keyword.Type),
+            ('[a-zA-Z_][a-zA-Z0-9_]*:(?!:)', Name.Label),
+            ('[a-zA-Z_][a-zA-Z0-9_]*', Name),
+            ],
+        'root': [
+            include('whitespace'),
+            # functions
+            (r'((?:[a-zA-Z0-9_*\s])+?(?:\s|[*]))'    # return arguments
+             r'([a-zA-Z_][a-zA-Z0-9_]*)'             # method name
+             r'(\s*\([^;]*?\))'                      # signature
+             r'(' + _ws + r')({)',
+             bygroups(using(this), Name.Function, using(this), using(this),
+                      Punctuation),
+             'function'),
+            # function declarations
+            (r'((?:[a-zA-Z0-9_*\s])+?(?:\s|[*]))'    # return arguments
+             r'([a-zA-Z_][a-zA-Z0-9_]*)'             # method name
+             r'(\s*\([^;]*?\))'                      # signature
+             r'(' + _ws + r')(;)',
+             bygroups(using(this), Name.Function, using(this), using(this),
+                      Punctuation)),
+            ('', Text, 'statement'),
+        ],
+        'statement' : [
+            include('whitespace'),
+            include('statements'),
+            ('[{}]', Punctuation),
+            (';', Punctuation, '#pop'),
+        ],
+        'function': [
+            include('whitespace'),
+            include('statements'),
+            (';', Punctuation),
+            ('{', Punctuation, '#push'),
+            ('}', Punctuation, '#pop'),
+        ],
+        'string': [
+            (r"'", String, '#pop'),
+            (r'\\([\\abfnrtv"\'?]|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
+            (r'\n', String),
+            (r"[^\\'\n]+", String), # all other characters
+            (r'\\\n', String),
+            (r'\\n', String), # line continuation
+            (r'\\', String), # stray backslash
+            ]
+        }
+
+    def get_tokens_unprocessed(self, text):
+        from pygments.lexers._asybuiltins import ASYFUNCNAME, ASYVARNAME
+        for index, token, value in \
+               RegexLexer.get_tokens_unprocessed(self, text):
+           if token is Name and value in ASYFUNCNAME:
+               token = Name.Function
+           elif token is Name and value in ASYVARNAME:
+               token = Name.Variable
+           yield index, token, value

tests/examplefiles/test.asy

+// example file for roundedpath() in roundedpath.asy
+// written by stefan knorr
+
+
+// import needed packages
+import roundedpath;
+
+// function definition
+picture CreateKOOS(real Scale, string legend)               // draw labeled coordinate system as picture
+{
+  picture ReturnPic;
+  real S = 1.2*Scale;
+  draw(ReturnPic, ((-S,0)--(S,0)), bar = EndArrow);         // x axis
+  draw(ReturnPic, ((0,-S)--(0,S)), bar = EndArrow);         // y axis
+  label(ReturnPic, "$\varepsilon$", (S,0), SW);             // x axis label
+  label(ReturnPic, "$\sigma$", (0,S), SW);                  // y axis label
+  label(ReturnPic, legend, (0.7S, -S), NW);                 // add label 'legend' 
+  return ReturnPic;                                         // return picture
+}
+
+
+// some global definitions
+real S = 13mm;                          // universal scale factor for the whole file
+real grad = 0.25;                       // gradient for lines
+real radius = 0.04;                     // radius for the rounded path'
+real lw = 2;                            // linewidth
+pair A = (-1, -1);                      // start point for graphs
+pair E = ( 1,  1);                      // end point for graphs
+path graph;                             // local graph
+pen ActPen;                             // actual pen for each drawing
+picture T[];                            // vector of all four diagrams
+real inc = 2.8;                         // increment-offset for combining pictures
+
+//////////////////////////////////////// 1st diagram
+T[1] = CreateKOOS(S, "$T_1$");                                        // initialise T[1] as empty diagram with label $T_1$                  
+graph = A;                                                            //  # pointwise definition of current path 'graph'                    
+graph = graph -- (A.x + grad*1.6, A.y + 1.6);                         //  #                                                                 
+graph = graph -- (E.x - grad*0.4, E.y - 0.4);                         //  #                                                                 
+graph = graph -- E;                                                   //  #
+
+graph = roundedpath(graph, radius, S);                                // round edges of 'graph' using roundedpath() in roundedpath.asy      
+ActPen =  rgb(0,0,0.6) + linewidth(lw);                               // define pen for drawing in 1st diagram                              
+draw(T[1],                   graph, ActPen);                          // draw 'graph' with 'ActPen' into 'T[1]' (1st hysteresis branch)     
+draw(T[1], rotate(180,(0,0))*graph, ActPen);                          // draw rotated 'graph' (2nd hysteresis branch)                       
+
+graph = (0,0) -- (grad*0.6, 0.6) -- ( (grad*0.6, 0.6) + (0.1, 0) );   // define branch from origin to hysteresis
+graph = roundedpath(graph, radius, S);                                // round this path                        
+draw(T[1], graph, ActPen);                                            // draw this path into 'T[1]'             
+
+
+//////////////////////////////////////// 2nd diagram
+T[2] = CreateKOOS(S, "$T_2$");                                        // initialise T[2] as empty diagram with label $T_2$              
+graph = A;                                                            //  # pointwise definition of current path 'graph'                
+graph = graph -- (A.x + grad*1.3, A.y + 1.3);                         //  #                                                             
+graph = graph -- (E.x - grad*0.7 , E.y - 0.7);                        //  #                                                             
+graph = graph -- E;                                                   //  #
+                                                                                                
+graph = roundedpath(graph, radius, S);                                // round edges of 'graph' using roundedpath() in roundedpath.asy      
+ActPen =  rgb(0.2,0,0.4) + linewidth(lw);                             // define pen for drawing in 2nd diagram                              
+draw(T[2],                   graph, ActPen);                          // draw 'graph' with 'ActPen' into 'T[2]' (1st hysteresis branch)     
+draw(T[2], rotate(180,(0,0))*graph, ActPen);                          // draw rotated 'graph' (2nd hysteresis branch)                       
+
+graph = (0,0) -- (grad*0.3, 0.3) -- ( (grad*0.3, 0.3) + (0.1, 0) );   // define branch from origin to hysteresis
+graph = roundedpath(graph, radius, S);                                // round this path                        
+draw(T[2], graph, ActPen);                                            // draw this path into 'T[2]'             
+
+
+//////////////////////////////////////// 3rd diagram
+T[3] = CreateKOOS(S, "$T_3$");                                        // initialise T[3] as empty diagram with label $T_3$              
+graph = A;                                                            //  # pointwise definition of current path 'graph'                
+graph = graph -- (A.x + grad*0.7, A.y + 0.7);                         //  #                                                             
+graph = graph -- ( - grad*0.3 , - 0.3);                               //  #                                                             
+graph = graph -- (0,0);                                               //  #                                                             
+graph = graph -- (grad*0.6, 0.6);                                     //  #                                                             
+graph = graph -- (E.x - grad*0.4, E.y - 0.4);                         //  #                                                             
+graph = graph -- E;                                                   //  #                                                             
+                                                                                                                                        
+graph = roundedpath(graph, radius, S);                                // round edges of 'graph' using roundedpath() in roundedpath.asy  
+ActPen =  rgb(0.6,0,0.2) + linewidth(lw);                             // define pen for drawing in 3rd diagram                          
+draw(T[3],                   graph, ActPen);                          // draw 'graph' with 'ActPen' into 'T[3]' (1st hysteresis branch) 
+draw(T[3], rotate(180,(0,0))*graph, ActPen);                          // draw rotated 'graph' (2nd hysteresis branch)                   
+
+
+//////////////////////////////////////// 4th diagram
+T[4] = CreateKOOS(S, "$T_4$");                                        // initialise T[4] as empty diagram with label $T_4$              
+graph = A;                                                            //  # pointwise definition of current path 'graph'                
+graph = graph -- (A.x + grad*0.4, A.y + 0.4);                         //  #                                                             
+graph = graph -- ( - grad*0.6 , - 0.6);                               //  #                                                             
+graph = graph -- (0,0);                                               //  #                                                             
+graph = graph -- (grad*0.9, 0.9);                                     //  #                                                             
+graph = graph -- (E.x - grad*0.1, E.y - 0.1);                         //  #                                                             
+graph = graph -- E;                                                   //  #                                                             
+                                                                                                                                        
+graph = roundedpath(graph, radius, S);                                // round edges of 'graph' using roundedpath() in roundedpath.asy  
+ActPen =  rgb(0.6,0,0) + linewidth(lw);                               // define pen for drawing in 4th diagram                          
+draw(T[4],                   graph, ActPen);                          // draw 'graph' with 'ActPen' into 'T[4]' (1st hysteresis branch) 
+draw(T[4], rotate(180,(0,0))*graph, ActPen);                          // draw rotated 'graph' (3nd hysteresis branch)                   
+
+
+// add some labels and black dots to the first two pictures
+pair SWW = (-0.8, -0.6);
+label(T[1], "$\sigma_f$", (0, 0.6S), NE);                             // sigma_f
+draw(T[1], (0, 0.6S), linewidth(3) + black);
+label(T[2], "$\sigma_f$", (0, 0.3S), NE);                             // sigma_f
+draw(T[2], (0, 0.3S), linewidth(3) + black);
+label(T[1], "$\varepsilon_p$", (0.7S, 0), SWW);                       // epsilon_p
+draw(T[1], (0.75S, 0), linewidth(3) + black);
+label(T[2], "$\varepsilon_p$", (0.7S, 0), SWW);                       // epsilon_p
+draw(T[2], (0.75S, 0), linewidth(3) + black);
+
+
+// add all pictures T[1...4] to the current one
+add(T[1],(0,0));
+add(T[2],(1*inc*S,0));
+add(T[3],(2*inc*S,0));
+add(T[4],(3*inc*S,0));
+
+
+// draw line of constant \sigma and all intersection points with the graphs in T[1...4]
+ActPen = linewidth(1) + dashed + gray(0.5);                           // pen definition
+draw((-S, 0.45*S)--((3*inc+1)*S, 0.45*S), ActPen);                    // draw backgoundline
+label("$\sigma_s$", (-S, 0.45S), W);                            // label 'sigma_s'
+
+path mark = scale(2)*unitcircle;                                  // define mark-symbol to be used for intersections
+ActPen = linewidth(1) + gray(0.5);                                    // define pen for intersection mark
+draw(shift(( 1 - grad*0.55 + 0*inc)*S, 0.45*S)*mark, ActPen);         //  # draw all intersections
+draw(shift((-1 + grad*1.45 + 0*inc)*S, 0.45*S)*mark, ActPen);         //  #
+draw(shift(( 1 - grad*0.55 + 1*inc)*S, 0.45*S)*mark, ActPen);         //  #
+draw(shift(( 1 - grad*0.55 + 2*inc)*S, 0.45*S)*mark, ActPen);         //  # 
+draw(shift((     grad*0.45 + 2*inc)*S, 0.45*S)*mark, ActPen);         //  # 
+draw(shift((     grad*0.45 + 3*inc)*S, 0.45*S)*mark, ActPen);         //  #
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.