NetProcessing : a Processing-compatible library for .NET

Hi!

If anyone is interested, I'm currently working on a Processing-compatible library for .NET (C#, etc.).

I am calling it NetProcessing for now, but will probably change the name.

It won't be a complete Processing substitute because I don't plan to do the 3D part (I wouldn't use it) nor most of what is doable more naturally with .NET/C# or conflict with it (for example boolean or ArrayList). I also changed the naming convention to use .NET style (Setup()/Draw()/Rect() instead of setup()/draw()/rect() for example) and I had to change a few other things. But my plan is to eventually write a NetProcessing <--> Processing converter to take care of most of the remaining differences.

NetProcessing uses a complete working console window alongside the graphical window, to do console input-output if needed. The console window can also be hidden.

For now, the inline documentation is only in French, but I plan of doing an English version (it is very useful with Intellisense in Visual Studio). I also generated an online documentation with Doxygen.

I have almost finished with version 1.0. I'll be announcing more in a few days, for now, I just wanted to get initial feedback or impressions. Is anyone interested? :-)

Also, if anyone is interested on working on the English documentation, please let me know.

Here is example, the Pointillism program by Daniel Shiffman, translated to NetProcessing:

class Program: NetProcessing.Sketch
{
    static void Main(string[] args)
    {
        new Program().Start();
    }

    PImage img;
    int smallPoint, largePoint;

    public override void Setup()
    {
        Size(640, 360);
        img = LoadImage("moonwalk.jpg");
        smallPoint = 4;
        largePoint = 40;
        ImageMode(CENTER);  // Or ImageMode(Parameter.Center);
        NoStroke();
        Background(255);
    }

    public override void Draw()
    {
        int pointillize = (int)Map(MouseX, 0, Width, smallPoint, largePoint);
        int x = (int)Random(img.Width);
        int y = (int)Random(img.Height);
        Color pix = img.Get(x, y);
        Fill(pix, 128);
        Ellipse(x, y, pointillize, pointillize);
    }
}

-- Michel Michaud mm@gdzid.com http://www.michelmichaud.com

Comments

Sign In or Register to comment.