<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Programming in a small software company</title>
    <link rel="alternate" type="text/html" href="http://www.igraphicsgroup.com/blog/" />
    <link rel="self" type="application/atom+xml" href="http://www.igraphicsgroup.com/blog/atom.xml" />
   <id>tag:www.igraphicsgroup.com,2010:/blog/1</id>
    <link rel="service.post" type="application/atom+xml" href="http://www.igraphicsgroup.com/blog-mt/mt-atom.cgi/weblog/blog_id=1" title="Programming in a small software company" />
    <updated>2010-11-26T17:43:23Z</updated>
    <subtitle>It&apos;s all about making my customers happy</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 3.2ysb5-20051201</generator>
 
<entry>
    <title>Changing Blog to WordPress</title>
    <link rel="alternate" type="text/html" href="http://igraphicsgroup.com/blog/2010/11/changing_blog_to_wordpress.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.igraphicsgroup.com/blog-mt/mt-atom.cgi/weblog/blog_id=1/entry_id=34" title="Changing Blog to WordPress" />
    <id>tag:www.igraphicsgroup.com,2010:/blog//1.34</id>
    
    <published>2010-11-26T17:41:34Z</published>
    <updated>2010-11-26T17:43:23Z</updated>
    
    <summary><![CDATA[If you are reading this blog, please note that I've moved it to wordpress and the new url is: &nbsp;http://igraphicsgroup.com/blogwp&nbsp;Thanks!...]]></summary>
    <author>
        <name>mike</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.igraphicsgroup.com/blog/">
        <![CDATA[<p><strong>If you are reading this blog, please note that I've moved it to wordpress and the new url is: </strong><strong>&nbsp;</strong></p><p><a href="http://igraphicsgroup.com/blogwp">http://igraphicsgroup.com/blogwp</a></p><p>&nbsp;Thanks!</p>]]>
        
    </content>
</entry>
<entry>
    <title>Office; the never ending reorganization</title>
    <link rel="alternate" type="text/html" href="http://igraphicsgroup.com/blog/2010/11/office_the_never_ending_reorga.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.igraphicsgroup.com/blog-mt/mt-atom.cgi/weblog/blog_id=1/entry_id=33" title="Office; the never ending reorganization" />
    <id>tag:www.igraphicsgroup.com,2010:/blog//1.33</id>
    
    <published>2010-11-12T09:51:56Z</published>
    <updated>2010-11-12T09:51:59Z</updated>
    
    <summary>The physical reorganization is going nicely.&amp;#160; The additional of 2 new shelving units has allowed us to (finally) organize all the equipment into one location.&amp;#160; Now that my back is finally starting to recover it is time to update the...</summary>
    <author>
        <name>mike</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.igraphicsgroup.com/blog/">
        <![CDATA[<p>The physical reorganization is going nicely.&#160; The additional of 2 new shelving units has allowed us to (finally) organize all the equipment into one location.&#160; Now that my back is finally starting to recover it is time to update the logical structure.</p>  <p>Right now, we have several systems running virtual machines.&#160; We have an older ESXi server that runs a few older development systems.&#160; We also have a subversion server running on a Linux VM, and a mail server running under Hyper-V.</p>  <p>Essentially, we have four systems running different hypervisors: ESXi 3.5, VMware Workstation, Hyper-V and VMware Server 1.0.</p>  <p>This will be changing next week.&#160; A new project is forcing us to expand our testing capabilities, and the <a href="http://www.dell.com/outlet" target="_blank">Dell Outlet</a> had a very nice server at a good price!</p>  <p>We picked up a dual processor T710 with 48GB of Ram to run <a href="http://store.vmware.com/store/vmware/en_US/DisplayProductDetailsPage/productID.126843700" target="_blank">VMware vSphere 4.1</a>; the Essentials version is only $611.&#160; We’ll put a few TB of storage on it, and be able to migrate all the existing VM’s, as well as all the new ones to it.&#160; </p>  <p>Our existing ESXi server will be transitioning to the backup server role.&#160; I’ve been wanting to try out <a href="http://www.openfiler.com/" target="_blank">Openfiler</a>, and this will give me a chance.&#160; After another purchase at Newegg, we have an external enclosure, and 12 TB of RAID storage for backup data.&#160; We’ll use external drives to archive the data.</p>  <p>This project will allow us to repurpose (or retire) three existing servers and add 10 new “testing” VMs, which will be available all the time!&#160; It also allows us to consolidate our backups to a single backup server.</p>  <p>We’re still unsure what third party backup tool to use with vSphere.&#160; There are many options, with differing price points.&#160; We’re going to start with <a href="http://www.veeam.com/vmware-esxi-fastscp.html" target="_blank">Veeam FastSCP</a>, since it’s free (and what we are using now).&#160; </p>  <p>Over the next several months we will use the 30 day free trials to test the following tools:</p>  <ol>   <li><a href="http://www.veeam.com/vmware-esx-backup.html" target="_blank">Veeam Backup &amp; Replication</a></li>    <li><a href="http://vizioncore.com/product/vRangerPro" target="_blank">Quest vRanger</a></li>    <li><a href="http://www.phdvirtual.com/esxpress40" target="_blank">PHD Virtual Backup</a></li> </ol>  <p>Right now I’m leaning towards Veeam due to it’s ability to restore single files from a VM.&#160; To be honest, if it works well enough, I won’t even test the other tools.</p>]]>
        
    </content>
</entry>
<entry>
    <title>Office Cleanup, LDAP, Samba 3.5, and Server 2008 R2</title>
    <link rel="alternate" type="text/html" href="http://igraphicsgroup.com/blog/2010/10/office_cleanup_ldap_samba_35_a.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.igraphicsgroup.com/blog-mt/mt-atom.cgi/weblog/blog_id=1/entry_id=32" title="Office Cleanup, LDAP, Samba 3.5, and Server 2008 R2" />
    <id>tag:www.igraphicsgroup.com,2010:/blog//1.32</id>
    
    <published>2010-10-25T09:44:12Z</published>
    <updated>2010-10-25T09:48:12Z</updated>
    
    <summary>With a little help from Junk Busters Austin the office clean up is complete.&amp;#160; It was a bittersweet day; getting rid of old CRTs, Pentium-2 servers, and boxes of old software. The logical cleanup started as well.&amp;#160; I’ve set up...</summary>
    <author>
        <name>mike</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.igraphicsgroup.com/blog/">
        <![CDATA[<p>With a little help from <a href="http://www.junkbusters-usa.com/" target="_blank">Junk Busters Austin</a> the office clean up is complete.&#160; It was a bittersweet day; getting rid of old CRTs, Pentium-2 servers, and boxes of old software.</p>  <p>The logical cleanup started as well.&#160; I’ve set up a new Domain Server using openSUSE 11.3 with LDAP.&#160; This was my first experience with openSUSE, and now that it is done I can recommend it.</p>  <p>Major thanks to Masim Suguanto and his tutorial which was a great help with the initial setup: <a href="http://vavai.net/2010/03/30/how-to-samba-pdcopenldap-on-opensusesles-part-1/">http://vavai.net/2010/03/30/how-to-samba-pdcopenldap-on-opensusesles-part-1/</a>.</p>  <p>Also, it was good to read up on the Samba group mapping <a href="http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/groupmapping.html">http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/groupmapping.html</a> before starting.</p>  <p>But, getting Windows Server 2008 and 2008 R2 on the Domain was a bit of work!</p>  <h2>How to get Server 2008 R2 to operate with a Samba 3.5 Domain Server:</h2>  <p>1) Update the registry on the Server 2008 System: <a href="http://wiki.samba.org/index.php/Windows7">http://wiki.samba.org/index.php/Windows7</a></p>  <p>2) Ensure that the Windows and Linux have the same date and time (run “net time <a href="file://\\Server">\\Server</a> /set” on the Windows Server).</p>  <p>3) Modify the Server 2008 local policy’s for Network Security: LAN Manager authentication level to “Send LN &amp; NTLM – use NTLM2 session security if negotiated”.</p>  <p>4) Modify the Server 2008 local for Network Security: Network security: Allow Local System to use computer identity for NTLM (Disabled): <a href="http://wiki.ssystems.de/doku.php?id=samba_trust_w2008r2_harald_strack">http://wiki.ssystems.de/doku.php?id=samba_trust_w2008r2_harald_strack</a>.</p>  <p>5) I also set the AllowNT4Crypto registry setting, though I’m not sure if that was needed: <a href="http://technet.microsoft.com/en-us/library/cc974327%28WS.10%29.aspx">http://technet.microsoft.com/en-us/library/cc974327%28WS.10%29.aspx</a></p>  <p>&#160;</p>  <p>Reading this, it sure seems easy now!&#160; Though, it took me the better part of two days to get the Samba Domain Controller, LDAP, and Server 2008 all working together.&#160; I like the new database style configuration used by openSUSE 11.3, as well as the GUI configuration tools.&#160; </p>  <p>Migrating the local profiles to domain profiles was not as bad as I expected.&#160; I ran the <a href="http://www.forensit.com/downloads.html" target="_blank">“User Profile Wizard 3.0”</a> and it seemed to work nicely.</p>  <h2>The Next Step:</h2>  <p>With the new domain server in place, my next step will be to migrate all my utility and test VM’s from an ESXi (3.5) Server, VMware Server for Linux, and VMware Workstation to a new Dell Server.&#160; I’ve gotten very tired of having all the VMs scattered among several different systems, and want to consolidate them in one place.</p>  <p>Once it is running, the old ESXi server is going to become the new backup server (<a href="http://www.openfiler.com/" target="_blank">openfiler</a> seems to be a good choice).&#160; Well, once I plug in a new eSATA card to allow me to hook up all the external drives I’ve been using, that is.</p>]]>
        
    </content>
</entry>
<entry>
    <title>Finally, Qt trunk has support for Visual Studio 2010</title>
    <link rel="alternate" type="text/html" href="http://igraphicsgroup.com/blog/2010/05/finally_qt_trunk_has_support_f.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.igraphicsgroup.com/blog-mt/mt-atom.cgi/weblog/blog_id=1/entry_id=31" title="Finally, Qt trunk has support for Visual Studio 2010" />
    <id>tag:www.igraphicsgroup.com,2010:/blog//1.31</id>
    
    <published>2010-05-02T14:54:33Z</published>
    <updated>2010-05-02T14:54:37Z</updated>
    
    <summary>A few days ago an update of qt.gitorious.org added the Visual Studio 2010 mkspec.&amp;#160; This means that I can finally use scripting and webkit with the vc10 compiler. Previously, I had been building Qt with the vc9 (2008) mkspec, and...</summary>
    <author>
        <name>mike</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.igraphicsgroup.com/blog/">
        <![CDATA[<p>A few days ago an update of qt.gitorious.org added the Visual Studio 2010 mkspec.&#160; This means that I can finally use scripting and webkit with the vc10 compiler.</p>  <p>Previously, I had been building Qt with the vc9 (2008) mkspec, and -no-webkit -no-script -no-scripttools.</p>  <p>To pad this post a bit, here’s a link to another blog post where somebody is using Qt, F#, and .dot/mono: <a href="http://blog.ctaggart.com/2009/12/qt-from-f.html" target="_blank">qt-from-fsharp</a>.&#160; I have to admit that I *like* building GUIs using XAML, but for cross-platform applications Qt is the way to go.</p>]]>
        
    </content>
</entry>
<entry>
    <title>Dead Server and Visual Studio 2010 Release</title>
    <link rel="alternate" type="text/html" href="http://igraphicsgroup.com/blog/2010/04/dead_server_and_visual_studio.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.igraphicsgroup.com/blog-mt/mt-atom.cgi/weblog/blog_id=1/entry_id=30" title="Dead Server and Visual Studio 2010 Release" />
    <id>tag:www.igraphicsgroup.com,2010:/blog//1.30</id>
    
    <published>2010-04-14T14:13:25Z</published>
    <updated>2010-04-14T14:13:30Z</updated>
    
    <summary>Monday morning I downloaded and set up the new Visual Studio on my main development system.&amp;#160; As a C++ developer, the new features and fixes are pushing me to migrate active projects to it.&amp;#160; I’m excited to use the new...</summary>
    <author>
        <name>mike</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.igraphicsgroup.com/blog/">
        <![CDATA[<p>Monday morning I downloaded and set up the new Visual Studio on my main development system.&#160; As a C++ developer, the new features and fixes are pushing me to migrate active projects to it.&#160; </p>  <p>I’m excited to use the new C++ features.&#160; Auto, lambda, and static_assert are my current favorites.</p>  <p><a href="http://msdn.microsoft.com/en-us/library/dd465215%28v=VS.100%29.aspx" target="_blank">The What's New in Visual C++ 2010</a> has a list of all the new language goodies.</p>  <p>Qt doesn’t have a mkspec yet.&#160; I believe that 4.7 will officially add VC 10 to the supported list, and remove VC 7.1 (sadly, since I think it was the best compiler Microsoft has released).</p>  <p>&#160;</p>  <p>Last night our deployment server died.&#160; It had been running (fairly) problem free for over 6 years.&#160; We used it to host our internal FTP, Bug Tracking and Wiki software.</p>  <p>The silver lining is that we can migrate to a hosted service.&#160; This would save us from needing to buy a new Server.&#160; More importantly, we wouldn’t have to take care of it, manage software updates or back it up.</p>  <p>This would also let us move a few projects to a hosted svn server.&#160; Our external developers would appreciate the speed boost.</p>  <p>I’m leaning towards using <a href="http://www.xp-dev.com" target="_blank">xp-dev</a>.</p>]]>
        
    </content>
</entry>
<entry>
    <title>No progress on the office yet, but I decided to like the ARM processor</title>
    <link rel="alternate" type="text/html" href="http://igraphicsgroup.com/blog/2010/04/no_progress_on_the_office_yet.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.igraphicsgroup.com/blog-mt/mt-atom.cgi/weblog/blog_id=1/entry_id=29" title="No progress on the office yet, but I decided to like the ARM processor" />
    <id>tag:www.igraphicsgroup.com,2010:/blog//1.29</id>
    
    <published>2010-04-03T17:49:48Z</published>
    <updated>2010-04-03T17:49:53Z</updated>
    
    <summary>My plans for a well organized office have been thwarted by a rush project targeted at Window CE.&amp;#160; I’ve never written anything for CE before, and have learned quite a bit about it over the last month. First, CE isn’t...</summary>
    <author>
        <name>mike</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.igraphicsgroup.com/blog/">
        <![CDATA[<p>My plans for a well organized office have been thwarted by a rush project targeted at Window CE.&#160; I’ve never written anything for CE before, and have learned quite a bit about it over the last month.</p>  <p>First, CE isn’t the same as Windows Mobile -- CE may be customized quite a bit for the device it is targeted at.&#160; This makes it a little challenging to build the software; especially when the client isn’t sure what the hardware folks are doing.</p>  <p>Second, the “recommended” tools and SDK are extremely old (based on VC 6).&#160; Luckily, you can use the newer tools (VC 2008) as long as you’re careful about your build settings and the System API’s you are using.</p>  <p>Lastly, it’s amazing how dependant I’ve become on the FPU.&#160; This project was targeted at an ARM CPU.&#160; These don’t typically have FPUs (though it is an option).&#160; Most of the rendering code I write uses floating point.</p>  <p>It’s not that ARM processors are slow, they are rather quick and I appreciate their shifting ability – it’s that floating point is emulated with a software library.&#160; This makes it imposable to use in time sensitive areas.</p>  <p>It reminds me of writing for the 80386.</p>  <p>So, after benchmarking the rendering code and discovering just how slow the math was, it was time to implement a fixed point library.&#160; Years ago, when Intel was still developing their XScale, they had an optimized fixed point library for the ARM.&#160; This seems to be long gone from the Internet – I looked for it for several hours and sent several emails to Marvell without any luck.</p>  <p>As it turns out, my ‘C’ fixed scale code was reasonably fast, and the VC2008 compiler did a decent job of optimizing it.&#160; After tuning the routines to prevent over and underflows the module performed quite well.</p>  <p>The only magic is to use 64 bit integers to multiply and divide – if you don’t have those, it’s a lot tougher.</p>  <p>The result was a fast software renderer, with optional support for DirectDraw and GAPI blit’ing.&#160; It was a lot of fun to get into “old school” software mode.</p>]]>
        
    </content>
</entry>
<entry>
    <title>A busy new year</title>
    <link rel="alternate" type="text/html" href="http://igraphicsgroup.com/blog/2010/03/a_busy_new_year.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.igraphicsgroup.com/blog-mt/mt-atom.cgi/weblog/blog_id=1/entry_id=28" title="A busy new year" />
    <id>tag:www.igraphicsgroup.com,2010:/blog//1.28</id>
    
    <published>2010-03-07T17:34:29Z</published>
    <updated>2010-03-07T17:34:35Z</updated>
    
    <summary>Over the past few months I’ve been working on several confidential projects.&amp;#160; They have prevented me from spending much time on *new* technology.&amp;#160; Though, one of the projects has involved a new Database, and has been interesting. I have been...</summary>
    <author>
        <name>mike</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.igraphicsgroup.com/blog/">
        <![CDATA[<p>Over the past few months I’ve been working on several confidential projects.&#160; They have prevented me from spending much time on *new* technology.&#160; Though, one of the projects has involved a new Database, and has been interesting.</p>  <p>I have been thinking about my goals for the year.&#160; </p>  <ol>   <li>I will complete porting my main codebase to Visual Studio 2010.</li>    <li>I will complete my F# tour.</li>    <li>I will completely clean my office.</li> </ol>  <p>It isn’t that my office is a huge mess, rather, it has a lot of older items stored in it.&#160; For example, I can count 6 blank VHS tapes sitting on a shelf.&#160; Getting ride of all the old items, and reorganizing the equipment that I actually use would allow me to gain a huge amount of space.</p>  <p>With that complete, I would be able to buy a few metal racks and finally put all the systems in one place.&#160; Last year, I “found” two operating routers when I was moving a printer.&#160; I’m not sure what bothered me more; that I had forgotten about them or that they were buried so deeply under cables that they were not visible.</p>  <p>My goal is to have everything on racks, visible, with cables zip tied neatly.</p>  <p>I was enjoying my progress with F#, and can’t wait to get back into it.&#160; The immutability coupled with threading excites me a great deal.</p>  <p>The Visual Studio 2010 release seems to have corrected the flaws introduced with the 2005 and 2008 releases.&#160; My C++ benchmarking has shown it to be almost as fast as Visual Studio 2003, and a bit faster when PGO was used.&#160; Once the mobile SDKs are available, I may be able to migrate all my active projects to it.</p>]]>
        
    </content>
</entry>
<entry>
    <title>Visual Studio 2010 and Silverlight 4</title>
    <link rel="alternate" type="text/html" href="http://igraphicsgroup.com/blog/2009/12/visual_studio_2010_and_silverl.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.igraphicsgroup.com/blog-mt/mt-atom.cgi/weblog/blog_id=1/entry_id=27" title="Visual Studio 2010 and Silverlight 4" />
    <id>tag:www.igraphicsgroup.com,2009:/blog//1.27</id>
    
    <published>2009-12-02T17:51:44Z</published>
    <updated>2009-12-02T17:51:51Z</updated>
    
    <summary>Over the weekend I installed the Visual Studio 2010 Beta 2 and the Silverlight 4 Beta.&amp;#160; On my laptop, it installed fine.&amp;#160; On an older (spare) development box it caused Windows 7 to “black screen” in the middle of the...</summary>
    <author>
        <name>mike</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.igraphicsgroup.com/blog/">
        <![CDATA[<p>Over the weekend I installed the Visual Studio 2010 Beta 2 and the Silverlight 4 Beta.&#160; On my laptop, it installed fine.&#160; On an older (spare) development box it caused Windows 7 to “black screen” in the middle of the install process.&#160; I admit that this is an older system, and may be a bit unstable, but it shouldn’t crater on install.</p>  <p>My two goals are to:</p>  <p>(1) Try the new features of Silverlight 4; printing and privileged applications.&#160; These were the key issues that prevented me from hosting applications in Silverlight.</p>  <p>(2) Begin the process of porting a large project from Visual Studio 2003.&#160; VC 2005 and 2008 tried to “fix” the MS runtime libraries via Windows SxS.&#160; In my mind, the result was far worse!&#160; VC 2010 goes back to the older model, where the application will load the DLL’s in the application directory (no fuss, no muss).</p>  <p>Because I’m in a C++ mood, I’m starting with the port.&#160; The first step will be to build Boost – the trunk has support (for 2010), so it’ll just launch bjam and let it churn.&#160; Qt doesn’t have a mkspec for 2010 yet, so I’ll just use the 2008 settings.</p>  <p>Assuming nothing goes wrong, I’ll start the basic porting this afternoon.</p>]]>
        
    </content>
</entry>
<entry>
    <title>Hilbert R-trees and C#</title>
    <link rel="alternate" type="text/html" href="http://igraphicsgroup.com/blog/2009/10/hilbert_rtrees_and_c.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.igraphicsgroup.com/blog-mt/mt-atom.cgi/weblog/blog_id=1/entry_id=26" title="Hilbert R-trees and C#" />
    <id>tag:www.igraphicsgroup.com,2009:/blog//1.26</id>
    
    <published>2009-10-13T21:26:22Z</published>
    <updated>2009-10-14T21:07:33Z</updated>
    
    <summary>My adventures with Silverlight have encouraged me to get up to speed with C# and .Net 3.5.&amp;#160; I’m dividing my time between Windows and Mono (and Moonlight) under Linux. I’m reading “Pro C# 2008 and the .NET 3.5 Platform”, by...</summary>
    <author>
        <name>mike</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.igraphicsgroup.com/blog/">
        <![CDATA[<p>My adventures with Silverlight have encouraged me to get up to speed with C# and .Net 3.5.&#160; I’m dividing my time between Windows and Mono (and Moonlight) under Linux.</p>  <p>I’m reading “Pro C# 2008 and the .NET 3.5 Platform”, by Andrew Troelsen (ISBN-13: 978-1-59059-884-9), and can give it a good recommendation.</p>  <p>For my first project, I have decided to implement a Hilbert R-tree and see how well it compares with the overlapping Quad-Trees that we have now.</p>  <p>R-trees use nested dynamic rectangles to store information.&#160; Because they are created based on the data which is stored in them, the structures should provide better utilization, that is no empty (wasted) nodes.</p>  <p>The difficulty with R-trees is that it is difficult to decide how to split data into child rectangles.&#160; The goal is to put an equal number of objects into each of the new child rectangles and minimize overlap.</p>  <p>The Hilbert R-tree solves this problem by using a 2D Hilbert curve to index the data.&#160; A Hilbert curve is a continuous fractal space-filling curve (<a href="http://en.wikipedia.org/wiki/Hilbert_curve" target="_blank">wiki</a>) which will visit all points of a k-dimensional grid without overlapping.</p>  <p>By partitioning the data using the Hilbert number of it’s center point, we can easily split a node into several child nodes.</p>  <p>The Hilbert R-tree also balances itself via node reinsertion (like the R* tree).</p>  <p>In any case, this seemed like an interesting task to use for exploring C#.</p>  <p>I started by porting my existing overlapping quad tree to C#.&#160; Then I implemented a Hilbert R-tree, without the reinsertion logic, to see how well the splitting logic worked.</p>  <h4>Testing Results</h4>  <p>Using random data, with a limited size (to better emulate typical mapping data), the quad tree was about 4x faster for inserts.</p>  <p>The R-tree had about %25 fewer nodes.</p>  <p>Search time for the quad tree was slightly better.&#160; I believe that this is due to the large amount of overlapping of the child nodes in the R-tree.</p>  <p>I modified the R-tree splitting to partition the data based on the largest distances between the Hilbert values, which increased the node count, but increased the search speed to roughly the same as the quad tree.</p>  <h4>Next Step</h4>  <p>The operation of spatial trees is incredibly dependant upon the data.&#160; My tests are using randomly generated data, which is interesting, but ultimately useless.</p>  <p>Next, I’ll extract several hundred thousand objects from a dataset, and use them for performance testing. </p>]]>
        
    </content>
</entry>
<entry>
    <title>Silverlight Library</title>
    <link rel="alternate" type="text/html" href="http://igraphicsgroup.com/blog/2009/09/silverlight_library.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.igraphicsgroup.com/blog-mt/mt-atom.cgi/weblog/blog_id=1/entry_id=25" title="Silverlight Library" />
    <id>tag:www.igraphicsgroup.com,2009:/blog//1.25</id>
    
    <published>2009-09-12T05:08:19Z</published>
    <updated>2009-09-12T05:08:36Z</updated>
    
    <summary>I’ve been reading up on Silverlight quite a bit.&amp;#160; So far, one book has has impressed me: “Data-Driven Services with Silverlight 2”, by John Papa.&amp;#160; It has filled in some gaps. I can also recommend “Pro Silverlight 2 in C#...</summary>
    <author>
        <name>mike</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.igraphicsgroup.com/blog/">
        <![CDATA[<p>I’ve been reading up on Silverlight quite a bit.&#160; So far, one book has has impressed me: “Data-Driven Services with Silverlight 2”, by John Papa.&#160; It has filled in some gaps.</p>  <p>I can also recommend “Pro Silverlight 2 in C# 2008”, by Matthew MacDonald.&#160; It covers the major parts of the client side.</p>]]>
        
    </content>
</entry>
<entry>
    <title>MapCruncher and more on Silverlight Mapping</title>
    <link rel="alternate" type="text/html" href="http://igraphicsgroup.com/blog/2009/08/mapcruncher_and_more_on_silver.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.igraphicsgroup.com/blog-mt/mt-atom.cgi/weblog/blog_id=1/entry_id=24" title="MapCruncher and more on Silverlight Mapping" />
    <id>tag:www.igraphicsgroup.com,2009:/blog//1.24</id>
    
    <published>2009-08-15T19:40:37Z</published>
    <updated>2009-08-15T19:40:41Z</updated>
    
    <summary>I continue to experiment with the Silverlight Virtual Earth control, as well as the MapCruncher utility. The Silverlight control does a reasonable job of displaying raster data.&amp;#160; I enhanced my sample to show a birds’ eye view, and allow pushpins...</summary>
    <author>
        <name>mike</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.igraphicsgroup.com/blog/">
        <![CDATA[<p>I continue to experiment with the Silverlight Virtual Earth control, as well as the MapCruncher utility.</p>  <p>The Silverlight control does a reasonable job of displaying raster data.&#160; I enhanced my sample to show a birds’ eye view, and allow pushpins to be added to the map.</p>  <p><a href="http://igraphicsgroup.com/silvermap/SilverMapTestPage.html" target="_blank">Sample</a></p>  <p>I used the MapCruncher to try and construct a mosaic from a set of raster data which I generated.&#160; Don’t misunderstand, for a Beta Product, it did a reasonable job with a handful of raster images, but when I tried to run a batch job with several thousand – not so good.</p>  <p>Part of the issue is that my test data is in an <em>interesting</em> projection.&#160; I have been using it to test my rendering pipeline, and never actually received the projection data.&#160; In any case, I <em>fudged</em> a projection function that looked reasonable.</p>  <p>After five attempts to run batches of images, I took a step back and just rendered a single huge PNG file for each map layer.</p>  <p>The results are pretty good.&#160; </p>  <p><img src="http://igraphicsgroup.com/blog/map_sample_2.png" width="428" height="256" /> </p>  <p>The primary negative is that the MapCruncher output is huge!&#160; My source data was 70MB.&#160; The MapCruncher data size was 850MB.</p>  <p>I would consider using MapCruncher for small amount of data, but nothing large.&#160; </p>  <p>For bigger raster datasets, I would consider using the ERDAS Image Web Server.&#160; I spotted a blog entry which has some <a href="http://demo.ermapper.com/gis/iws-serving-directly-into-google-earth-or-maps.aspx" target="_blank">asp.net files</a> that would allow IWS to handle Virtual Earth requests.</p>  <p>For my vector and polygon data, I would create a web service to generate raster data on demand for dynamic map layers.&#160; This would be fun, since I could change the display properties of the different objects types and simply re-render the map tile.</p>  <h3>Conclusion</h3>  <p>The Silverlight Virtual Earth control shows a great deal of promise for consumer, and light weight applications.&#160; I was easily able to generate custom raster base maps and load vector data via a web service.&#160; </p>  <p>Being forced to use the Mercator projection limits its usefulness for more traditional applications.</p>]]>
        
    </content>
</entry>
<entry>
    <title>Silverlight Mapping Component</title>
    <link rel="alternate" type="text/html" href="http://igraphicsgroup.com/blog/2009/08/silverlight_mapping_component.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.igraphicsgroup.com/blog-mt/mt-atom.cgi/weblog/blog_id=1/entry_id=23" title="Silverlight Mapping Component" />
    <id>tag:www.igraphicsgroup.com,2009:/blog//1.23</id>
    
    <published>2009-08-09T20:06:54Z</published>
    <updated>2009-08-09T20:14:39Z</updated>
    
    <summary>Now that I’ve gotten an idea on how to render data on the client, I’ve decided to take a look at the Silverlight Mapping Control. First, I needed the Virtual Earth Silverlight Map Control CTP. Then I downloaded the MapCruncher.&amp;#160;...</summary>
    <author>
        <name>mike</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.igraphicsgroup.com/blog/">
        <![CDATA[<p>Now that I’ve gotten an idea on how to render data on the client, I’ve decided to take a look at the Silverlight Mapping Control.</p>  <p>First, I needed the <a href="https://connect.microsoft.com/silverlightmapcontrolctp/Downloads" target="_blank">Virtual Earth Silverlight Map Control CTP</a>.</p>  <p>Then I downloaded the <a href="https://www.microsoft.com/maps/product/mapcruncher.aspx" target="_blank">MapCruncher</a>.&#160; This tool will translate raster data into the Virtual Earth Mercator projection.&#160; I used this with a PNG file I generated to make my sample content.&#160; MapCruncher requires that you to select the common points between your data and the Earth.&#160; Hopefully there is a way to automate this, as it would be quite tedious to go this by hand for 20,000 images!</p>  <p>The Map Control was very easy to use in my sample project; just add a reference, and the XAML code.&#160; </p>  <p>On startup, I set my initial view and add my LocationRectTileSource (which points to the data that I generated with the MapCruncher).</p>  <p>Note: most of this code was cut and paste from the Map Control SDK.</p>  <div class="csharpcode">   <pre class="alt"><span class="rem">// Create a Tile Layer that will display our custom Map Imagery Tiles</span></pre>

  <pre>var customTileLayer = <span class="kwrd">new</span> MapTileLayer();</pre>

  <pre class="alt">&#160;</pre>

  <pre><span class="rem">// Define the Bounding Rectangle</span></pre>

  <pre class="alt">LocationRect boundingRect = <span class="kwrd">new</span> LocationRect(</pre>

  <pre>    <span class="kwrd">new</span> Location(34.79576153, 139.35607910),</pre>

  <pre class="alt">    <span class="kwrd">new</span> Location(34.71226694, 139.45220947)</pre>

  <pre>);</pre>

  <pre class="alt">&#160;</pre>

  <pre>myMap.View = <span class="kwrd">new</span> MapViewSpecification(<span class="kwrd">new</span> Location(34.75, 139.4), 13);</pre>

  <pre class="alt">&#160;</pre>

  <pre><span class="rem">// Create a LocationRectTileSource</span></pre>

  <pre class="alt">LocationRectTileSource customTileSource = <span class="kwrd">new</span> LocationRectTileSource();</pre>

  <pre>&#160;</pre>

  <pre class="alt"><span class="rem">// Set the Uri for the custom Map Imagery Tiles</span></pre>

  <pre>customTileSource.UriFormat = <span class="str">&quot;http://…/Layer_NewLayer/{0}.png&quot;</span>;</pre>

  <pre class="alt">&#160;</pre>

  <pre><span class="rem">// Set the Min and Max Zoom Levels that the imagery is to be visible within</span></pre>

  <pre class="alt">customTileSource.ZoomRange = <span class="kwrd">new</span> Range&lt;<span class="kwrd">double</span>&gt;(0, 18);</pre>

  <pre>&#160;</pre>

  <pre class="alt"><span class="rem">// The bounding rectangle area that the tile overaly is valid in.</span></pre>

  <pre>customTileSource.BoundingRectangle = boundingRect;</pre>

  <pre class="alt">&#160;</pre>

  <pre><span class="rem">// Add the Tile Source to the Tile Layer</span></pre>

  <pre class="alt">customTileLayer.TileSources.Add(customTileSource);</pre>

  <pre>&#160;</pre>

  <pre class="alt"><span class="rem">// Set the Tile Layer Opacity to a desired value</span></pre>

  <pre>customTileLayer.Opacity = 1.0;</pre>

  <pre class="alt">&#160;</pre>

  <pre>myMap.Children.Add(customTileLayer);</pre>
</div>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>

<p>When the page opens, it shows my raster data.&#160; I left the Mode Selector enabled, to allow the Virtual Earth information to be shown as well.&#160; This data is *not* correctly geo-referenced, nor is it scaled.</p>

<p>View my sample <a href="http://igraphicsgroup.com/silvermap/SilverMapTestPage.html" target="_blank">Silverlight Mapping Tool</a>.</p>

<p><img src="http://igraphicsgroup.com/blog/silvermap.png" width="454" height="395" /> </p>

<p>It ran nicely on Windows and MacOS X; I haven’t tried it under Moonlight yet.</p>

<p>The Map SDK also offers the ability to overlay vector data.&#160; My next test will be overlaying polyline and push-pin data onto the raster map.</p>]]>
        
    </content>
</entry>
<entry>
    <title>Silverlight Text, Disappointing</title>
    <link rel="alternate" type="text/html" href="http://igraphicsgroup.com/blog/2009/08/silverlight_text_disappointing.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.igraphicsgroup.com/blog-mt/mt-atom.cgi/weblog/blog_id=1/entry_id=22" title="Silverlight Text, Disappointing" />
    <id>tag:www.igraphicsgroup.com,2009:/blog//1.22</id>
    
    <published>2009-08-07T03:16:20Z</published>
    <updated>2009-08-07T03:16:25Z</updated>
    
    <summary>I finally had a chance to see how Silverlight handled text data.&amp;#160; Right now, I’m not impressed. I have been unable to find a way (on the client side) to convert text to a path, so that I may render...</summary>
    <author>
        <name>mike</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.igraphicsgroup.com/blog/">
        <![CDATA[<p>I finally had a chance to see how Silverlight handled text data.&#160; Right now, I’m not impressed.</p>  <p>I have been unable to find a way (on the client side) to convert text to a path, so that I may render it onto my canvas.&#160; </p>  <p>Yes, I know about the TextBlock.&#160; But I can’t seem to figure out how to get it to use the same RenderTransform which works so nicely with my PolyLines.</p>  <p>My <strike>very gross</strike> solution for my sample is to store the original X, Y, and Height as DependencyProperties in the TextBlock.&#160; I choose this method, because I cannot derive from a sealed TextBlock class (thank you Silverlight .Net).</p>  <div class="csharpcode">   <pre class="alt"><span class="rem">// Add a Public Property to my TextBlocks</span></pre>

  <pre><span class="kwrd">public</span> <span class="kwrd">static</span> <span class="kwrd">readonly</span> DependencyProperty wxProperty = </pre>

  <pre class="alt">    DependencyProperty.Register(</pre>

  <pre>        <span class="str">&quot;wxProperty&quot;</span>, </pre>

  <pre class="alt">        <span class="kwrd">typeof</span>(Double), </pre>

  <pre>        <span class="kwrd">typeof</span>(TextBlock),</pre>

  <pre class="alt">        <span class="kwrd">new</span> PropertyMetadata(<span class="kwrd">null</span>));</pre>
</div>

<p>It seems that the more that I try to do with Silverlight, the more limitations I’m finding.&#160; I guess this is a good thing, as that was the goal of this project.</p>

<p>When I change the transform via a zoom or pan operation, I enumerate the children of the canvas and set the correct coordinates.</p>

<p></p>

<div class="csharpcode">
  <pre class="alt"><span class="rem">//  Transform the TextBlocks</span></pre>

  <pre>Point pnt = <span class="kwrd">new</span> Point();</pre>

  <pre class="alt">Point[] pntY = <span class="kwrd">new</span> Point[2];</pre>

  <pre>Double d;</pre>

  <pre class="alt"><span class="kwrd">foreach</span>(Object obj <span class="kwrd">in</span> myCanvas.Children)</pre>

  <pre>{</pre>

  <pre class="alt">    <span class="kwrd">if</span>(obj <span class="kwrd">is</span> TextBlock)</pre>

  <pre>    {</pre>

  <pre class="alt">        TextBlock tb = obj <span class="kwrd">as</span> TextBlock;</pre>

  <pre>        pnt.X = (Double)tb.GetValue(wxProperty);</pre>

  <pre class="alt">        pnt.Y = (Double)tb.GetValue(wyProperty);</pre>

  <pre>        pntY[0].X = 0;</pre>

  <pre class="alt">        pntY[0].Y = 0;</pre>

  <pre>        pntY[1].X = 0;</pre>

  <pre class="alt">        pntY[1].Y = (Double)tb.GetValue(whProperty);</pre>

  <pre>&#160;</pre>

  <pre class="alt">        pnt = trans.Transform(pnt);</pre>

  <pre>        pntY[0] = trans.Transform(pntY[0]);</pre>

  <pre class="alt">        pntY[1] = trans.Transform(pntY[1]);</pre>

  <pre>        d = pntY[1].Y - pntY[0].Y;</pre>

  <pre class="alt">&#160;</pre>

  <pre>        tb.FontSize = d;</pre>

  <pre class="alt">        tb.SetValue(Canvas.TopProperty, pnt.Y+d);</pre>

  <pre>        tb.SetValue(Canvas.LeftProperty, pnt.X);</pre>

  <pre class="alt">    }</pre>

  <pre>}</pre>
</div>
<style type="text/css">

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>

<p></p>

<p>I’ll make a class to hold the 3 Doubles with getter’s and setter’s and all that nice stuff later on.&#160; This was mostly a way to see how it would work.</p>

<p>I must admit, it does work.&#160; I suppose that the performance hit wouldn’t be too bad, since this is basically what the framework is doing when I change the transform.</p>

<p>In any case, my sample now renders text on top of the vector data. </p>

<p><img src="http://igraphicsgroup.com/blog/with_text.png" width="482" height="306" /></p>]]>
        
    </content>
</entry>
<entry>
    <title>Viewing Vector Data with Silverlight</title>
    <link rel="alternate" type="text/html" href="http://igraphicsgroup.com/blog/2009/07/viewing_vector_data_with_silve.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.igraphicsgroup.com/blog-mt/mt-atom.cgi/weblog/blog_id=1/entry_id=21" title="Viewing Vector Data with Silverlight" />
    <id>tag:www.igraphicsgroup.com,2009:/blog//1.21</id>
    
    <published>2009-07-31T22:55:24Z</published>
    <updated>2009-07-31T22:59:25Z</updated>
    
    <summary>I created some sample vector data to view with Silverlight.&amp;#160; It has 1329 (filled) polygons, and 5157 polylines (vectors). The Silverlight Test Application. Visually, it looks very nice.&amp;#160; Rendering performance seemed a bit slow though.&amp;#160; I’m not going to benchmark...</summary>
    <author>
        <name>mike</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.igraphicsgroup.com/blog/">
        <![CDATA[<p>I created some sample vector data to view with Silverlight.&#160; It has 1329 (filled) polygons, and 5157 polylines (vectors).</p>  <p>The <a href="http://igraphicsgroup.com/silver/silvertestpage.html">Silverlight Test Application</a>.</p>  <p>Visually, it looks very nice.&#160; Rendering performance seemed a bit slow though.&#160; I’m not going to benchmark it until I get text rendering working.</p>  <p>My cross platform testing was very encouraging!</p>  <ol>   <li>Windows x86 and x64 worked fine.</li>    <li>Mac OS X 10.5 worked the same as Windows, including the Install to Desktop.</li>    <li>Linux had issues with several of the APIs that I was using for OOB and Network detection.&#160; Once I removed them, the actual application code ran fine.&#160; But, the rendering speed was very poor.</li> </ol>  <p><img style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" border="0" src="http://igraphicsgroup.com/blog/silver_app.png" width="443" height="284" /> </p>  <p>The most recent head scratcher was the decision that Microsoft made to not allow the WebClient to get data from outside of the Domain.&#160; There are samples that show how to set up a proxy (using asp).&#160; But, strangely enough, nothing for developers who wish to use a different web server.</p>  <p>This isn’t a show stopper, just an aggravation.</p>]]>
        
    </content>
</entry>
<entry>
    <title>Silverlight as an Application Platform</title>
    <link rel="alternate" type="text/html" href="http://igraphicsgroup.com/blog/2009/07/silverlight_as_an_application_1.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.igraphicsgroup.com/blog-mt/mt-atom.cgi/weblog/blog_id=1/entry_id=20" title="Silverlight as an Application Platform" />
    <id>tag:www.igraphicsgroup.com,2009:/blog//1.20</id>
    
    <published>2009-07-30T19:56:01Z</published>
    <updated>2009-08-01T16:17:50Z</updated>
    
    <summary>I’m making a simple map data viewer to see how Silverlight handles it.&amp;#160; When this is complete I hope to have a reasonable understanding of the limits of Silverlight, XAML and the WPF implementation within Silverlight. I started by watching...</summary>
    <author>
        <name>mike</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.igraphicsgroup.com/blog/">
        <![CDATA[<p>I’m making a simple map data viewer to see how Silverlight handles it.&#160; When this is complete I hope to have a reasonable understanding of the limits of Silverlight, XAML and the WPF implementation within Silverlight.</p>  <p>I started by watching several of the videos on the <a href="http://silverlight.net/learn/videocat.aspx?cat=12#sl3">Silverlight Site</a>.&#160; These covered most of the basic issues that I had questions on:</p>  <ol>   <li>Out of Browser Mode </li>    <li>Disconnected Mode </li>    <li>Install to Desktop </li>    <li>Automatic Update of the Desktop </li> </ol>  <p>The current version of the Visual Studio 2008 Silverlight package makes it quite easy to add these functions.</p>  <p>I did run into an issue with the Moonlight Beta, when I added the Out-of-browser metadata to the XML, Moonlight didn’t like it.</p>  <blockquote>   <p>Could not parse element Deployment.OutOfBrowserSettings, attribute (null), error: Unknown element: Deployment.OutOfBrowserSettings.      <br />not implemented: (ErrorEventArgs.lineNumber)</p> </blockquote>  <h3>Test App Version 0.01</h3>  <p>As a starting point, I have a (very) small set of vector data.&#160; It exists in a bounding rectangle of 0,0, 1000,1000.</p>  <p>When the Application starts, I initialize a TransformGroup with a translate, scale, rotate and translate.</p>  <div class="csharpcode">   <pre class="alt">trans = <span class="kwrd">new</span> TransformGroup(); </pre>

  <pre>trans.Children.Add(<span class="kwrd">new</span> TranslateTransform()); </pre>

  <pre class="alt">trans.Children.Add(<span class="kwrd">new</span> ScaleTransform()); </pre>

  <pre>trans.Children.Add(<span class="kwrd">new</span> RotateTransform()); </pre>

  <pre class="alt">trans.Children.Add(<span class="kwrd">new</span> TranslateTransform()); </pre>
</div>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style><style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>

<p>I hook the Canvas OnSize event, and use that to adjust the transformgroup to ensure that my canvas “world” data is mapped into the canvas pixel space.&#160; There is likely a better way to handle this, but I haven’t found it yet. </p>

<div class="csharpcode">
  <pre class="alt">((TranslateTransform)trans.Children[0]).X = -1 * (wx <span class="rem">/* 1000 */</span> / 2); </pre>

  <pre>((TranslateTransform)trans.Children[0]).Y = -1 * (wy <span class="rem">/* 1000 */</span> / 2); </pre>

  <pre class="alt"><span class="kwrd">double</span> sx = myCanvas.ActualWidth / wx; </pre>

  <pre><span class="kwrd">double</span> sy = myCanvas.ActualHeight / wy; </pre>

  <pre class="alt"><span class="kwrd">double</span> s = Math.Min(sx, sy); </pre>

  <pre>((ScaleTransform)trans.Children[1]).ScaleX = s; </pre>

  <pre class="alt">((ScaleTransform)trans.Children[1]).ScaleY = s; </pre>

  <pre><span class="rem">// Skip rotation </span></pre>

  <pre class="alt">((TranslateTransform)trans.Children[3]).X = (myCanvas.ActualWidth / 2); </pre>

  <pre>((TranslateTransform)trans.Children[3]).Y = (myCanvas.ActualHeight / 2);</pre>
</div>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style><font size="2"><style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style></font>

<p><font size="2">I hope that there is a better way to cast the children!&#160; This is ugly.</font></p>

<p></p>

<p>When my data is added to the canvas, I assign my transform group to the objects RenderTransform.</p>

<div class="csharpcode">
  <pre class="alt">Line l = <span class="kwrd">new</span> Line(); </pre>

  <pre>[Set stroke and coords] </pre>

  <pre class="alt">l.RenderTransform = trans; </pre>

  <pre>myCanvas.Children.Add(l); </pre>
</div>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>

<p>So far, so good.&#160; When the canvas is resized, my transform is updated, and the data is rendered correctly.</p>

<p>Here is a link to my <a href="http://igraphicsgroup.com/silver/silvertestpage.html">Test Silverlight Application</a>.&#160; After it loads, press the “Load Data” button and resize the window to see the transform magic.</p>

<p>My next step is to generate some “real” data and see how quickly I can render a few thousand polygons.</p>]]>
        
    </content>
</entry>

</feed> 


