GrCis library

Library in C# language supporting computer graphics courses NPGR003 (Introduction to Computer graphics), NPGR004 (Computer graphics II), NPGR007 (Advanced 2D computer graphics), NPGR019 (Realtime Graphics on GPU) and NPGR023 (Visualization). The repository contains samples of basic algorithms of computer graphics, templates for lab assignments (tasks), some useful data sets, etc. This web page serve as a general brief manual.
Specific taks are described in more detail on relevant lab pages. See the left column for more references.

Repository is under constant development, please report any bugs, requests and complaints directly to the project coordinator.

SVN repository

The whole library resides in the Subversion repository grcis on the server.
If you have any Subversion client installed, you are able to checkout the repository:

svn checkout svn:// grcis
This command creates a local copy of the library on your disk in the grcis subdirectory.
You can later update current version of the library using command:
svn update

We recommend using a GUI SVN client, for example TortoiseSVN for Windows. It is installed in all MFF labs by default. All commands are invoked from a local menu (after pressing the right menu button in the required directory).

You don't have write permissions to the repository!

GIT repository

Primary source is the Subversion repository mentioned above. But you can use a GitHub mirror as well. URL of the GitHub repository is, address for the clone command is

Don't forget that you always need to have the complete master branch in your work-tree. One specific directory with the current task is not enough!

You don't have write permissions to the GitHub master repository but you can do local commits to your "cloned" repository. Don't forget to do "pull" or "rebase" commands from the master repo often!

Repository structure

Directories dedicated to individual tasks (assignments) are in repository trunk. Every task has an unique numeric prefix (three decimal numbers). Every directory contains one Visual Studio solution file (.sln).

A couple of other directories: common (general support functions), data (collection of useful data files), lib (external libraries in the binary form).

External libraries

Only few additional libraries are used: OpenTK for integration of OpenGL, OpenCL and OpenAL (GitHub repository).
The Cloo library is a wrapper and support for OpenCL.
The NCalc library contains small mathematical expressions evaluator.


Microsoft's Visual Studio is supported as a standard (version 2022). Advanced versions of this IDE are installed in all MFF Windows labs. For home development you can use the Visual Studio Community.

Image galleries

Interesting results in still image or video format are placed on the image gallery. If you are interested in a specific image, contact me or try to find an author directly.

C# development in Linux and iOS

Original author of this manual is Michal Wirth.

Visual Studio projects are directly supported by the open-source .NET implementation Mono. It is likely you will find it in your favorite Linux distribution.

MonoDevelop is recommended as GUI IDE. You should open original (Microsoft's) solution files without any problems. In Debian (Ubuntu) there is package named "monodevelop".

If you are not willing to use an IDE, there is another option: command-line utility xbuild (2.6.7 was reported as fully functional, Debian package name is "xbuild"). You simply pass a file-name of required .sln file and the whole project will be compiled. If there were no errors, binaries will be placed in the ./bin/Debug/ directory.
Running of the binary from a command-line: use the Mono runtime (mono <path-to-the-binary>).

Another instruction page: Running Windows Forms on Linux with Mono.

Future of GUI in .NET

Microsoft released the 1st version of a multi-platform GUI for .NET application earlier this year. The name is .NET MAUI.

Unfornutely it is not stable enough yet (September 2022) and we have to wait at least a year for more mature releases (see this article). So we are going to use .NET framework together with WinForms, a combination usable in Linux/OSX (Mono + MonoDevelop).

Copyright (C) 2010-2022 J.Pelikán, last change: 2022-10-03 00:56:53 +0200 (Mon, 03 Oct 2022)