[Code] Graph Plot Functions .

Figured id post this up here in case anyone ever wants a really quick prototype to see the plotted result of a function or set of functions i condense a few classes into a single file so it can be added to a project.

The only cavet here is that you gotta add a couple using statements to the top of a new projects game1 and add the class as a base class to the game1.
That or just copy paste the below game1 over a new projects game1 as well.
I did that so i could test HLSL mock up functions as that is what i was checking the other day when i made this to test a couple.

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using System;
using System.Collections.Generic;

using float4x4 = Microsoft.Xna.Framework.Matrix;
using float4 = Microsoft.Xna.Framework.Vector4;
using float3 = Microsoft.Xna.Framework.Vector3;
using float2 = Microsoft.Xna.Framework.Vector2;

I added a spritefont as a class file (which makes it bigger) cause this is supposed to be a standalone file that i just add to a new project then set as the base class and start graphing in the create graph function.

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using System;
using System.Collections.Generic;

using float4x4 = Microsoft.Xna.Framework.Matrix;
using float4 = Microsoft.Xna.Framework.Vector4;
using float3 = Microsoft.Xna.Framework.Vector3;
using float2 = Microsoft.Xna.Framework.Vector2;

namespace GraphPlotFunctions
{
public class Game1 : BaseGame
{
    public GraphicsDeviceManager graphics;
    public SpriteBatch spriteBatch;
    public Game1()
    {
        graphics = new GraphicsDeviceManager(this);
        Content.RootDirectory = "Content";
        graphics.PreferredBackBufferWidth = 1200;
        graphics.PreferredBackBufferHeight = 700;
        graphics.SynchronizeWithVerticalRetrace = false;
        IsFixedTimeStep = false;

        Window.AllowUserResizing = true;
        this.IsMouseVisible = true;
    }

    protected override void Initialize()
    {

        base.Initialize();
    }

    protected override void LoadContent()
    {
        spriteBatch = new SpriteBatch(GraphicsDevice);
        currentFont = Content.Load<SpriteFont>("MgGenFont");
        SetGlobals(graphics, spriteBatch, currentFont);
        CreateGraph();
    }

    protected override void UnloadContent()
    {
    }

    protected override void Update(GameTime gameTime)
    {
        if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
            Exit();


        base.Update(gameTime);
    }

    protected override void Draw(GameTime gameTime)
    {
        GraphicsDevice.Clear(Color.CornflowerBlue);


        base.Draw(gameTime);
    }


    public static void CreateGraph()
    {
        Graph.Header = " Function plots of degrees over roughness for D G F  hlsl light functions.";
        Graph.graphFromTextRightOffset = 20;
        Graph.graphFromTextDownOffset = 50;
        Graph.graphWidth = 100;
        Graph.graphHeight = 100;

        int rows = 8;

        for (int row = 0; row < rows; row++)
        {
            int column = 0;

            float range0 = row * 90;
            Graph graph0 = new Graph("sin cos rot", $"range {range0} to {range0 + 360}", "pos", row, column, Color.DarkGray);
            for (int plots = 0; plots < 360; plots++)
            {
                float radians = MathHelper.ToRadians(plots + range0);
                int s = (int)(sin(radians) * 50f + 50f);
                int c = (int)(cos(radians) * 50f + 50f);

                graph0.PlotDataPoint(s, c, Color.White);

                float ratio = (float)(plots) / 360f;
                int ratioToPixelPos = (int)(Graph.graphWidth * ratio);

                graph0.PlotDataPoint(ratioToPixelPos, s, Color.Red);
                graph0.PlotDataPoint(ratioToPixelPos, c, Color.Blue);
            }

            column = 1;

            float range1 = PI/ 4 * (row + 1);
            Graph graph1 = new Graph("sin acos range over t", $"range {range1}", "sin", row, column, Color.DarkGray);
            for (int xplot = 0; xplot < Graph.graphWidth; xplot ++)
            {
                float ratio = (float)(xplot) * .01f;
                float radians = ratio * range1;

                float s = sin(radians);
                float c = cos(radians);
                graph1.PlotDataPoint(xplot, (int)(s * Graph.graphHeight/2) + Graph.graphHeight / 2, Color.White);

                graph1.PlotDataPoint(xplot, (int)(s * s *  Graph.graphHeight), Color.Red);
                graph1.PlotDataPoint(xplot, (int)(c * c * Graph.graphHeight), Color.Blue);
            }
        }

    }

}
}
1 Like

// the base class

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using System;
using System.Collections.Generic;

using float4x4 = Microsoft.Xna.Framework.Matrix;
using float4 = Microsoft.Xna.Framework.Vector4;
using float3 = Microsoft.Xna.Framework.Vector3;
using float2 = Microsoft.Xna.Framework.Vector2;

namespace Microsoft.Xna.Framework//GraphPlotFunctions
{
    public class Globals
    {
        public static GraphicsDeviceManager graphics;
        public static GraphicsDevice device { get { return graphics.GraphicsDevice; } }
        public static SpriteBatch spriteBatch;
        public static SpriteFont currentFont;
        public static Texture2D dot;
    }

    public class BaseGame : Game 
    {
        public SpriteFont defaultFont;
        public SpriteFont currentFont = Globals.currentFont;
        public BaseGame() : base()
        {
        }

        protected override void Initialize()
        {

            base.Initialize();
            //LoadContent();
            CheckToLoadDefaultFont();
        }

        public void CheckToLoadDefaultFont()
        {
            if (defaultFont == null)
                defaultFont = new HardCodedSpriteFont().LoadHardCodeSpriteFont(GraphicsDevice);
            if (Globals.currentFont == null)
                Globals.currentFont = defaultFont;
        }
        public void SetGlobals(GraphicsDeviceManager gdm, SpriteBatch spriteBatch)
        {
            Globals.graphics = gdm;
            Globals.spriteBatch = spriteBatch;
        }
        public void SetGlobals(GraphicsDeviceManager gdm, SpriteBatch spriteBatch, SpriteFont currentFont)
        {
            Globals.graphics = gdm;
            Globals.spriteBatch = spriteBatch;
            if (currentFont != null)
                Globals.currentFont = currentFont;
            else
                CheckToLoadDefaultFont(); 
            if(Globals.graphics == null)
            {
                if (gdm != null)
                    Globals.graphics = gdm;
                else
                    Globals.graphics = new GraphicsDeviceManager(this);
            }
            if (Globals.dot == null)
                Globals.dot = DrawHelper.TextureDotCreate(Color.White);
        }
        public void SetCurrentFont(SpriteFont spriteFont)
        {
            Globals.currentFont = spriteFont;
        }

        protected override void UnloadContent()
        {

        }

        protected override void Update(GameTime gameTime)
        {

            base.Update(gameTime);
        }

        protected override void Draw(GameTime gameTime)
        {
            AutoDraw();

            base.Draw(gameTime);
        }
        public void AutoDraw()
        {
            if (Graph.HasItems)
            {
                Globals.spriteBatch.Begin();

                Graph.DrawAllGraphs();

                Globals.spriteBatch.End();
            }
        }

        public static float PI = (float)Math.PI;
        public static float EPSILON = float.Epsilon;

        public static float sin(float n)
        {
            return (float)Math.Sin(n);
        }
        public static float cos(float n)
        {
            return (float)Math.Cos(n);
        }
        public static float tan(float n)
        {
            return (float)Math.Tan(n);
        }
        public static float sqrt(float n)
        {
            return (float)Math.Sqrt(n);
        }
        public static float3 normalize(float3 n)
        {
            return Vector3.Normalize(n);
        }
        public static float max(float a, float b)
        {
            if (a > b)
                return a;
            else
                return b;
        }
        public static float min(float a, float b)
        {
            if (a < b)
                return a;
            else
                return b;
        }
        public static float lerp(float a, float b, float amount)
        {
            return MathHelper.Lerp(a, b, amount);
        }
        public static float3 lerp(float3 a, float3 b, float amount)
        {
            return new float3(MathHelper.Lerp(a.X, b.X, amount), MathHelper.Lerp(a.Y, b.Y, amount), MathHelper.Lerp(a.Z, b.Z, amount));
        }
        public static float dot(float3 a, float3 b)
        {
            return Vector3.Dot(a, b);
        }
        public static float pow(float a, float b)
        {
            return (float)Math.Pow(a, b);
        }
        public static float saturate(float a)
        {
            if (a > 1)
                a = 1f;
            if (a < 0)
                a = 0f;
            return a;
        }
        public static float sign(float n)
        {
            if (n == 0)
                n = 0f;
            else
            {
                if (n > 0)
                    n = 1f;
                else
                    n = -1;
            }
            return n;
        }
        public static float average(float a, float b)
        {
            return (a + b) / 2f;
        }
        public static float average(float2 v)
        {
            return (v.X + v.Y) / 2f;
        }
        public static float average(float3 v)
        {
            return (v.X + v.Y + v.Z) / 3f;
        }
    }

    public class Graph
    {
        public static bool HasItems { get { if (graphs.Count > 0) return true; else return false; } }
        public static List<Graph> graphs = new List<Graph>();
        public static string Header = "";
        public static int graphWidth = 100;
        public static int graphHeight = 100;
        public static int graphFromTextRightOffset = 20;
        public static int graphFromTextDownOffset = 50;
        public static int titleSpacing = 10;
        public static int titleLineSpacing = 20;
        public static Vector2 spacer = new Vector2(5, 5);
        public static float downSpacingMultiplyer = .99f;
        string graphName;
        string titleDescription;
        string xAxisName = "x";
        string yAxisName = "+ mag";
        Point rowColumnIndex;
        private Vector2 namePosition;
        Vector2 graphFromTextoffset;
        Rectangle foundBoundry;
        ColorArray colorArray;
        Texture2D texture;


        public Graph(string graphName, string description, string xAxisName, int itemXRowIndex, int itemYColumnIndex, Color c)
        {
            ColorArray.flipYplots = true;
            this.graphName = graphName;
            this.titleDescription = description;
            this.xAxisName = xAxisName;
            this.rowColumnIndex = new Point(itemXRowIndex, itemYColumnIndex);
            this.graphFromTextoffset = new Vector2(graphFromTextRightOffset, graphFromTextDownOffset);
            var headerOffset = new Point(10, Globals.currentFont.LineSpacing * 2);
            this.namePosition = (GetGraphStart).ToVector2() + headerOffset.ToVector2();
            foundBoundry = new Rectangle(namePosition.ToPoint(), GetGraphTotalSize);

            this.colorArray = new ColorArray(graphWidth, graphHeight, c);
            graphs.Add(this);
        }
        public void PlotDataPoint(int x, int y, Color c)
        {
            colorArray.SetPixel(x, y, c);
        }
        public Point GetGraphStart
        {
            get { return new Point(rowColumnIndex.X, rowColumnIndex.Y) * (GetGraphTotalSize + new Point(5, 5)); }
        }
        public Point GetGraphTotalSize
        {
            get
            {
                return new Point
                    (
                    ((int)graphFromTextoffset.X + (int)graphWidth + 5), 
                    ((int)graphFromTextoffset.Y + (int)graphHeight) + Globals.currentFont.LineSpacing
                    );
            }
        }
        public void CreateGraphTexture()
        {
            this.texture = colorArray.CreateTextureFromArray(Globals.graphics.GraphicsDevice);
        }
        public static void DrawAllGraphs()
        {
            Globals.spriteBatch.DrawString(Globals.currentFont, Header, Vector2.Zero, Color.Moccasin);
            foreach (Graph g in Graph.graphs)
            {
                g.DrawGraph();
            }
        }
        public void DrawGraph()
        {
            if (texture == null)
                CreateGraphTexture();
            Globals.spriteBatch.DrawString(Globals.currentFont, graphName, namePosition, Color.Moccasin);
            var descOffset = namePosition + new Vector2(0, Globals.currentFont.LineSpacing);
            Globals.spriteBatch.DrawString(Globals.currentFont, titleDescription, descOffset, Color.Moccasin);
            var imgOffset = namePosition + graphFromTextoffset;
            Globals.spriteBatch.Draw(texture, new Rectangle(imgOffset.ToPoint(), new Point(graphWidth, graphHeight)), Color.White);
            DrawStringDownAndBottomAcross();
            DrawHelper.DrawSquareBorder(foundBoundry, 1, Color.Moccasin);
        }
        public void DrawStringDownAndBottomAcross()
        {
            var p0 = namePosition + graphFromTextoffset;
            var p1 = new Vector2(p0.X, p0.Y);
            for (int i = 0; i < yAxisName.Length; i++)
                Globals.spriteBatch.DrawString(Globals.currentFont, yAxisName[i].ToString(), p1 + new Vector2(-10, (Globals.currentFont.LineSpacing * downSpacingMultiplyer) * i + 10), Color.Moccasin, 0, Vector2.Zero, 1f, SpriteEffects.None, 0f);
            var p2 = p0 + new Vector2(graphWidth, graphHeight);
            var p3 = new Vector2(p0.X, p2.Y);
            Globals.spriteBatch.DrawString(Globals.currentFont, "   " + xAxisName, p3, Color.Moccasin);
            var p4 = p3 + new Vector2(-10, -5);
            Globals.spriteBatch.DrawString(Globals.currentFont, "0,0", p4, Color.Moccasin);
        }
    }

    public static class DrawHelper
    {
        public static void Initialize()
        {
            if (Globals.dot == null)
                Globals.dot = TextureDotCreate(Color.White);
        }

        #region drawhelpers

        public static Texture2D TextureDotCreate(Color c)
        {
            Color[] data = new Color[1];
            data[0] = c;
            return TextureFromColorArray(data, 1, 1);
        }

        public static Texture2D TextureFromColorArray(Color[] data, int width, int height)
        {
            Texture2D tex = new Texture2D(Globals.graphics.GraphicsDevice, width, height);
            tex.SetData<Color>(data);
            return tex;
        }

        public static Texture2D CreateCheckerBoard(int w, int h, Color c0, Color c1)
        {
            Color[] data = new Color[w * h];
            for (int y = 0; y < h; y++)
            {
                for (int x = 0; x < w; x++)
                {
                    int index = y * w + x;
                    Color c = c0;
                    if ((y % 2 == 0))
                    {
                        if ((x % 2 == 0))
                            c = c0;
                        else
                            c = c1;
                    }
                    else
                    {
                        if ((x % 2 == 0))
                            c = c1;
                        else
                            c = c0;
                    }
                    data[index] = c;
                }
            }
            return TextureFromColorArray(data, w, h);
        }

        public static Vector2 Lerp(Vector2 from, Vector2 to, float interpolationAmount)
        {
            return (to - from) * interpolationAmount + from;
        }

        public static void DrawSquareBorder(Rectangle r, int lineThickness, Color c)
        {
            Rectangle TLtoR = new Rectangle(r.Left, r.Top, r.Width, lineThickness);
            Rectangle BLtoR = new Rectangle(r.Left, r.Bottom - lineThickness, r.Width, lineThickness);
            Rectangle LTtoB = new Rectangle(r.Left, r.Top, lineThickness, r.Height);
            Rectangle RTtoB = new Rectangle(r.Right - lineThickness, r.Top, lineThickness, r.Height);
            Globals.spriteBatch.Draw(Globals.dot, TLtoR, c);
            Globals.spriteBatch.Draw(Globals.dot, BLtoR, c);
            Globals.spriteBatch.Draw(Globals.dot, LTtoB, c);
            Globals.spriteBatch.Draw(Globals.dot, RTtoB, c);
        }
        public static void DrawBasicLine(Vector2 s, Vector2 e, int thickness, Color linecolor)
        {
            Rectangle screendrawrect = new Rectangle((int)s.X, (int)s.Y, thickness, (int)Vector2.Distance(e, s));
            Globals.spriteBatch.Draw(Globals.dot, screendrawrect, new Rectangle(0, 0, 1, 1), linecolor, (float)Atan2Xna(e.X - s.X, e.Y - s.Y), Vector2.Zero, SpriteEffects.None, 0);
        }
        public static void DrawBasicPoint(Vector2 p, Color c)
        {
            Rectangle screendrawrect = new Rectangle((int)p.X, (int)p.Y, 2, 2);
            Globals.spriteBatch.Draw(Globals.dot, screendrawrect, new Rectangle(0, 0, 1, 1), c, 0.0f, Vector2.One, SpriteEffects.None, 0);
        }
        public static float Atan2Xna(float difx, float dify)
        {
            return (float)System.Math.Atan2(difx, dify) * -1f;
        }

        #endregion
    }

    public class ColorArray
    {
        int width, height;
        public int Width { get { return width; } }
        public int Height { get { return height; } }
        public Color[] data;
        public Texture2D texture;

        public static bool flipYplots = true;
        /// <summary>
        /// if this is set to false oob pixel sets or gets are ignored other wise a error is thrown.
        /// </summary>
        public static bool throwErrorWhenOutOfBounds = false;

        public ColorArray(int width, int height, Color defaultColor)
        {
            data = new Color[width * height];
            for (int i = 0; i < width * height; i++)
            {
                data[i] = defaultColor;
            }
            this.width = width;
            this.height = height;
        }
        public static ColorArray CreateDrawingColorArray(int width, int height, Color defaultColor)
        {
            ColorArray ca = new ColorArray(width, height, defaultColor);
            return ca;
        }
        public void SetPixel(int x, int y, Color c)
        {
            if (flipYplots)
            {
                int index = ((height - 1) - y) * width + x;
                if (index >= 0 && index < width * height)
                    data[index] = c;
                else
                {
                    if (throwErrorWhenOutOfBounds)
                        throw new IndexOutOfRangeException("ColorArray.SetPixel(  index out of range );");
                }
            }
            else
            {
                int index = y * width + x;
                if (index >= 0 && index < width * height)
                    data[index] = c;
                else
                {
                    if (throwErrorWhenOutOfBounds)
                        throw new IndexOutOfRangeException("ColorArray.SetPixel(  index out of range );");
                }
            }
        }
        public Color GetPixel(int x, int y)
        {
            if (flipYplots)
            {
                int index = ((height - 1) - y) * width + x;
                if (index >= 0 && index < width * height)
                    return data[index];
                else
                {
                    if (throwErrorWhenOutOfBounds)
                        throw new IndexOutOfRangeException("ColorArray.GetPixel(  index out of range );");
                    else
                        return Color.TransparentBlack;
                }
                
            }
            else
            {
                int index = y * width + x;
                if (index >= 0 && index < width * height)
                    return data[index];
                else
                {
                    if (throwErrorWhenOutOfBounds)
                        throw new IndexOutOfRangeException("ColorArray.GetPixel(  index out of range );");
                    else
                        return Color.TransparentBlack;
                }
            }
        }
        public Texture2D CreateTextureFromArray(GraphicsDevice device)
        {
            if (texture != null)
            {
                if (texture.IsDisposed == false)
                    texture.Dispose();
            }
            Texture2D tex = new Texture2D(device, width, height);
            tex.SetData<Color>(data);
            tex.Name = "Generated";
            texture = tex;
            return texture;
        }
    }

Continued below…

// continued

public class HardCodedSpriteFont
{

    int width = 128;
    int height = 96;
    char defaultChar = Char.Parse("*");
    int lineHeightSpaceing = 19;
    float spaceing = 0;

    public SpriteFont LoadHardCodeSpriteFont(GraphicsDevice device)
    {
        Texture2D t = DecodeToTexture(device, rleByteData, width, height);
        return new SpriteFont(t, bounds, croppings, chars, lineHeightSpaceing, spaceing, kernings, defaultChar);
    }

    private Texture2D DecodeToTexture(GraphicsDevice device, List<byte> rleByteData, int _width, int _height)
    {
        Color[] colData = DecodeDataRLE(rleByteData);
        Texture2D tex = new Texture2D(device, _width, _height);
        tex.SetData<Color>(colData);
        return tex;
    }

    private Color[] DecodeDataRLE(List<byte> rleByteData)
    {
        List<Color> colAry = new List<Color>();
        for (int i = 0; i < rleByteData.Count; i++)
        {
            var val = (rleByteData[i] & 0x7F) * 2;
            if (val > 252)
                val = 255;
            Color color = new Color();
            if (val > 0)
                color = new Color(val, val, val, val);
            if ((rleByteData[i] & 0x80) > 0)
            {
                var runlen = rleByteData[i + 1];
                for (int j = 0; j < runlen; j++)
                    colAry.Add(color);
                i += 1;
            }
            colAry.Add(color);
        }
        return colAry.ToArray();
    }


    // Item count = 95
    List<char> chars = new List<char>
    {
    (char)32,(char)33,(char)34,(char)35,(char)36,(char)37,(char)38,(char)39,(char)40,(char)41,(char)42,(char)43,(char)44,(char)45,(char)46,(char)47,(char)48,(char)49,(char)50,(char)51,(char)52,(char)53,(char)54,(char)55,(char)56,(char)57,(char)58,(char)59,(char)60,(char)61,(char)62,(char)63,(char)64,(char)65,(char)66,(char)67,(char)68,(char)69,(char)70,(char)71,(char)72,(char)73,(char)74,(char)75,(char)76,(char)77,(char)78,(char)79,(char)80,(char)81,
    (char)82,(char)83,(char)84,(char)85,(char)86,(char)87,(char)88,(char)89,(char)90,(char)91,(char)92,(char)93,(char)94,(char)95,(char)96,(char)97,(char)98,(char)99,(char)100,(char)101,(char)102,(char)103,(char)104,(char)105,(char)106,(char)107,(char)108,(char)109,(char)110,(char)111,(char)112,(char)113,(char)114,(char)115,(char)116,(char)117,(char)118,(char)119,(char)120,(char)121,(char)122,(char)123,(char)124,(char)125,(char)126
    };

    List<Rectangle> bounds = new List<Rectangle>
    {
    new Rectangle(125,84,1,1),new Rectangle(110,73,1,12),new Rectangle(63,75,4,5),new Rectangle(47,19,11,12),new Rectangle(77,1,7,15),new Rectangle(1,19,14,12),new Rectangle(107,16,11,13),new Rectangle(91,60,1,5),new Rectangle(35,1,4,16),new Rectangle(41,1,4,16),
    new Rectangle(9,86,7,7),new Rectangle(1,75,9,9),new Rectangle(30,86,3,5),new Rectangle(63,82,5,1),new Rectangle(91,67,1,2),new Rectangle(19,1,6,16),new Rectangle(82,18,8,12),new Rectangle(91,73,5,12),new Rectangle(1,61,7,12),new Rectangle(10,61,7,12),new Rectangle(74,46,8,12),
    new Rectangle(19,61,7,12),new Rectangle(84,46,8,12),new Rectangle(28,61,7,12),new Rectangle(1,47,8,12),new Rectangle(11,47,8,12),new Rectangle(71,47,1,9),new Rectangle(124,59,3,12),new Rectangle(95,32,8,9),new Rectangle(47,86,9,4),new Rectangle(23,75,8,9),new Rectangle(55,61,6,12),
    new Rectangle(92,1,13,14),new Rectangle(107,1,12,13),new Rectangle(21,47,8,12),new Rectangle(14,33,10,12),new Rectangle(26,33,10,12),new Rectangle(31,47,8,12),new Rectangle(37,61,7,12),new Rectangle(105,31,11,12),new Rectangle(38,33,10,12),new Rectangle(105,73,3,12),new Rectangle(63,61,6,12),
    new Rectangle(41,47,8,12),new Rectangle(46,61,7,12),new Rectangle(82,32,11,12),new Rectangle(50,33,10,12),new Rectangle(17,19,13,12),new Rectangle(51,47,8,12),new Rectangle(62,1,13,15),new Rectangle(118,31,9,12),new Rectangle(61,47,8,12),new Rectangle(95,45,9,12),new Rectangle(62,33,10,12),
    new Rectangle(1,33,11,12),new Rectangle(32,19,13,12),new Rectangle(94,59,8,12),new Rectangle(106,45,9,12),new Rectangle(104,59,8,12),new Rectangle(47,1,4,16),new Rectangle(27,1,6,16),new Rectangle(53,1,4,16),new Rectangle(18,86,10,6),new Rectangle(89,87,9,1),new Rectangle(58,86,3,3),
    new Rectangle(116,84,7,9),new Rectangle(92,17,8,13),new Rectangle(74,33,6,9),new Rectangle(62,18,8,13),new Rectangle(63,85,7,9),new Rectangle(121,1,5,13),new Rectangle(114,59,8,12),new Rectangle(72,18,8,13),new Rectangle(113,73,1,12),new Rectangle(86,1,4,15),new Rectangle(120,16,7,13),
    new Rectangle(102,17,1,13),new Rectangle(116,73,11,9),new Rectangle(33,75,8,9),new Rectangle(43,75,8,9),new Rectangle(71,60,8,12),new Rectangle(81,60,8,12),new Rectangle(84,74,5,9),new Rectangle(81,85,6,9),new Rectangle(98,73,5,12),new Rectangle(53,75,8,9),new Rectangle(12,75,9,9),
    new Rectangle(71,74,11,9),new Rectangle(72,85,7,9),new Rectangle(117,45,9,12),new Rectangle(1,86,6,9),new Rectangle(1,1,7,16),new Rectangle(59,1,1,16),new Rectangle(10,1,7,16),new Rectangle(35,86,10,4)
    };

    List<Rectangle> croppings = new List<Rectangle>
    {
    new Rectangle(0,34,5,19),new Rectangle(0,4,4,19),new Rectangle(0,3,6,19),new Rectangle(0,4,12,19),new Rectangle(0,4,9,19),new Rectangle(0,4,16,19),new Rectangle(0,4,11,19),new Rectangle(0,3,3,19),new Rectangle(0,3,6,19),new Rectangle(0,3,6,19),
    new Rectangle(0,3,9,19),new Rectangle(0,6,12,19),new Rectangle(0,14,5,19),new Rectangle(0,10,6,19),new Rectangle(0,14,5,19),new Rectangle(0,3,6,19),new Rectangle(0,4,9,19),new Rectangle(0,4,9,19),new Rectangle(0,4,9,19),new Rectangle(0,4,9,19),new Rectangle(0,4,9,19),
    new Rectangle(0,4,9,19),new Rectangle(0,4,9,19),new Rectangle(0,4,9,19),new Rectangle(0,4,9,19),new Rectangle(0,4,9,19),new Rectangle(0,7,6,19),new Rectangle(0,7,6,19),new Rectangle(0,6,12,19),new Rectangle(0,9,12,19),new Rectangle(0,6,12,19),new Rectangle(0,4,8,19),
    new Rectangle(0,4,15,19),new Rectangle(0,3,11,19),new Rectangle(0,4,9,19),new Rectangle(0,4,10,19),new Rectangle(0,4,11,19),new Rectangle(0,4,9,19),new Rectangle(0,4,8,19),new Rectangle(0,4,11,19),new Rectangle(0,4,11,19),new Rectangle(0,4,6,19),new Rectangle(0,4,7,19),
    new Rectangle(0,4,9,19),new Rectangle(0,4,8,19),new Rectangle(0,4,12,19),new Rectangle(0,4,11,19),new Rectangle(0,4,12,19),new Rectangle(0,4,9,19),new Rectangle(0,4,12,19),new Rectangle(0,4,10,19),new Rectangle(0,4,9,19),new Rectangle(0,4,10,19),new Rectangle(0,4,11,19),
    new Rectangle(0,4,10,19),new Rectangle(0,4,14,19),new Rectangle(0,4,9,19),new Rectangle(0,4,10,19),new Rectangle(0,4,9,19),new Rectangle(0,3,6,19),new Rectangle(0,3,6,19),new Rectangle(0,3,6,19),new Rectangle(0,4,12,19),new Rectangle(0,17,9,19),new Rectangle(0,3,9,19),
    new Rectangle(0,7,8,19),new Rectangle(0,3,9,19),new Rectangle(0,7,7,19),new Rectangle(0,3,9,19),new Rectangle(0,7,8,19),new Rectangle(0,3,5,19),new Rectangle(0,7,9,19),new Rectangle(0,3,9,19),new Rectangle(0,4,4,19),new Rectangle(0,4,5,19),new Rectangle(0,3,8,19),
    new Rectangle(0,3,4,19),new Rectangle(0,7,14,19),new Rectangle(0,7,9,19),new Rectangle(0,7,9,19),new Rectangle(0,7,9,19),new Rectangle(0,7,9,19),new Rectangle(0,7,6,19),new Rectangle(0,7,7,19),new Rectangle(0,4,5,19),new Rectangle(0,7,9,19),new Rectangle(0,7,8,19),
    new Rectangle(0,7,12,19),new Rectangle(0,7,8,19),new Rectangle(0,7,8,19),new Rectangle(0,7,7,19),new Rectangle(0,3,8,19),new Rectangle(0,3,6,19),new Rectangle(0,3,8,19),new Rectangle(0,9,12,19)
    };

    List<Vector3> kernings = new List<Vector3>
    {
    new Vector3(0,0,5),new Vector3(1,1,2),new Vector3(1,4,1),new Vector3(0,11,1),new Vector3(1,7,1),new Vector3(1,14,1),new Vector3(0,11,0),new Vector3(1,1,1),new Vector3(1,4,1),new Vector3(1,4,1),
    new Vector3(1,7,1),new Vector3(1,9,2),new Vector3(1,3,1),new Vector3(0,5,1),new Vector3(2,1,2),new Vector3(0,6,0),new Vector3(0,8,1),new Vector3(2,5,2),new Vector3(1,7,1),new Vector3(1,7,1),new Vector3(0,8,1),
    new Vector3(1,7,1),new Vector3(0,8,1),new Vector3(1,7,1),new Vector3(0,8,1),new Vector3(0,8,1),new Vector3(2,1,3),new Vector3(1,3,2),new Vector3(2,8,2),new Vector3(2,9,1),new Vector3(2,8,2),new Vector3(1,6,1),
    new Vector3(1,13,1),new Vector3(-1,12,0),new Vector3(0,8,1),new Vector3(-1,10,1),new Vector3(0,10,1),new Vector3(0,8,1),new Vector3(0,7,1),new Vector3(-1,11,1),new Vector3(0,10,1),new Vector3(1,3,2),new Vector3(0,6,1),
    new Vector3(0,8,1),new Vector3(0,7,1),new Vector3(0,11,1),new Vector3(0,10,1),new Vector3(-1,13,0),new Vector3(0,8,1),new Vector3(-1,13,0),new Vector3(0,9,1),new Vector3(0,8,1),new Vector3(0,9,1),new Vector3(0,10,1),
    new Vector3(-1,11,0),new Vector3(0,13,1),new Vector3(0,8,1),new Vector3(0,9,1),new Vector3(0,8,1),new Vector3(1,4,1),new Vector3(0,6,0),new Vector3(1,4,1),new Vector3(1,10,1),new Vector3(0,9,0),new Vector3(2,3,4),
    new Vector3(0,7,1),new Vector3(0,8,1),new Vector3(0,6,1),new Vector3(0,8,1),new Vector3(0,7,1),new Vector3(0,5,0),new Vector3(0,8,1),new Vector3(0,8,1),new Vector3(1,1,2),new Vector3(0,4,1),new Vector3(0,7,1),
    new Vector3(1,1,2),new Vector3(1,11,2),new Vector3(0,8,1),new Vector3(0,8,1),new Vector3(0,8,1),new Vector3(0,8,1),new Vector3(0,5,1),new Vector3(0,6,1),new Vector3(0,5,0),new Vector3(0,8,1),new Vector3(-1,9,0),
    new Vector3(0,11,1),new Vector3(0,7,1),new Vector3(-1,9,0),new Vector3(0,6,1),new Vector3(0,7,1),new Vector3(2,1,3),new Vector3(0,7,1),new Vector3(1,10,1)
    };

    // pixelsCompressed: 12288 bytesTallied: 49152 byteDataCount: 6203

    List<byte> rleByteData = new List<byte>
    {
    128,131,9,80,117,127,128,1,127,117,80,9,128,8,18,107,128,1,106,20,128,7,24,71,128,1,68,24,128,3,255,3,128,1,255,3,128,1,127,128,4,30,85,115,125,117,89,36,128,7,127,128,7,127,128,4,24,80,112,124,118,96,51,2,128,8,1,128,8,8,87,122,121,128,5,82,68,10,128,3,10,69,81,128,8,58,67,128,1,63,60,128,6,19,100,5,128,1,5,101,18,128,2,127,128,7,127,128,1,127,128,3,59,113,49,13,2,11,45,107,74,128,6,127,128,7,127,128,3,64,89,39,12,2,9,36,92,99,9,128,6,21,95,100,21,128,6,73,70,5,128,6,118,10,128,5,11,117,128,8,98,27,128,1,20,99,128,6,102,40,128,3,46,100,128,2,127,128,7,127,128,1,127,128,2,32,113,11,128,4,6,103,47,128,2,2,64,112,127,116,
    71,42,128,8,62,49,128,6,69,92,128,6,68,50,54,68,128,6,111,13,128,7,127,128,7,127,128,7,11,113,128,3,104,12,128,4,36,108,128,4,1,108,34,128,1,127,128,7,127,128,1,127,128,2,92,47,128,6,30,106,128,2,72,61,9,127,14,46,103,128,2,255,2,128,1,21,83,128,1,26,94,123,121,98,127,1,101,37,128,4,1,110,8,10,111,1,128,5,124,1,128,6,5,125,128,7,125,4,128,6,50,75,128,3,62,52,128,4,72,58,128,5,57,70,128,1,127,128,7,127,128,1,127,128,1,2,122,7,128,7,117,12,128,1,118,5,0,127,128,7,127,128,1,76,38,0,27,111,40,6,9,41,127,0,47,85,128,4,34,88,128,1,90,33,128,4,255,3,128,5,32,104,128,7,104,30,128,6,91,35,128,3,19,91,128,4,101,28,128,5,28,
    100,128,1,127,128,7,127,128,1,127,128,1,11,116,128,8,100,27,128,1,113,38,0,127,128,7,127,128,1,109,13,0,94,42,128,3,127,0,16,112,128,4,81,43,128,1,45,80,128,5,127,128,5,2,30,105,35,128,7,35,104,30,2,128,3,6,116,2,128,4,101,7,128,3,115,15,128,5,15,114,128,1,127,128,7,127,128,1,127,128,1,11,116,128,8,100,24,128,1,44,123,88,127,24,128,6,127,128,1,123,3,0,122,10,128,3,127,0,3,124,128,3,5,115,4,128,1,5,115,5,128,4,127,128,5,255,1,37,128,9,37,255,1,128,3,43,83,128,5,61,44,128,3,123,5,128,5,5,123,128,1,127,128,7,127,128,1,127,128,1,2,122,6,128,7,117,8,128,2,9,45,127,111,110,27,128,4,127,128,1,123,3,0,120,6,128,3,127,0,5,123,
    128,3,46,80,128,3,81,46,128,4,127,128,5,3,35,107,24,128,7,24,107,34,3,128,3,83,42,128,5,18,83,128,3,123,4,128,5,5,123,128,1,127,128,7,127,128,1,127,128,2,92,45,128,6,30,102,128,5,127,0,50,108,128,4,127,128,1,110,14,0,100,31,128,3,127,0,15,107,128,3,93,255,5,93,128,4,127,128,7,41,92,128,7,93,40,128,4,2,116,6,128,6,96,3,128,2,115,13,128,5,15,114,128,1,127,128,7,127,128,1,127,128,2,33,113,12,128,4,6,104,43,128,5,127,0,3,118,128,4,127,128,1,80,41,0,44,103,23,3,24,83,127,0,40,73,128,2,13,115,2,128,3,1,114,13,128,3,127,128,7,9,120,128,7,120,7,128,4,35,90,128,7,60,36,128,2,102,25,128,5,28,101,128,1,127,128,7,127,128,1,127,
    128,3,61,114,51,13,2,11,44,107,64,128,3,101,42,13,127,8,40,68,128,4,127,128,1,29,91,128,1,50,107,124,109,49,118,255,1,25,128,2,59,73,128,5,72,58,128,3,127,128,8,127,128,7,127,128,5,75,50,128,7,17,75,128,2,73,56,128,5,58,72,128,1,127,128,7,127,128,1,127,128,4,31,87,116,126,127,68,19,128,4,53,86,120,127,105,55,1,128,4,127,128,2,79,55,128,12,105,28,128,5,27,105,128,3,127,128,8,126,1,128,5,1,126,128,5,113,11,128,8,89,128,2,37,107,128,4,1,108,36,128,1,127,128,7,127,128,1,127,128,8,114,18,128,8,127,128,6,9,117,128,2,3,84,87,34,8,128,8,24,110,128,7,110,24,128,2,127,128,8,111,14,128,5,12,111,128,4,28,98,128,9,59,28,128,1,1,102,45,128,3,
    45,102,128,2,127,128,7,127,128,1,127,128,8,71,67,8,128,7,127,128,5,8,70,82,128,4,40,91,117,126,122,109,128,30,196,1,11,128,3,13,67,68,128,4,68,58,128,9,16,67,128,2,19,101,4,128,1,4,101,19,128,2,127,128,7,127,128,1,127,128,8,4,72,115,126,117,128,5,127,128,4,124,119,84,9,128,41,5,74,116,127,128,1,127,116,74,5,128,4,107,18,128,10,81,128,3,24,68,128,1,68,24,128,3,255,3,128,1,255,3,128,1,127,128,47,6,74,114,119,86,12,128,5,127,128,98,127,128,8,127,128,4,80,68,8,10,54,94,128,5,127,128,75,127,128,1,127,128,9,22,92,249,1,91,20,128,2,127,128,8,127,128,4,120,5,128,1,5,122,128,5,127,128,7,6,77,224,1,78,6,128,2,37,90,128,7,31,87,116,125,116,
    87,31,128,4,113,15,128,2,40,127,45,128,2,15,113,128,4,16,115,128,2,20,112,128,11,127,128,1,127,128,8,12,113,48,134,1,48,112,10,128,1,127,128,8,127,128,4,112,29,128,1,36,94,128,5,127,128,7,72,60,128,1,60,71,128,1,3,105,18,128,6,61,112,48,12,2,13,49,112,60,128,3,83,43,128,2,67,117,73,128,2,43,84,128,4,48,84,128,2,52,80,128,11,127,128,1,127,128,8,65,63,128,3,60,62,128,1,127,128,8,127,128,4,47,114,167,1,96,15,128,5,127,128,3,66,58,128,1,112,12,128,1,12,112,128,1,58,69,128,6,32,112,11,128,4,11,112,32,128,2,54,71,128,2,95,61,101,128,2,70,55,128,4,80,52,128,2,84,48,128,11,127,128,1,127,128,8,99,23,128,3,22,98,128,1,127,19,84,119,123,100,
    34,128,2,127,128,4,11,102,127,90,1,0,2,127,128,3,127,128,2,66,48,128,2,124,2,128,1,2,123,0,12,108,6,128,6,92,45,128,6,46,90,128,2,24,99,128,1,1,117,7,121,4,128,1,97,27,128,2,255,2,254,3,255,2,128,4,5,67,113,124,112,75,127,128,1,127,16,75,114,123,105,47,128,2,118,7,128,3,11,117,128,1,127,118,57,12,7,38,114,29,128,1,127,128,3,20,105,41,32,123,62,0,10,114,128,3,127,128,1,65,39,128,3,112,12,128,1,12,111,0,80,47,128,6,2,122,6,128,6,7,121,1,128,1,1,117,3,0,22,97,0,98,29,0,2,118,2,128,3,17,112,128,2,18,110,128,5,8,105,66,18,2,9,58,127,128,1,127,105,54,15,2,15,89,50,128,1,125,1,128,3,3,125,128,1,127,14,128,3,47,90,
    128,1,127,128,3,93,36,128,1,35,124,62,45,93,128,3,127,0,69,31,128,4,73,58,128,1,60,71,27,99,7,77,224,1,78,6,128,1,11,116,128,8,116,11,128,2,93,27,0,49,67,0,66,57,0,24,97,128,4,48,81,128,2,50,79,128,5,72,68,128,4,127,128,1,127,1,128,3,19,108,128,1,125,1,128,3,2,125,128,1,127,128,4,13,118,128,1,127,128,3,122,5,128,2,39,125,122,48,128,3,127,39,87,59,128,4,7,79,224,1,78,7,99,27,72,60,128,1,60,71,128,1,11,116,128,8,116,11,128,2,64,55,0,77,37,0,35,85,0,51,68,128,4,79,48,128,2,82,48,128,5,113,19,128,4,127,128,1,127,128,4,3,126,128,1,118,6,128,3,9,117,128,1,127,128,4,4,125,128,1,127,128,3,112,37,128,3,58,127,62,128,
    3,127,3,5,103,33,128,8,48,79,0,112,12,128,1,12,112,128,1,2,122,6,128,6,6,121,1,128,2,34,83,0,103,8,0,6,110,0,79,39,128,4,110,16,128,2,113,17,128,5,125,4,128,4,127,128,1,127,128,5,127,128,1,99,21,128,3,26,98,128,1,127,128,4,19,111,128,1,127,128,3,53,115,41,7,8,46,112,72,127,56,128,2,127,128,1,16,107,15,128,6,6,108,12,0,124,2,128,1,2,123,128,2,92,45,128,6,45,91,128,3,6,109,6,104,128,2,101,12,106,10,128,2,255,2,254,3,255,2,128,4,117,13,128,4,127,128,1,127,128,5,127,128,1,64,63,128,3,192,1,128,1,127,128,4,64,71,128,1,127,128,4,41,100,121,119,87,23,0,55,127,51,128,1,127,128,2,32,99,3,128,5,69,58,128,1,112,12,128,1,12,
    111,128,2,34,112,11,128,4,11,112,33,128,4,103,43,76,128,2,70,47,108,128,4,48,84,128,2,52,80,128,6,87,48,128,3,11,127,128,1,127,128,5,127,128,1,11,113,48,134,1,46,112,10,128,1,127,45,21,5,16,61,105,8,128,1,127,128,12,3,11,128,1,127,128,3,54,77,128,4,19,105,2,128,1,73,58,128,1,60,71,128,3,61,113,49,12,2,12,49,113,59,128,5,74,98,46,128,2,39,101,81,128,4,80,52,128,2,84,48,128,6,25,113,40,8,11,52,114,127,128,1,127,128,5,127,128,2,22,92,122,121,92,21,128,2,125,70,110,124,115,75,9,128,2,127,128,28,90,37,128,2,7,79,224,1,78,6,128,4,32,88,117,125,116,88,32,128,6,44,127,16,128,2,8,126,52,128,4,112,20,128,2,115,16,128,7,30,97,123,121,89,
    26,127,128,1,127,128,5,127,128,155,28,81,112,124,123,111,89,56,128,1,255,2,125,110,61,128,85,127,106,1,128,4,7,118,127,128,7,33,96,128,3,69,102,38,8,3,12,32,62,108,128,1,127,128,1,4,23,77,63,128,3,12,118,2,128,4,2,118,12,128,4,35,91,118,125,117,95,60,128,1,255,2,124,116,95,55,5,128,3,127,128,7,127,128,1,127,61,128,6,127,128,1,127,128,7,127,128,2,33,100,123,110,69,128,1,127,81,46,128,4,59,80,127,128,5,34,97,100,37,128,2,51,95,3,128,8,127,128,3,19,117,128,4,96,35,128,4,36,96,128,4,62,106,38,5,6,20,53,104,128,1,127,128,1,4,18,47,99,107,17,128,2,127,128,7,127,128,1,127,108,30,128,5,127,128,1,127,128,7,127,128,1,26,116,37,5,27,92,128,1,127,
    22,108,1,128,2,3,114,21,127,128,3,36,99,98,36,128,3,1,114,18,128,9,127,128,3,7,122,128,4,54,76,128,4,77,54,128,3,33,108,7,128,7,127,128,5,64,106,4,128,1,127,128,7,127,128,1,127,24,109,9,128,4,127,128,1,127,128,7,127,128,1,86,52,128,5,127,0,89,48,128,2,48,87,0,127,128,1,37,100,97,34,128,5,26,101,128,10,127,128,3,38,97,128,4,13,114,1,128,2,1,116,12,128,3,93,42,128,8,127,128,6,93,49,128,1,127,128,7,127,128,1,127,0,48,89,128,4,127,128,1,127,128,7,127,128,1,117,14,128,5,127,0,29,110,2,128,1,106,27,0,127,128,1,127,64,128,7,43,83,128,10,127,128,1,9,36,109,30,128,5,97,30,128,2,32,97,128,3,2,122,5,128,8,127,128,6,42,89,128,1,127,
    128,7,127,128,1,127,128,1,77,57,128,3,127,128,1,127,128,7,127,128,1,126,3,128,5,127,128,1,98,49,0,37,95,128,1,127,128,1,37,100,97,33,128,5,43,85,128,3,255,4,128,1,255,3,119,22,128,6,55,71,128,2,73,55,128,3,11,116,128,9,127,128,6,22,105,128,1,255,9,128,1,127,128,1,3,99,27,128,2,127,128,1,127,128,7,127,128,1,118,13,128,5,127,128,1,38,111,2,95,34,128,1,127,128,3,36,99,98,35,128,3,28,105,128,7,127,128,1,127,128,2,73,58,128,6,13,110,128,2,113,13,128,3,11,116,128,9,127,128,6,22,104,128,1,127,128,7,127,128,1,127,128,2,16,102,7,128,1,127,128,1,127,128,7,127,128,1,90,49,128,5,127,128,2,105,75,102,128,2,127,128,5,35,98,100,37,128,1,2,119,25,
    128,6,127,128,1,127,128,2,2,95,32,128,6,98,24,0,27,98,128,4,2,122,5,128,8,127,128,6,40,87,128,1,127,128,7,127,128,1,127,128,3,37,85,128,1,127,128,1,126,128,7,125,128,1,32,115,34,4,25,93,128,1,127,128,2,46,127,42,128,2,127,128,7,33,96,128,2,60,106,10,128,5,127,128,1,127,128,3,11,103,14,128,5,56,65,0,69,56,128,5,95,43,128,8,127,128,6,88,45,128,1,127,128,7,127,128,1,127,128,4,65,53,0,127,128,1,115,9,128,5,9,115,128,2,39,104,125,113,69,128,1,127,128,8,127,128,12,1,80,114,53,16,2,5,15,38,127,128,1,127,128,4,28,97,3,128,4,14,105,0,109,14,128,5,38,109,7,128,7,127,128,5,58,101,2,128,1,127,128,7,127,128,1,127,128,4,1,89,24,127,128,
    1,83,52,128,5,53,82,128,9,127,128,8,127,128,14,37,87,114,125,121,102,68,25,128,1,127,128,5,51,77,128,5,99,43,99,128,7,69,105,37,133,1,20,52,103,128,1,127,128,1,4,15,42,94,106,15,128,2,127,128,7,127,128,1,127,128,5,10,94,127,128,1,17,114,62,19,131,1,20,64,114,18,128,9,127,128,8,127,128,39,57,116,57,128,8,39,94,119,126,117,94,59,128,1,255,2,125,118,98,56,5,128,3,127,128,7,127,128,1,127,128,6,27,124,128,2,13,74,110,252,1,110,75,13,128,151,255,8,128,1,90,53,128,4,54,89,128,1,18,115,2,128,2,2,115,18,128,80,52,127,128,4,20,79,113,125,121,128,7,127,128,5,19,111,4,128,2,5,111,17,128,2,94,41,128,2,40,94,128,4,29,93,118,122,93,27,128,3,16,87,122,
    120,85,14,128,2,255,2,126,117,84,11,128,2,255,7,128,1,127,128,4,50,66,128,1,255,2,125,115,81,22,128,3,26,88,114,124,111,86,64,128,1,127,128,5,43,83,127,128,3,38,104,40,13,128,9,127,128,6,69,57,128,2,61,64,128,3,42,91,128,2,89,42,128,3,45,96,30,6,7,32,97,31,128,1,15,112,45,8,13,63,114,12,128,1,127,128,1,2,12,58,91,128,2,127,128,8,127,128,3,51,72,128,2,127,128,1,3,19,61,118,29,128,1,42,108,36,7,5,21,54,104,128,1,127,128,4,35,89,3,127,128,2,11,103,7,128,11,127,128,6,7,105,6,0,8,103,4,128,3,2,114,14,0,12,113,2,128,3,114,11,128,3,14,110,128,1,83,48,128,3,62,69,128,1,127,128,3,8,123,128,2,127,128,8,127,128,2,51,78,128,3,
    127,128,4,44,97,128,1,110,25,128,12,27,94,5,0,127,128,2,62,48,128,12,127,128,7,48,62,0,68,39,128,5,67,63,0,59,66,128,4,117,26,128,3,23,109,128,1,119,11,128,3,24,105,128,1,127,128,3,16,111,128,2,127,128,8,127,128,1,51,84,1,128,3,127,128,4,5,122,128,1,122,7,128,11,21,97,9,128,1,127,128,2,99,62,99,120,119,97,33,128,7,127,128,8,92,21,85,128,6,16,111,1,106,15,128,4,53,118,56,8,0,32,104,34,128,1,123,4,128,3,6,121,128,1,127,128,1,1,20,90,47,128,2,127,128,8,127,0,52,89,2,128,4,127,128,4,15,117,128,1,95,61,128,10,15,98,14,128,2,127,128,2,118,73,27,135,1,39,112,37,128,6,127,128,8,27,117,18,128,7,91,64,91,128,6,42,127,125,111,108,20,
    128,2,102,33,128,3,1,126,128,1,255,4,95,21,128,2,255,7,128,1,127,52,97,4,128,5,127,128,4,59,74,128,1,21,113,99,67,61,53,11,128,5,97,19,128,3,127,128,2,125,128,4,36,101,128,6,127,128,9,127,128,8,40,127,39,128,5,24,113,48,14,48,50,101,16,128,1,38,112,38,134,1,27,73,123,128,1,127,128,2,6,35,101,39,128,1,127,128,8,127,94,111,15,128,5,127,128,1,5,20,64,104,6,128,2,5,44,62,71,100,122,32,128,4,255,7,128,1,121,6,128,3,4,123,128,6,127,128,9,127,128,8,17,113,1,128,5,97,40,128,3,59,95,128,2,34,97,120,121,99,61,112,128,1,127,128,4,20,107,128,1,127,128,8,127,2,38,104,9,128,4,255,2,121,102,60,5,128,8,59,104,128,1,127,128,7,127,128,2,104,24,
    128,3,12,119,128,6,127,128,9,127,128,8,69,63,128,6,123,6,128,3,6,123,128,7,44,81,128,1,127,128,4,3,123,128,1,127,128,8,127,128,1,37,96,5,128,3,127,128,14,6,124,128,1,127,128,7,127,128,2,68,59,128,3,48,86,128,6,127,128,9,127,128,7,5,117,13,128,6,109,35,128,3,24,107,128,6,4,102,17,128,1,127,128,4,31,101,128,1,127,128,8,127,128,2,35,87,2,128,2,127,128,8,4,128,4,25,104,128,10,127,128,2,11,110,64,13,8,44,112,21,128,6,127,128,9,127,128,7,54,87,128,7,46,116,45,9,7,35,107,40,128,4,12,37,101,38,128,2,127,128,1,2,14,48,114,34,128,1,127,128,8,127,128,3,34,76,128,2,127,128,8,118,68,25,5,6,32,105,33,128,10,127,128,3,17,87,120,122,92,23,128,
    38,34,98,123,118,93,29,128,3,122,125,115,83,22,128,3,255,2,126,118,90,27,128,2,255,7,128,1,127,128,4,33,65,128,1,127,128,8,60,96,118,126,122,95,28,128,153,90,37,128,3,37,90,128,1,255,7,128,2,8,71,113,124,111,74,125,128,2,127,128,72,127,20,84,118,123,100,33,128,3,9,73,113,124,111,72,125,128,1,123,128,1,19,105,2,128,1,2,105,18,128,7,43,84,128,1,7,104,66,17,5,21,22,127,128,2,127,128,2,44,73,113,121,101,43,128,2,51,80,115,123,107,29,128,2,255,6,128,1,255,6,128,1,255,6,128,1,127,128,7,47,82,122,112,51,128,4,255,3,128,1,127,102,44,9,7,40,115,28,128,1,9,106,64,17,4,16,49,127,128,1,113,128,2,69,57,128,1,58,69,128,7,14,104,8,128,1,69,70,128,4,
    127,128,6,102,48,16,3,21,95,47,128,1,101,48,16,3,17,62,11,128,1,127,128,12,10,109,128,1,127,128,7,127,128,7,95,34,5,13,82,41,128,6,127,128,1,127,128,4,49,90,128,1,71,66,128,4,127,128,1,104,128,2,6,108,139,1,108,6,128,7,93,32,128,2,111,20,128,4,127,128,11,17,107,128,6,11,118,128,1,127,128,12,70,54,128,1,127,128,7,127,128,11,10,107,128,6,127,128,1,127,128,4,13,119,128,1,112,18,128,4,127,128,1,94,128,3,48,78,79,47,128,7,58,69,128,3,125,4,128,4,127,128,11,7,122,128,6,24,111,128,1,127,128,11,13,108,3,128,1,127,128,7,127,128,11,10,122,128,6,127,128,1,127,128,4,4,125,128,1,125,4,128,4,127,128,1,84,128,4,227,1,128,7,23,100,3,128,3,119,12,128,
    4,127,128,11,40,102,128,4,10,41,108,41,128,1,127,124,126,118,91,29,128,6,75,49,128,2,127,128,7,127,128,11,68,88,128,6,127,128,1,127,128,4,19,110,128,1,118,14,128,4,127,128,7,227,1,128,6,4,102,21,128,4,90,47,128,3,4,127,128,10,5,106,45,128,3,255,1,118,35,128,5,10,42,111,38,128,4,17,106,2,128,2,255,6,128,1,127,128,10,44,116,17,128,6,127,128,1,127,128,4,68,70,128,1,88,51,128,4,127,128,6,48,79,80,47,128,5,72,55,128,5,29,114,39,7,9,43,106,127,128,2,113,16,128,5,80,54,128,5,7,31,97,37,128,6,34,103,128,4,81,44,128,3,127,128,7,127,128,9,59,100,18,128,7,127,128,1,127,48,14,3,16,64,106,8,128,1,26,115,42,8,7,39,101,127,128,1,127,128,2,6,
    108,140,1,109,6,128,3,35,91,128,7,32,98,251,1,99,40,120,128,1,17,113,128,5,57,5,128,8,18,104,128,6,3,124,128,3,21,103,128,4,127,128,7,127,128,9,127,2,128,8,127,128,1,127,76,113,124,115,74,9,128,3,30,97,123,117,95,42,127,128,1,127,128,2,69,58,128,1,59,69,128,2,9,105,12,128,12,16,96,128,1,49,81,128,4,72,34,128,9,2,123,128,6,12,119,128,3,86,39,128,4,127,128,7,127,128,9,127,128,8,1,127,128,1,127,128,15,127,128,4,19,105,2,128,1,3,106,18,128,1,87,41,128,8,100,45,10,2,22,92,37,128,1,80,50,128,2,2,77,43,128,10,32,105,128,6,47,84,128,2,25,99,128,5,127,128,7,127,128,19,12,120,128,1,127,128,15,127,128,4,90,37,128,3,37,90,128,1,255,7,128,
    2,49,76,249,1,97,37,128,2,112,19,128,2,77,27,128,6,101,45,12,4,31,110,36,128,1,102,49,14,5,34,110,18,128,2,92,33,128,5,127,128,7,127,128,9,127,128,6,1,14,52,90,128,1,127,128,15,127,128,39,255,6,128,1,59,92,120,124,101,40,128,2,56,87,119,122,93,20,128,2,30,95,128,6,127,128,7,255,6,128,3,127,128,4,116,125,124,113,80,14,128,151,115,128,4,127,128,4,255,2,128,1,126,128,1,127,128,1,127,30,103,123,96,14,30,102,122,92,13,128,71,112,19,128,2,87,128,2,16,112,128,1,127,9,70,114,126,128,1,7,57,127,128,4,127,128,5,127,128,2,122,128,1,127,128,1,127,110,31,6,63,105,106,31,6,63,83,128,5,127,128,5,18,115,2,128,2,2,115,18,128,1,96,32,128,7,127,16,75,114,123,
    105,47,128,3,24,91,121,122,92,24,128,2,127,128,5,127,128,1,122,128,1,122,128,3,79,49,128,1,30,127,28,128,1,45,82,128,1,127,88,36,5,128,2,255,2,128,4,127,128,5,127,128,2,118,128,4,127,14,128,1,11,126,12,128,1,11,120,128,5,127,128,6,95,38,128,2,39,94,128,2,37,100,97,34,128,5,127,105,54,15,2,15,89,50,128,1,21,116,50,11,10,50,116,21,128,1,127,128,5,127,128,1,112,128,1,112,128,3,47,80,128,1,78,84,80,128,1,74,52,128,1,127,1,128,6,127,128,3,255,4,128,2,127,128,2,114,128,1,127,128,1,127,128,2,1,127,128,2,1,127,128,5,127,128,6,44,87,128,2,87,43,128,4,36,227,1,35,128,3,127,1,128,3,19,108,128,1,85,56,128,3,56,84,128,1,127,128,5,127,128,1,
    102,128,1,102,128,3,14,111,0,5,111,6,113,8,0,102,22,128,1,127,128,7,127,128,4,127,128,5,127,128,2,110,128,1,127,128,1,127,128,3,127,128,3,127,128,5,127,128,6,3,115,10,0,10,114,3,128,6,34,97,100,37,128,1,127,128,4,3,126,128,1,117,16,128,3,16,116,128,1,127,128,5,127,128,1,91,128,1,91,128,4,110,14,47,71,0,71,54,5,116,128,2,127,128,7,127,128,4,127,128,5,127,128,2,107,128,1,127,128,1,127,128,3,127,128,3,127,128,1,255,8,128,3,70,56,0,56,68,128,9,64,127,128,1,127,128,5,127,128,1,126,4,128,3,4,125,128,1,127,128,5,127,128,1,81,128,1,81,128,4,77,44,95,22,0,21,105,32,89,128,2,127,128,7,127,128,4,127,128,5,127,128,2,103,128,1,127,128,1,127,128,
    3,127,128,3,127,128,5,127,128,7,19,104,0,104,18,128,7,34,97,100,37,128,1,127,128,5,127,128,1,116,16,128,3,16,116,128,1,127,1,128,4,127,128,10,45,91,100,128,2,100,90,59,128,2,127,128,7,127,128,4,127,128,5,127,128,2,99,128,1,127,128,1,127,128,3,127,128,3,127,128,5,127,128,8,96,51,94,128,6,35,227,1,36,128,3,127,128,5,127,128,1,85,58,128,3,57,85,128,1,114,16,128,3,13,127,128,10,12,127,51,128,2,50,127,29,128,2,127,128,7,127,128,4,127,128,5,127,128,2,95,128,1,127,128,1,127,128,3,127,128,3,127,128,5,127,128,8,45,123,42,128,4,37,100,97,34,128,5,127,128,5,127,128,1,22,117,51,11,10,50,116,22,128,1,33,75,13,2,11,36,102,127,128,1,255,4,128,4,103,7,128,
    2,6,118,3,128,2,127,128,7,127,128,4,120,3,128,4,127,128,5,127,128,18,127,128,8,3,106,2,128,4,96,33,128,7,127,128,5,127,128,2,26,93,250,1,93,25,128,3,36,109,124,114,76,15,127,128,31,127,128,4,95,52,3,128,3,127,128,2,127,128,1,127,128,104,255,4,128,2,22,102,125,117,128,1,255,2,128,1,127,128,1,127,128,2,13,87,123,119,80,9,128,68,28,98,124,115,61,128,2,85,42,128,2,41,84,128,1,7,73,113,123,99,64,128,29,87,39,5,8,66,84,128,5,255,5,128,4,125,128,7,5,100,101,5,128,5,113,45,128,2,47,118,112,50,128,2,6,120,128,1,255,8,128,1,60,117,3,128,1,22,116,42,7,24,106,43,128,1,10,105,10,0,10,105,10,128,1,83,66,135,1,38,100,128,33,6,122,128,9,52,71,
    128,1,84,23,0,121,0,22,84,128,4,81,42,46,81,128,4,17,126,9,128,1,51,86,10,50,126,54,128,1,25,101,128,12,4,112,47,128,1,84,53,128,2,34,101,128,2,41,85,0,84,41,128,2,121,5,128,5,255,8,128,18,16,67,96,110,122,127,128,8,18,100,3,128,1,44,117,32,116,33,117,44,128,3,49,75,128,1,78,49,128,3,49,97,128,2,101,26,128,1,55,126,51,10,86,52,128,13,44,101,128,1,116,12,128,2,8,122,128,3,83,80,84,128,3,107,61,4,128,31,26,115,65,34,18,5,127,128,7,2,97,24,128,3,65,249,1,122,64,128,3,21,99,4,128,1,4,100,22,128,2,80,60,128,2,120,5,128,2,50,113,120,55,128,2,255,8,128,6,125,255,5,128,3,19,127,21,128,3,30,112,125,123,107,28,128,28,82,28,128,3,
    127,128,7,63,60,128,3,44,117,33,117,33,117,43,128,1,5,100,19,128,3,20,101,5,128,1,112,22,128,30,118,9,128,8,85,79,85,128,4,1,4,11,68,108,128,28,88,6,128,2,14,127,128,6,26,96,1,128,3,84,23,0,121,0,22,83,128,1,80,45,128,5,46,79,128,34,87,44,128,7,42,84,0,85,43,128,6,4,120,128,28,50,72,9,6,45,114,127,128,5,4,101,17,128,7,126,128,49,24,112,43,8,6,37,95,128,1,10,105,10,0,10,106,10,128,1,96,39,8,7,59,83,128,29,64,115,124,93,26,127,128,5,74,50,128,60,26,91,120,124,103,59,128,1,85,40,128,2,41,85,128,1,60,100,124,119,76,8,128,41,255,5,128,248
    };


}

}

Maybe someone else will find it useful.

Do you think it is time we created a code library somewhere ?

I thought about doing it before, but I kept thinking that anything public will soon get full of crap created by people who shouldn’t publish their code.

Then there comes the problem of who moderates the library, do we have to control access to uploading, that sort of thing.

What do you think?

I have many times suggested that the one thing that is missing on the monogame site. Is the single most useful thing that was on the xna site asside from the forum itself…

The education catalogue were all the useful simple user submitted examples went.

Regardless typing Graph or Plotting functions will probably bring this right up in the monogame search bar.