<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The ILNumerics Blog &#187; Visual Studio</title>
	<atom:link href="https://ilnumerics.net/blog/tag/visual-studio/feed/" rel="self" type="application/rss+xml" />
	<link>https://ilnumerics.net/blog</link>
	<description>The Productivity Machine  &#124;  A fresh attempt for scientific computing  &#124;  http://ilnumerics.net</description>
	<lastBuildDate>Thu, 05 Dec 2024 09:09:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>Release Notes ILNumerics 4.13 (detailed)</title>
		<link>https://ilnumerics.net/blog/release-notes-ilnumerics-4-13-detailed/</link>
		<comments>https://ilnumerics.net/blog/release-notes-ilnumerics-4-13-detailed/#comments</comments>
		<pubDate>Wed, 03 May 2017 10:27:07 +0000</pubDate>
		<dc:creator><![CDATA[haymo]]></dc:creator>
				<category><![CDATA[ILNumerics]]></category>
		<category><![CDATA[Usage]]></category>
		<category><![CDATA[Visualization]]></category>
		<category><![CDATA[4.13]]></category>
		<category><![CDATA[changelog]]></category>
		<category><![CDATA[release notes]]></category>
		<category><![CDATA[usage]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://ilnumerics.net/blog/?p=985</guid>
		<description><![CDATA[<p>See this changelog for a quick list of all changes in version 4.13. Here we dive into some details about specific topics. Visualization Engine Improvements The main goal of the GDI renderer is still to provide a fully compatible alternative to the OpenGL renderer. It automatically replaces the OpenGL default renderer if a problem / &#8230; <a href="https://ilnumerics.net/blog/release-notes-ilnumerics-4-13-detailed/" class="more-link">Continue reading <span class="screen-reader-text">Release Notes ILNumerics 4.13 (detailed)</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://ilnumerics.net/blog/release-notes-ilnumerics-4-13-detailed/">Release Notes ILNumerics 4.13 (detailed)</a> appeared first on <a rel="nofollow" href="https://ilnumerics.net/blog">The ILNumerics Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>See this <a title="Changelog &amp; Release Notes" href="https://ilnumerics.net/changelog.html">changelog</a> for a quick list of all changes in version 4.13. Here we dive into some details about specific topics.</p>
<h2>Visualization Engine Improvements</h2>
<p>The main goal of the <strong>GDI renderer</strong> is still to provide a fully compatible alternative to the OpenGL renderer. It automatically replaces the OpenGL default renderer if a problem / incompatible hardware etc. was detected at runtime. The focus lays on feature completeness and precision of the rendering result. The quality of the GDI renderer has been further improved to these regards in 4.13. Changes affect the following low level rendering features.</p>
<h3>Antialiasing</h3>
<p>Lines now recognize the <span class="il_inlinecode">ILLines.Antialiasing</span> property for thick lines (Width &gt; 2). The antialised rendering works in all situations: transparent lines, lines with stipple patterns, inside /outside of plot cubes and for logartithmic / linear axis scales. The quality of the antialiasing implementation is now on par with common OpenGL implementations.</p>
<p><em>The new default value for </em><span class="il_inlinecode">ILLines.Antialiasing</span><em> is now </em><strong><span class="il_inlinecode">true</span></strong><em>.</em> However, thin lines would not profit from antialiasing, hence thin lines will continue to ignore the value of the <span class="il_inlinecode">ILLines.Antialiasing</span> property.</p>
<p>Note, that some OpenGL drivers actually refuse to render certain combinations of line properties. We experienced such behavior for stippled, thick line <em>strips</em> having antialiased rendering configured. In such situations you should make sure to have the most recent OpenGL / graphics card drivers installed. Alternatively you may chose either stippled pattern &#8211; / <em>or </em>antialiased rendering by explicitly configuring your lines for either one setting. Or use the GDI renderer instead.</p>
<p>Following is a screenshot of some lines examples. The left side shows the OpenGL renderer result. On the right side the GDI version is shown. Use your browser to show the full, unscaled image (right click on the image):</p>
<p><a href="http://ilnumerics.net/blog/wp-content/uploads/2017/04/LinesAntialiasingGDIversOpenGL413.png"><img class="aligncenter size-full wp-image-991" src="http://ilnumerics.net/blog/wp-content/uploads/2017/04/LinesAntialiasingGDIversOpenGL413.png" alt="LinesAntialiasingGDIversOpenGL413" width="880" height="454" /></a>&#8230; and with dotted lines:<a href="http://ilnumerics.net/blog/wp-content/uploads/2017/04/DottedLinesAntialiasingGDIversOpenGL413.png"><img class="aligncenter size-full wp-image-992" src="http://ilnumerics.net/blog/wp-content/uploads/2017/04/DottedLinesAntialiasingGDIversOpenGL413.png" alt="DottedLinesAntialiasingGDIversOpenGL413" width="882" height="453" /></a></p>
<p>&nbsp;</p>
<h3>Default Color for ILLines &amp; ILLineStrip</h3>
<p>Basic, low level line shapes are now created with a default color: black. Higher level objects (as ILLinePlot, ILSplinePlot, Markers, ILSurface etc.) should always provide a color for low-level objects or use vertex based coloring explicitly. If you are assembling your scene with the low level line objects make sure to check that you have done this. This is not a breaking change.</p>
<p>Note that the setting for the shapes <span class="il_inlinecode">Color</span> property overrides the vertex colors buffer (<span class="il_inlinecode">Color<strong>s</strong></span> property). In order to use vertex based coloring one must set the <span class="il_inlinecode">Color</span> property to null, enabling the colors information from the Colors buffer.</p>
<h3>Auto Color for Spline Plots</h3>
<p>ILSplinePlot (derived from ILLinePlot) now adopts the auto-coloring feature from the ILLinePlot class. When no line color was given at the time the plot was created the color gets assigned which comes next in the <span class="il_inlinecode">ILLinePlot.NextColor</span> color enumeration. Use the <span class="il_inlinecode">linecolor</span> constructor argument of <span class="il_inlinecode">ILSplinePlot</span> or the <span class="il_inlinecode">Line.Color</span> property in order to control the color of the spline line explicitly.</p>
<h3>Camera Default Depth: 100</h3>
<p>In earlier versions the default <span class="il_inlinecode">ILCamera.ZFar</span> value was 1000 which led to depth buffer precision issues in some situations. The new default value of 100 increases the depth buffer precision significantly. However, the new value (just like the old one) does not take into account the actual depth of your scene! If you encounter unwanted clipping in the far clippping area now, set the value for scene.Camera.ZFar explicitly. At best you know the depth of your scene and use this value. Or &#8211; more simple &#8211; use the old default of 1000:</p>
<pre class="brush: csharp; title: ; notranslate"> scene.Camera.ZFar = 1000; </pre>
<h2>Visual Studio 2017 Compatibility</h2>
<p>With the new version ILNumerics installs into the great, fresh new Visual Studio 2017 (released March 2017). &#8230; well, at least &#8216;kind of&#8217;&#8230;  What is true is that with 4.13 you can again use ILNumerics in all recent Visual Studio editions supporting extensions at all (which is all editions except Express Edition &#8211; I wonder if anyone is using this, still??), including Visual Studio 2017 Community Edition. This is great and all &#8230; <strong><em>but</em></strong>:</p>
<p>As you noticed there was a great deal of changes coming with VS2017. This includes the installer system which is &#8211; great attempt! &#8211; much more slim now by omitting unneeded stuff from the installation. But VS2017 also requires changes to the manifest files facilitating every Visual Studio Extensibility project. A new version has been introduced: version3. This is the first version which is not compatible with Visual Studio 2010 anymore. As a consequence, by supporting the new extension packaging system we would be required to drop support for Visual Studio 2010. This is not too dramatic since the 6 years VS2010 is out now feel kind of an eternity in our dev-world. However, we wanted to give the remaining VS2010 customers at least one version iteration of deprecating VS2010 in order to jump to a more recent version smoothly.</p>
<p>Additionally, the way the new VS installer works seems to reflect not the last word spoken on that topic (at least this is what we hope). The bottom line: we use an MSI installer, wrapped in an exe bootstrapper. The MSI installs all GAC binaries, registers the development dlls in Visual Studio, maintains the singleton installation directory and triggers the VSIX installer which installs the extension into all supported Visual Studio installations located on the system. This may sound complicated but worked quite reliably over the years.</p>
<p>Now, with the new Visual Studio package system things become odd. Out of subtle reasons, the MSI cannot (reliably) trigger the VSIX package automatically (and quietly). The <a href="http://stackoverflow.com/a/42278790/1215993">reason </a>becomes obvious when considering that the new extension potentially needs to trigger the installation of new components which it depends on. This install would not be possible while the hosting MSI is being installed itself still. So, as a consequence, currently, MSI installs of VSIX extensions into VS2017 are simply not working. When you start the ILNumerics installation from the delivered *.exe you will find the extension being installed into VS2010 and upwards &#8211; with the exception of Visual Studio 2017 <img src="https://ilnumerics.net/blog/wp-includes/images/smilies/icon_sad.gif" alt=":(" class="wp-smiley" /></p>
<p>Currently, some smart (WIX) people are attempting a solution to this. But we are not aware of a clean solution released already. Therefore, we will wait for it and/or eventually consider a new deployment scheme for our extensions.</p>
<p>However, luckily there is a simple workaround for now! After the ILNumerics installation was finished, you can easily install our extension into VS2017 manually. Just go to the installation folder (by default: C:\Program Files (x86)\ILNumerics\ILNumerics Ultimate VS\bin) and find the &#8216;ILNumerics.VSExtension.vsix&#8217; file. Double click on it to start the installation into the remaining Visual Studio instances manually. This should work without problems. Be sure to accept the warning dialog during the install. It originates from the fact that our extension must still support older Visual Studio extension techniques.</p>
<p>Keep in mind that this is a workaround, though! Once installed the extension will work as expected. But some things will not work consistentyl. Deinstallation, for example must be done manually from the &#8220;Extensions and Tools&#8221; dialog within Visual Studio 2017:</p>
<figure id="attachment_986" style="width: 954px;" class="wp-caption aligncenter"><a href="http://ilnumerics.net/blog/wp-content/uploads/2017/04/Deinstall-2017-Extensions-and-Updates.png"><img class="size-full wp-image-986" src="http://ilnumerics.net/blog/wp-content/uploads/2017/04/Deinstall-2017-Extensions-and-Updates.png" alt="A manually installed extension requires a manual uninstall." width="954" height="659" /></a><figcaption class="wp-caption-text">A manually installed extension requires a manual uninstall.</figcaption></figure>
<p>Also, in difference to the machine wide installation done by the (administrative) MSI install the manual VSIX installation changes the local user account only. You may have to repeat the VSIX install for other user accounts. Besides these lowered installation experience we know of no other incompatibilities in Visual Studio 2017. </p>
<p>The post <a rel="nofollow" href="https://ilnumerics.net/blog/release-notes-ilnumerics-4-13-detailed/">Release Notes ILNumerics 4.13 (detailed)</a> appeared first on <a rel="nofollow" href="https://ilnumerics.net/blog">The ILNumerics Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://ilnumerics.net/blog/release-notes-ilnumerics-4-13-detailed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ILNumerics for Science &#8211; How did you do the Visualization?</title>
		<link>https://ilnumerics.net/blog/ilnumerics-for-scientists-how-did-you-do-the-visualization/</link>
		<comments>https://ilnumerics.net/blog/ilnumerics-for-scientists-how-did-you-do-the-visualization/#comments</comments>
		<pubDate>Mon, 02 Feb 2015 16:35:03 +0000</pubDate>
		<dc:creator><![CDATA[Jonas]]></dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[ILNumerics]]></category>
		<category><![CDATA[Visualization]]></category>
		<category><![CDATA[3d visualization]]></category>
		<category><![CDATA[plots]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://ilnumerics.net/blog/?p=772</guid>
		<description><![CDATA[<p>In the third part of our series we focus on the visualization of scientific data. You learn how to easily display your data with ILNumerics and the ILPanels. Reactions I got a lot of emails after the last two posts (first, second) of people that liked the post and are interested in learning more. Most &#8230; <a href="https://ilnumerics.net/blog/ilnumerics-for-scientists-how-did-you-do-the-visualization/" class="more-link">Continue reading <span class="screen-reader-text">ILNumerics for Science &#8211; How did you do the Visualization?</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://ilnumerics.net/blog/ilnumerics-for-scientists-how-did-you-do-the-visualization/">ILNumerics for Science &#8211; How did you do the Visualization?</a> appeared first on <a rel="nofollow" href="https://ilnumerics.net/blog">The ILNumerics Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>In the third part of our series we focus on the visualization of scientific data. You learn how to easily display your data with ILNumerics and the ILPanels.</p>
<p><span id="more-772"></span></p>
<h3>Reactions</h3>
<p style="text-align: justify;">I got a lot of emails after the last two posts (<a title="ILNumerics for Scientists – An easy start" href="http://ilnumerics.net/blog/ilnumerics-for-scientists-an-easy-start/">first</a>, <a title="ILNumerics for Scientists – Going 3D" href="http://ilnumerics.net/blog/ilnumerics-for-scientists/">second</a>) of people that liked the post and are interested in learning more. Most emails asked me to go into more details about how I did all that. Obviously, not too many people are interested in implementing the particle in a box, so the “what” is not as interesting as the “how”.</p>
<p style="text-align: justify;">In this post I want to focus on the visualization part of the previous two examples and how <a href="http://ilnumerics.net">ILNumerics </a>helped me. As many of our users are scientists and engineers they are typically experts in the computation part but appreciate a little help in the visualization. If you&#8217;re interested in the computation part, please be patient until the next post.</p>
<h3>The Form</h3>
<p style="text-align: justify;">I started by creating a new project in Visual Studio and chose Windows Forms Application. This gives me a vanilla Form1.cs. That’s the basis of all the visualization and helps me – being a scientist and not a coder – a lot, because I couldn’t do all that without the help of Visual Studio in the background.</p>
<p style="text-align: justify;">On the left-hand side in the Toolbox panel I picked TableLayoutPanel under Containers and dragged it into Form1.cs.</p>
<p style="text-align: justify;"><a href="http://ilnumerics.net/blog/wp-content/uploads/2015/02/firstimage.png"><img class="alignnone size-full wp-image-775" src="http://ilnumerics.net/blog/wp-content/uploads/2015/02/firstimage.png" alt="firstimage" width="421" height="379" /></a></p>
<p style="text-align: justify;">I adjusted the table to have three rows and a single column. In the Properties section under Dock I chose Fill so that everything scales when scaling the window later on.</p>
<p style="text-align: justify;"><a href="http://ilnumerics.net/blog/wp-content/uploads/2015/02/secondimage.png"><img class="alignnone size-full wp-image-777" src="http://ilnumerics.net/blog/wp-content/uploads/2015/02/secondimage.png" alt="secondimage" width="404" height="475" /></a></p>
<p style="text-align: justify;">A right click on Table -&gt; Edit Rows and Columns allows you to change the behavior of the three rows. I wanted the first and last row not to scale when changing the window. This is what I chose here.</p>
<p style="text-align: justify;"><a href="http://ilnumerics.net/blog/wp-content/uploads/2015/02/thirdimage.png"><img class="alignnone size-full wp-image-779" src="http://ilnumerics.net/blog/wp-content/uploads/2015/02/thirdimage.png" alt="thirdimage" width="730" height="481" /></a></p>
<p style="text-align: justify;">In the middle row we would like to see two ILNumerics panels. So I dragged another TableLayoutPanel in the middle row and chose two columns and one row. Choosing Dock = Fill for the new table and dragging two ILPanels into the respective columns (again with Dock = Fill) gives us the layout for our final Windows Form.</p>
<p style="text-align: justify;"><a href="http://ilnumerics.net/blog/wp-content/uploads/2015/02/fourthimage.png"><img class="alignnone size-full wp-image-776" src="http://ilnumerics.net/blog/wp-content/uploads/2015/02/fourthimage.png" alt="fourthimage" width="685" height="623" /></a></p>
<p style="text-align: justify;">In the header (the first row) I inserted a FlowLayoutPanel that makes sure that everything in there will be displayed rather neatly. Then I added the labels and the NumericUpDown according to my needs. Please make sure that you go through the properties of every item and choose the values according to your needs. In my case, for instance, the minimum value for the state is 1, since 0 would mean that there is no particle present. Here is the final picture of the form for the 1D particle in a box:</p>
<p><a href="http://ilnumerics.net/blog/wp-content/uploads/2015/02/fifthimage.png"><img class="alignnone size-full wp-image-774" src="http://ilnumerics.net/blog/wp-content/uploads/2015/02/fifthimage.png" alt="fifthimage" width="935" height="660" /></a></p>
<h3>The Wiring</h3>
<p style="text-align: justify;">After having the layout ready the interactivity needs to be implemented. In this case there is only one point of user interaction. The user can choose which eigenvector to display. Double-clicking on the NumericUpDown control opens a new tab with a predefined class and a function handling the event when a user changes the value of the eigenvector.</p>
<p style="text-align: justify;"><a href="http://ilnumerics.net/blog/wp-content/uploads/2015/02/sixthimage.png"><img class="alignnone size-full wp-image-778" src="http://ilnumerics.net/blog/wp-content/uploads/2015/02/sixthimage.png" alt="sixthimage" width="589" height="477" /></a></p>
<p style="text-align: justify;">All that’s needed now is to implement the function numericUpDown1_ValueChanged. This is particularly simple in our case. We just call the Update function (still to be implemented) with the new value for the eigenvector.</p>
<p style="text-align: justify;">In the case of the 2D particle in a box we have, in fact, four events that should trigger the Update function. This is easily done by introducing these lines of code in the public function Form1():</p>
<pre class="brush: csharp; title: ; notranslate">
     numericUpDown1.ValueChanged += Update;
     numericUpDown2.ValueChanged += Update;
     numericUpDown3.ValueChanged += Update;
     textBox1.TextChanged += Update;
</pre>
<h3 style="text-align: left;">The Implementation</h3>
<p style="text-align: justify;">Now, all we need to do is to implement the Update function and the initialization. The initialization makes sure that all the plotting objects are created when starting the program.</p>
<pre class="brush: csharp; title: ; notranslate">
     public Form1()
     {
        InitializeComponent();

        var EVID = 1;
        var MeshSize = 1000;

        InitializePanel1(EVID, MeshSize);
        InitializePanel2(EVID, MeshSize);

        label2.Text = string.Format(&quot;In appropriate units the energy is {0}&quot;, EVID * EVID);
     }

     private void InitializePanel1(int EVID, int MeshSize)
     {
        ILArray&lt;float&gt; XY = ILMath.tosingle(Computing_Module1.CalcWF(EVID, MeshSize));
        var color = Color.Black;
        ilPanel1.Scene =
          new ILScene {
            new ILPlotCube {
              new ILLinePlot (XY, lineColor : color)
            }
          };
     }
</pre>
<p style="text-align: justify;">The call to Computing_Module1.CalcWF will be explained in the next post. The piece of code above initializes the wave function plot and the density plot in their respective panels with the first eigenvector and a mesh size of 1000.</p>
<p>Finally, the Update function is implemented.</p>
<pre class="brush: csharp; title: ; notranslate">
     private void Update(int EVID, int MeshSize = 1000)
     {
       ILArray&lt;float&gt; XY = ILMath.tosingle(Computing_Module1.CalcWF(EVID, MeshSize));
       ilPanel1.Scene.First&lt;ILLinePlot&gt;().Update(XY);
       ilPanel1.Scene.First&lt;ILPlotCube&gt;().Reset();
       ilPanel1.Refresh();

       ILArray&lt;float&gt; XD = ILMath.tosingle(Computing_Module1.CalcDensity(EVID, MeshSize));
       ilPanel2.Scene.First&lt;ILLinePlot&gt;().Update(XD);
       ilPanel2.Scene.First&lt;ILPlotCube&gt;().Reset();
       ilPanel2.Refresh();
       label2.Text = string.Format(&quot;In appropriate units the energy is {0}&quot;, EVID * EVID);
     }
</pre>
<p style="text-align: justify;">Again, the CalcWF and CalcDensity calls will be explained in the next post. The Reset() function rescales the axes and the Refresh() function finally puts the new plot on screen.</p>
<p>The post <a rel="nofollow" href="https://ilnumerics.net/blog/ilnumerics-for-scientists-how-did-you-do-the-visualization/">ILNumerics for Science &#8211; How did you do the Visualization?</a> appeared first on <a rel="nofollow" href="https://ilnumerics.net/blog">The ILNumerics Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://ilnumerics.net/blog/ilnumerics-for-scientists-how-did-you-do-the-visualization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Directions to the ILNumerics Optimization Toolbox</title>
		<link>https://ilnumerics.net/blog/directions-to-the-ilnumerics-optimization-toolbox/</link>
		<comments>https://ilnumerics.net/blog/directions-to-the-ilnumerics-optimization-toolbox/#comments</comments>
		<pubDate>Wed, 14 Jan 2015 16:27:44 +0000</pubDate>
		<dc:creator><![CDATA[haymo]]></dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[ILNumerics]]></category>
		<category><![CDATA[Scientific Computing]]></category>
		<category><![CDATA[Usage]]></category>
		<category><![CDATA[Getting Started]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[Toolbox]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://ilnumerics.net/blog/?p=738</guid>
		<description><![CDATA[<p>As of yesterday the ILNumerics Optimization Toolbox is out and online! It&#8217;s been quite a challenge to bring everything together: some of the best algorithms, the convenience you as a user of ILNumerics expect and deserve, and the high performance requirements ILNumerics sets the scale on for. We believe that all these goals could be &#8230; <a href="https://ilnumerics.net/blog/directions-to-the-ilnumerics-optimization-toolbox/" class="more-link">Continue reading <span class="screen-reader-text">Directions to the ILNumerics Optimization Toolbox</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://ilnumerics.net/blog/directions-to-the-ilnumerics-optimization-toolbox/">Directions to the ILNumerics Optimization Toolbox</a> appeared first on <a rel="nofollow" href="https://ilnumerics.net/blog">The ILNumerics Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>As of yesterday the ILNumerics Optimization Toolbox is out and online! It&#8217;s been quite a challenge to bring everything together: some of the best algorithms, the convenience you as a user of ILNumerics expect and deserve, and the high performance requirements ILNumerics sets the scale on for. We believe that all these goals could be achieved quite greatly.</p>
<p><span id="more-738"></span></p>
<p>During a lengthy beta phase we received a whole bunch of precise and enormous helpful feedback from you. We really appreciate that and again would like to say thanks!</p>
<p><a href="http://ilnumerics.net/blog/wp-content/uploads/2015/01/Optim_Camel_LBFGS.png"><img class="aligncenter size-full wp-image-747" src="http://ilnumerics.net/blog/wp-content/uploads/2015/01/Optim_Camel_LBFGS.png" alt="Optim_Camel_LBFGS" width="1026" height="868" /></a>ILNumerics Optimization Toolbox adds a number of functions to ILNumerics, useful to find solutions of common optimization problems. Since everything is nicely integrated into ILNumerics it helps you solve the problem easily and very efficiently. Optimization applications like the one shown as screenshot above can now get realized in a couple of minutes!</p>
<p>This blog post sheds some light on the very first steps for using the new Optimization Toolbox. It helps you to start quickly and lists some common documentation sources.</p>
<h2>Obtaining the Optimization Toolbox</h2>
<p>The optimization toolbox is available as a dedicated package and so must be individually purchased and installed. ILNumerics 4.6 or above is needed for that to work. Existing customers can evaluate the new toolbox by installing an extended trial on top of your existing ILNumerics Ultimate VS installation. Just <a href="mailto:sales@ilnumerics.net">let us know</a> and we will lead you the way to the download. Another option is the trial: it includes all toolboxes, hence you can start right away by <a href="http://ilnumerics.net/download.html">downloading</a> and installing a trial of ILNumerics Ultimate VS and get familiar with all optimization methods easily.</p>
<h2>Optimization Toolbox Setup</h2>
<p>The optimization toolbox obviously depends on the ILNumerics Computation Engine. It installs the managed assemblies ILNumerics.Optimization.dll into the GAC and also makes them available inside Visual Studio as reference to your application projects:</p>
<p><a href="http://ilnumerics.net/blog/wp-content/uploads/2015/01/2015-01-14-16_26_48-Reference-Manager-ConsoleApplication18.png"><img class="aligncenter size-full wp-image-740" src="http://ilnumerics.net/blog/wp-content/uploads/2015/01/2015-01-14-16_26_48-Reference-Manager-ConsoleApplication18.png" alt="2015-01-14 16_26_48-Reference Manager - ConsoleApplication18" width="700" height="351" /></a>Afterwards, the ILNumerics.Optimization class is found in the ILNumerics namespace which commonly is included in your source files anyway. A super-mini but complete starting example in a fresh new C# console application could look as follows:</p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using ILNumerics; 

namespace ConsoleApplication1 {
    class Program : ILMath {

        static ILRetArray&lt;double&gt; myObjFunc(ILInArray&lt;double&gt; A) {
            using (ILScope.Enter(A)) {
                return sum((A - 1) * A);
            }
        }
        static void Main(string[] args) {
            ILArray&lt;double&gt; M = Optimization.fmin(myObjFunc, ones(1,4));
            Console.WriteLine(M);
        }
    }
}

</pre>
<p>Note how we derived our console class from ILNumerics.ILMath! This allows us to omit the namespace.class identifier and &#8216;ILMath.sum&#8217; and &#8216;ILMath.ones&#8217; become just: &#8216;sum&#8217; and &#8216;ones&#8217;.</p>
<p>If you are lucky enough to use Visual Studio 2015, it will allow you the inclusion of the static ILNumerics.Optimization class into your &#8216;using&#8217; directives on top of your source code files also. This will inject all public functions of the Optimization class into your scope also which gives an even shorter syntax. &#8216;fmin&#8217; and all other optimization functions are now readily available right next to the common ILMath functions:</p>
<p><a href="http://ilnumerics.net/blog/wp-content/uploads/2015/01/2015-01-14-16_44_19-ConsoleApplication1-Debugging-Microsoft-Visual-Studio.png"><img class="aligncenter size-full wp-image-743" src="http://ilnumerics.net/blog/wp-content/uploads/2015/01/2015-01-14-16_44_19-ConsoleApplication1-Debugging-Microsoft-Visual-Studio.png" alt="2015-01-14 16_44_19-ConsoleApplication1 (Debugging) - Microsoft Visual Studio" width="661" height="373" /></a>That&#8217;s it already! Happy optimizing!</p>
<h2>Optimization Examples</h2>
<p>A number of example applications have been added to the <a href="http://ilnumerics.net/examples.php">examples section</a>. Basically, they accompany the corresponding <a href="/ilnumerics-optimization-toolbox.html">online documentation</a> and let you follow the tutorials step by step on your own machine.</p>
<p>In order to start with an example application, you download the example as a zip package and extract it into a new folder on your local machine. Open the &#8216;*.csproj&#8217; contained in the example package with Visual Studio. You will notice missing references in the References node of your project in the Solution Explorer:</p>
<p><a href="http://ilnumerics.net/blog/wp-content/uploads/2015/01/2015-01-14-17_03_38-.png"><img class="aligncenter size-full wp-image-744" src="http://ilnumerics.net/blog/wp-content/uploads/2015/01/2015-01-14-17_03_38-.png" alt="2015-01-14 17_03_38-" width="386" height="523" /></a>Just remove these old references and replace them with references to the files actually installed on your system – using the common method described above.</p>
<p>Hit F5 and run the example!</p>
<h2>Documentation</h2>
<p>The ILNumerics Optimization Toolbox online documentation is available here:</p>
<p><a href="http://ilnumerics.net/ilnumerics-optimization-toolbox.html">http://ilnumerics.net/ilnumerics-optimization-toolbox.html</a></p>
<p>The API /class documentation for all functions of ILNumerics.Optimization is available here:</p>
<p><a href="http://ilnumerics.net/apidoc/?topic=html/T_ILNumerics_Optimization.htm">http://ilnumerics.net/apidoc/?topic=html/T_ILNumerics_Optimization.htm</a></p>
<h2>Wrap up</h2>
<p>We gave a short introduction in how to obtain and install ILNumerics Optimization Toolbox for ILNumerics Computing Engine. We pointed you to the common places of examples and documentation.</p>
<p>If you run into trouble or have useful suggestions and feedback, <a href="/direct-support.html">let us know</a>! Contact <a href="mailto:sales@ilnumerics.net">sales@ilnumerics.net</a> for any licensing questions.</p>
<p><a href="http://ilnumerics.net/blog/wp-content/uploads/2015/01/2014-12-19-17_06_40-Iterations-BFGS_-8-L-BFGS_-22.png"><img class="aligncenter size-full wp-image-739" src="http://ilnumerics.net/blog/wp-content/uploads/2015/01/2014-12-19-17_06_40-Iterations-BFGS_-8-L-BFGS_-22.png" alt="2014-12-19 17_06_40-Iterations BFGS_ 8 L-BFGS_ 22" width="1026" height="805" /></a></p>
<p>The post <a rel="nofollow" href="https://ilnumerics.net/blog/directions-to-the-ilnumerics-optimization-toolbox/">Directions to the ILNumerics Optimization Toolbox</a> appeared first on <a rel="nofollow" href="https://ilnumerics.net/blog">The ILNumerics Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://ilnumerics.net/blog/directions-to-the-ilnumerics-optimization-toolbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting to know your Scene Graph</title>
		<link>https://ilnumerics.net/blog/getting-to-know-your-scene-graph/</link>
		<comments>https://ilnumerics.net/blog/getting-to-know-your-scene-graph/#comments</comments>
		<pubDate>Mon, 29 Dec 2014 12:21:09 +0000</pubDate>
		<dc:creator><![CDATA[haymo]]></dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[ILNumerics]]></category>
		<category><![CDATA[Usage]]></category>
		<category><![CDATA[Visualization]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[groups]]></category>
		<category><![CDATA[scene graph]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://ilnumerics.net/blog/?p=703</guid>
		<description><![CDATA[<p>Did you ever miss a certain feature in your ILNumerics scene graph? You probably did. But did you know, that most of the missing &#8220;features&#8221; mean nothing more than a missing &#8220;property&#8221;? Often enough, there is only a convenient access to a certain scene graph object needed in order to finalize a required configuration. Recently, &#8230; <a href="https://ilnumerics.net/blog/getting-to-know-your-scene-graph/" class="more-link">Continue reading <span class="screen-reader-text">Getting to know your Scene Graph</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://ilnumerics.net/blog/getting-to-know-your-scene-graph/">Getting to know your Scene Graph</a> appeared first on <a rel="nofollow" href="https://ilnumerics.net/blog">The ILNumerics Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Did you ever miss a certain feature in your <a href="/Visualization-API.html">ILNumerics scene graph</a>? You probably did. But did you know, that most of the missing &#8220;features&#8221; mean nothing more than a missing &#8220;property&#8221;? Often enough, there is only a convenient access to a certain scene graph object needed in order to finalize a required configuration.</p>
<p>Recently, a user asked how to turn the background of a legend object in ILNumerics plots transparent. There doesn&#8217;t seem to be a straight forward way to that. One might expect code like the following to work:</p>
<pre class="brush: csharp; title: ; notranslate">
var legend = new ILLegend(&quot;Line 1&quot;, &quot;Line 2&quot;);
legend.Background.Color = Color.FromArgb(200, Color.White);
</pre>
<p><span id="more-703"></span>Unfortunately, it does not. Legend objects do not implement a &#8216;Background&#8217; property which would give convenient access to the background object. However, the background object obviously exists. And ILLegend &#8211; likewise most of the more complex scene graph / plotting objects in ILNumerics &#8211; is derived from ILGroup! <a href="http://ilnumerics.net/group-nodes.html">Group nodes</a> represent the common way to store and manage any number of child objects. At the same time, group nodes gives the user flexible access to their children.<br />
In case of ILLegend we can utilize one of the access methods of ILGroup in order to access the scene graph node which implements the background of the legend. Once we have the background object, we can go out and manipulate it freely. In order to do that, let&#8217;s first investigate, which nodes exist inside a legend object!</p>
<h2>Stepping into living Scene Graphs</h2>
<p>ILNumerics and Visual Studio make it very easy to investigate even complex scenes. Let&#8217;s create a simple line plot application first! We start with a fresh new C# Windows Forms Application and add a Plotting Form Template to it. A detailed instruction is given on the getting started page, at &#8220;<a href="/Getting-Started-with-ILNumerics.html">Creating Visualizations with ILNumerics</a>&#8220;.<br />
Double click on the auto-generated Program.cs file and change the last line to read:</p>
<pre class="brush: csharp; title: ; notranslate">
    Application.Run(new Plotting_Form1());
</pre>
<p>Starting the project via F5 brings up the newly generated example plot. We make one more addition. Double click the Plotting_Form1.cs to show the form in the designer. Now, double click on the white panel1 background to go to the code implementing the scene setup. At the end of the code creating the new plot cube and adding the line plot we add another line which adds a new legend object:</p>
<pre class="brush: csharp; title: ; notranslate">
// Initial plot setup, modify this as needed
private void ilPanel1_Load(object sender, EventArgs e) {

    // create some test data, using our private computation module as inner class
    ILArray&lt;float&gt; Pos = Computation.CreateData(4, 300);

    // setup the plot (modify as needed)
    ilPanel1.Scene.Add(new ILPlotCube(twoDMode: false) {
        new ILLinePlot(Pos, tag: &quot;mylineplot&quot;) {
            Line = {
                Width = 2,
                Color = Color.Red,
                Antialiasing = true,
                DashStyle = DashStyle.Dotted
            }
        }, new ILLegend(&quot;MyLineItem&quot;)
    });
    // register event handler for allowing updates on right mouse click:
    ilPanel1.Scene.First&lt;ILLinePlot&gt;().MouseClick += (_s, _a) =&gt; {
        if (_a.Button == MouseButtons.Right)
            Update(ILMath.rand(3, 30));
    };
}
</pre>
<p>Starting via F5 should give a form similar like this:<br />
<a href="http://ilnumerics.net/blog/wp-content/uploads/2014/12/PlotFormPlain.png"><img class="aligncenter size-full wp-image-704" src="http://ilnumerics.net/blog/wp-content/uploads/2014/12/PlotFormPlain.png" alt="PlotFormPlain" width="675" height="562" /></a>Now, let&#8217;s start the fun! Investigating living objects works best when the objects are alive, right? So let&#8217;s set a breakpoint in Visual Studio right after the legend has been created:</p>
<p><a href="http://ilnumerics.net/blog/wp-content/uploads/2014/12/2014-12-29-12_51_22-WindowsFormsApplication4-Debugging-Microsoft-Visual-Studio.png"><img class="aligncenter size-full wp-image-705" src="http://ilnumerics.net/blog/wp-content/uploads/2014/12/2014-12-29-12_51_22-WindowsFormsApplication4-Debugging-Microsoft-Visual-Studio.png" alt="2014-12-29 12_51_22-WindowsFormsApplication4 (Debugging) - Microsoft Visual Studio" width="655" height="292" /></a>As you know, Visual Studio allows for a nice feature &#8216;Edit and Continue&#8217;. Let&#8217;s add a variable as reference to our legend right in Debug mode! This is not really necessary, but eases the inspection. Note, it does not matter, where to add the code line, as long as we step over it in the debugger:</p>
<pre class="brush: csharp; title: ; notranslate">
    var leg = ilPanel1.Scene.First&lt;ILLegend&gt;();
</pre>
<p>Scene graph nodes are clever enough to give reasonable insights into their state and content at runtime. Just hover over the newly created variable &#8216;leg&#8217; with the mouse and Visual Studio will display helpful debugger visualizers. Expand any node to show its content:</p>
<p><a href="http://ilnumerics.net/blog/wp-content/uploads/2014/12/2014-12-29-12_57_16-WindowsFormsApplication4-Debugging-Microsoft-Visual-Studio.png"><img class="aligncenter size-full wp-image-706" src="http://ilnumerics.net/blog/wp-content/uploads/2014/12/2014-12-29-12_57_16-WindowsFormsApplication4-Debugging-Microsoft-Visual-Studio.png" alt="2014-12-29 12_57_16-WindowsFormsApplication4 (Debugging) - Microsoft Visual Studio" width="616" height="306" /></a>Inspecting the legend object that way makes it immediately clear, which object legends are made out of: a triangle shape realizes the background, a line strip shape the border. A common group holds the individual legend items and will be filled dynamically at rendering time.</p>
<h2>Configuration Flexibility at its Extreme</h2>
<p>Having access to every single child item in the scene graph obviously brings an extreme flexibility for configurations. Now it is easy to change the color of the background object to make the legend transparent:</p>
<pre class="brush: csharp; title: ; notranslate">
var leg = ilPanel1.Scene.First&lt;ILLegend&gt;();
leg.First&lt;ILTriangles&gt;(&quot;ScreenObjectBackground&quot;).Color = Color.FromArgb(200, Color.White);
</pre>
<p>Which gives us our transparent legend:</p>
<p><a href="http://ilnumerics.net/blog/wp-content/uploads/2014/12/2014-12-29-13_10_50-Form1.png"><img class="aligncenter size-full wp-image-707" src="http://ilnumerics.net/blog/wp-content/uploads/2014/12/2014-12-29-13_10_50-Form1.png" alt="2014-12-29 13_10_50-Form1" width="520" height="253" /></a></p>
<h2>Do not stop here!</h2>
<p>This is the message to take away: any object in any visualization and any plot in ILNumerics is composed out of individual smaller objects. You can access them and manipulate them freely without limits! Most &#8216;convenience&#8217; properties like &#8220;colorbar.Background&#8221; barely do more than we have done here: they give easy access to inner children (and add Intellisense support, of course). But if you need access &#8211; you can easily gain it yourself by inspecting the scene graph and its objects by the methods described here.</p>
<p>The post <a rel="nofollow" href="https://ilnumerics.net/blog/getting-to-know-your-scene-graph/">Getting to know your Scene Graph</a> appeared first on <a rel="nofollow" href="https://ilnumerics.net/blog">The ILNumerics Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://ilnumerics.net/blog/getting-to-know-your-scene-graph/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Troubleshooting: Adding ILNumerics 3D Controls to the VS Toolbox</title>
		<link>https://ilnumerics.net/blog/troubleshooting-adding-controls-to-the-vs-toolbox/</link>
		<comments>https://ilnumerics.net/blog/troubleshooting-adding-controls-to-the-vs-toolbox/#comments</comments>
		<pubDate>Thu, 05 Dec 2013 18:30:27 +0000</pubDate>
		<dc:creator><![CDATA[Jonas]]></dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[ILNumerics]]></category>
		<category><![CDATA[Math Library]]></category>
		<category><![CDATA[Toolbox]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://ilnumerics.net/blog/?p=482</guid>
		<description><![CDATA[<p>Adding ILNumerics visualizations to Visual Studio based projects has become a quite convenient task: It&#8217;s easy to use the ILNumerics math library for own projects in .NET. However, from time to time users have problems adding the ILNumerics controls to their Visual Studio Toolbox window. Update: Since ILNumerics Ultimate VS version 4 this issue has &#8230; <a href="https://ilnumerics.net/blog/troubleshooting-adding-controls-to-the-vs-toolbox/" class="more-link">Continue reading <span class="screen-reader-text">Troubleshooting: Adding ILNumerics 3D Controls to the VS Toolbox</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://ilnumerics.net/blog/troubleshooting-adding-controls-to-the-vs-toolbox/">Troubleshooting: Adding ILNumerics 3D Controls to the VS Toolbox</a> appeared first on <a rel="nofollow" href="https://ilnumerics.net/blog">The ILNumerics Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p><strong>Adding ILNumerics visualizations to Visual Studio based projects has become a quite convenient task: It&#8217;s easy to use the ILNumerics math library for own projects in .NET. However, from time to time users have problems adding the ILNumerics controls to their Visual Studio Toolbox window.</strong></p>
<p><em>Update: Since ILNumerics Ultimate VS version 4 this issue has been solved once for all. Simply install the MSI installer and find the ILNumerics ILPanel in the toolbox for all applicable situations.</em></p>
<p>That&#8217;s what a <a href="http://stackoverflow.com/questions/18239021/ilnumerics-how-to-get-ilnumerics-controls-in-windows-form-tools" target="_blank">post on Stack Overflow</a> from earlier this year was about: A developer who wanted to use our<a href="http://ilnumerics.net"> C# math library</a> for 3d visualizations and simulations wasn&#8217;t able to access the ILNumerics controls. &#8220;How can I locate it?&#8221;, he was wondering. &#8220;Do I have to make some changes to my VS?&#8221;</p>
<h2>Adding ILNumerics Controls to the Visual Studio Toolbox manually</h2>
<p>If the ILNumerics Ultimate VS math library is installed on a system, normally the ILNumerics controls are automatically listed in the Visual Studio toolbox on all supported versions of Visual Studio. However, if that&#8217;s not the case there&#8217;s a way to a add them manually: After clicking right onto the toolbox, you can select &#8220;Choose Item&#8221;. The dialog allows you to select the assambly to load the controls from – that&#8217;s it! You will find the ILNumerics.dll in the installation folder on your system. By default this directory is located at:  &#8220;C:\Program Files (x86)\ILNumerics\ILNumerics Ultimate VS\bin\ILNumerics.dll&#8221;.</p>
<p>However, if that doesn&#8217;t work straightaway, it often helps to clear the toolbox from any copies of custom controls before – simply right-click it and choose &#8220;Reset Toolbox&#8221;.</p>
<h2>Need help? ILNumerics Documentation and Support</h2>
<p><strong>You want to know more about our math library and its installation? Check out our <a href="http://ilnumerics.net/docs.html" target="_blank">documentation</a> and the <a title="Getting Started" href="http://ilnumerics.net/Getting-Started-with-ILNumerics.html" target="_blank">Quick Start Guide</a>! If you have any technical questions, have a look at our <a href="http://ilnumerics.net/support.html" target="_blank">Support Section</a>.</strong></p>
<p>The post <a rel="nofollow" href="https://ilnumerics.net/blog/troubleshooting-adding-controls-to-the-vs-toolbox/">Troubleshooting: Adding ILNumerics 3D Controls to the VS Toolbox</a> appeared first on <a rel="nofollow" href="https://ilnumerics.net/blog">The ILNumerics Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://ilnumerics.net/blog/troubleshooting-adding-controls-to-the-vs-toolbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
