Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
developer:sdksamples:2dcirclepacking [2016/03/16]
sandy
developer:sdksamples:2dcirclepacking [2016/03/22] (current)
sandy
Line 1: Line 1:
-====== Sample: Circle Packing ​Plugin ​(VB.NET) ====== +====== Sample: Circle Packing ​Plug-in ​(VB.NET) ======
-> **Summary:​** //A basic 2D circle packing plugin for Rhino 4//+
  
-This plugin was made during the London 2007 DotNET workshop. It is a very simple ​circle packing ​algorithm which iteratively attempts to find a solution.+> **Summary:​** //A basic 2D circle packing ​plug-in for Rhino 4//
  
-The command exposes several options, but there are no advanced features yetThe essential source code (VB.NET) ​is also available from this wiki page.+This plug-in was made during the London 2007 DotNET workshopIt is a very simple circle packing algorithm which iteratively attempts to find a solution.
  
-This example ​plugin ​showcases some Rhino SDK basics such as [[developer:​opennurbs:​home|openNURBS]] class inheritance and using Getters. It also provides a simple example of using display conduits to draw feedback geometry.+The command exposes several options, but there are no advanced features. The essential source code (VB.NET) is also available from this wiki page. 
 + 
 +This example ​plug-in ​showcases some Rhino SDK basics such as [[developer:​opennurbs:​home|openNURBS]] class inheritance and using Getters. It also provides a simple example of using display conduits to draw feedback geometry.
  
 [[http://​wiki.mcneel.com/​_media/​legacy/​en/​CirclePackingPlugin.zip|Download the plug-in (Rhino 4).]] [[http://​wiki.mcneel.com/​_media/​legacy/​en/​CirclePackingPlugin.zip|Download the plug-in (Rhino 4).]]
Line 20: Line 21:
  
 ---- ----
-\\ 
  
 How the algorithm works: Every circle in the array is compared with all circles that have a higher index. When two circles overlap (when the distance between A and B is less than the sum of both radii) then the A circle is moved away from B (V is the translation vector), until they are touching. How the algorithm works: Every circle in the array is compared with all circles that have a higher index. When two circles overlap (when the distance between A and B is less than the sum of both radii) then the A circle is moved away from B (V is the translation vector), until they are touching.
Line 30: Line 30:
 \\ \\
  
-Before the collision test is performed, the entire array containing all circles is sorted from the center outwards. After every collision pass, the circles move towards the basepoint to reduce the amount of wasted space. The magnitude of this motion decreases exponentially as the algorithm progresses. This plugin ​comes with four different packing algorithms. The details of each differ slightly from the default behavior (Fast packing) described above.+Before the collision test is performed, the entire array containing all circles is sorted from the center outwards. After every collision pass, the circles move towards the basepoint to reduce the amount of wasted space. The magnitude of this motion decreases exponentially as the algorithm progresses. This plug-in ​comes with four different packing algorithms. The details of each differ slightly from the default behavior (Fast packing) described above.
  
-\\ 
-\\ 
  
----- 
-\\ 
-\\ 
  
 | {{:​legacy:​en:​FastPack.png}} | {{:​legacy:​en:​DoublePack.png}} | | {{:​legacy:​en:​FastPack.png}} | {{:​legacy:​en:​DoublePack.png}} |
developer/sdksamples/2dcirclepacking.txt · Last modified: 2016/03/22 by sandy