Create Your first Visualization Module with ILNumerics®
You may ...
- Use one of the example projects and start making changes. Or
- Start from scratch and add the required components manually. This is explained in the following paragraphs.
The full online documentation is found here: https://ilnumerics.net/docs.html
Starting a new Project from Scratch
The setup of visualization projects depends on the target framework. If your project targets the full .NET Framework, you can use one of the ILNumerics item templates. Or, configure your project manually. It is not hard either. For .NET Core only the manual setup is available:
- Add ILNumerics references:
- ILNumerics.Core, ILNumerics.Drawing
- (optional) toolboxes / computing module, if required.
Find the binaries from the GAC (.NET Framework) or from the [ILNumerics Installation Folder]/bin directory.
- .NET Core only: add the Windows.Compatibility nuget package.
- In the Forms Load event handler, create a new instance of ILNumerics.Drawing.Panel.
- Add the panel instance to the Controls collection (Windows Forms) of the form. WPF projects use the WindowsFormsHost and assign the panel object to the host.Child property.
- Now, start configuring your scene in the regular way.
The following video demonstrates these steps for the setup of a simple WPF app on .NET Core.
If you happen to work on the full .NET Framwork and with the Windows.Forms windows you may use the provided item templates to simplify project setup. Start with a fresh Windows.Forms application in Visual Studio. Choose C# as the project language. From the solution explorer right click on the project and select ADD -> NEW ITEM:
From the 'Add New Item' dialog select a "Plotting Form" item template:
A reference to the ILNumerics.Core and ILNumerics.Drawing assembly is added to your project and a new form is created. It implements a basic example of an XYZ plot. In order to start the form, set the newly created form as the startup form in the Program.cs file:
Build the project! Visual Studio will recognize your new ILNumerics references and automatically add the deploy items for ILNumerics to your project. Allow the project to reload and hit F5 to start the program. The form is shown, resize the form and rotate the plot cube with the left mouse button. When clicking on the red line plot with the right mouse button, the plot changes its data.
Visit the Visualization Documentation in order to learn how to create stunning visualizations with ILNumerics. The plotting capabilities are only a fraction of what can be done with ILNumerics' scene graphs.
A short introductory screenscast exists which shows the general usage of ILNumerics Plotting Forms:
Let's have some more fun with another visualization! In the code for the Plotting Form replace the ilPanel_Load function with the following code:
Hit F5 to start the application. You should see a form similar to this:
Use the left and right mouse buttons to rotate and pan the plot - the mouse wheel to zoom. Visit the Visualization documentation in order to read about all details of plots and visualizations with ILNumerics.
A Hint on debugging ILNumerics® Applications
Another screencast gives an introduction about the debugging capabilities in ILNumerics Ultimate VS and Visual Studio, including data tips for variables, usage of the Immediate Window and the famous ILNumerics Array Visualizer tool window for Visual Studio.
Visit the online documentation and learn all aspects of ILNumerics Ultimate VS.Pricing and Licensing