<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Creating Voronoi Diagrams in JMP or JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Creating-Voronoi-Diagrams-in-JMP-or-JSL/m-p/55257#M31246</link>
    <description>&lt;P&gt;Nice example!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and discussion here:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/85275/how-do-i-derive-a-voronoi-diagram-given-its-point-set-and-its-delaunay-triangula" target="_blank"&gt;https://stackoverflow.com/questions/85275/how-do-i-derive-a-voronoi-diagram-given-its-point-set-and-its-delaunay-triangula&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Apr 2018 11:55:56 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2018-04-19T11:55:56Z</dc:date>
    <item>
      <title>Creating Voronoi Diagrams in JMP or JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-Voronoi-Diagrams-in-JMP-or-JSL/m-p/55245#M31236</link>
      <description>&lt;P&gt;Hi all, I'd like to create a Voronoi diagram within the JMP environment. I have a set of point coordinates (X &amp;amp; Y) that are located within the same plane (Z). I'd like a way to show the density of the points per unit area. A Voronoi diagram would be one way to accomplish this. It shows the boundary around the point which is defined by half-way between the euclidean distance between that point P1 and the next point Pn.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is Wikipedia's definition:&amp;nbsp;&lt;A href="https://en.wikipedia.org/wiki/Voronoi_diagram" target="_blank"&gt;https://en.wikipedia.org/wiki/Voronoi_diagram&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are instructions for creating&lt;A href="https://www.mathworks.com/help/matlab/ref/voronoi.html" target="_self"&gt; this type of diagram in MATLAB&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 15:18:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-Voronoi-Diagrams-in-JMP-or-JSL/m-p/55245#M31236</guid>
      <dc:creator>thisismiller</dc:creator>
      <dc:date>2018-04-19T15:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Voronoi Diagrams in JMP or JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-Voronoi-Diagrams-in-JMP-or-JSL/m-p/55255#M31244</link>
      <description>&lt;P&gt;I am not an expert in this area, however, I recalled reading that JMP Triangularization is an implementation of the Delaunay triangularization which is the "dual" of Voroni. I do not have the algorithms for computing the "dual" plot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attached is a sample data set called voroni.jmp that I created to emulate a set of points that are found in several Voroni training documents ( see &lt;A href="http://cgl.uni-jena.de/pub/Workshops/WebHome/cgl12new.pdf" target="_self"&gt;http://cgl.uni-jena.de/pub/Workshops/WebHome/cgl12new.pdf &lt;/A&gt;).&amp;nbsp; The&amp;nbsp; attached PNG file shows the "dual" relationship of Voroni plots and Delaunay tesselation (triangularization).&amp;nbsp; This attached jmp file has several data table scripts attached. I tested them in JMP 12,13 and 14.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run each of the table scripts that create graphs. Since you are intrerested in density per unit area, look at the graph Density of Y By X then use the inverted red triangle menu to select a Mesh Plot for a 3D view of density. These views might meet your need or be more informative regarding density.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the density plots will not serve your purpose and you are still interested in Voroni plots, you can get them from the deldir R package:&amp;nbsp; see&amp;nbsp;&lt;A href="https://flowingdata.com/2016/04/12/voronoi-diagram-and-delaunay-triangulation-in-r/" target="_self"&gt;https://flowingdata.com/2016/04/12/voronoi-diagram-and-delaunay-triangulation-in-r/&lt;/A&gt;&amp;nbsp; &amp;nbsp;Since JMP does have nearest neighbor and distance algorithms, maybe someone will provide this blog with the necessary steps ( or JSL), to create Voroni diagrams.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your question motivated me to test the JMP Triangularization method and verify it produces the "classic" results ... after the X and Y coordinates were standardized. [ thanks! ]&amp;nbsp; The attached JSL has steps for drawing the triangles.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Delaunay_Voroni.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/10445i7D0406AAB313E1EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Delaunay_Voroni.png" alt="Delaunay_Voroni.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 14:59:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-Voronoi-Diagrams-in-JMP-or-JSL/m-p/55255#M31244</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-04-19T14:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Voronoi Diagrams in JMP or JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-Voronoi-Diagrams-in-JMP-or-JSL/m-p/55257#M31246</link>
      <description>&lt;P&gt;Nice example!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and discussion here:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/85275/how-do-i-derive-a-voronoi-diagram-given-its-point-set-and-its-delaunay-triangula" target="_blank"&gt;https://stackoverflow.com/questions/85275/how-do-i-derive-a-voronoi-diagram-given-its-point-set-and-its-delaunay-triangula&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 11:55:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-Voronoi-Diagrams-in-JMP-or-JSL/m-p/55257#M31246</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2018-04-19T11:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Voronoi Diagrams in JMP or JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-Voronoi-Diagrams-in-JMP-or-JSL/m-p/55279#M31257</link>
      <description>&lt;P&gt;Hi gzmorgan0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a great start! Thank you for your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did previously play around with the nonparametric density plots, but I wasn't sure this was providing the results I need. Your post helped me to find the right documentation to explain the nonpar density plots mathematically. I'm sharing that definition below. Now that I've read about it, I am still concerned.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Nonpar Density estimates a smooth nonparametric bivariate surface that describes the density
of data points. The plot adds a set of contour lines showing the density (Figure 5.16). The
contour lines are quantile contours in 5% intervals. This means that about 5% of the points
generated from the estimated nonparametric distribution are below the lowest contour, 10%
are below the next contour, and so on. The highest contour has about 95% of the points below
it.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The contours are nice, but they are only splitting the points into equal quantiles. They don't necessarily show how evenly spread the points are within my area. I've attached an example of a data point array to try to convey my point. Do these contours each represent an equal amount of &lt;U&gt;surface area&lt;/U&gt;?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A few&amp;nbsp;follow-up questions:&lt;/P&gt;&lt;P&gt;(1) Is there a way to take the nonpar contour data and manipulate it to show the density per unit area? Maybe this is what the "save density grid" option does from the red triangle menu within quantile density.&amp;nbsp;&lt;/P&gt;&lt;P&gt;(2) Can I use a different color theme? I am strongly opposed to the spectrum color theme. However, the &lt;FONT color="#3366FF"&gt;color theme()&lt;/FONT&gt; function doesn't work within &lt;FONT color="#3366FF"&gt;nonpar density() &lt;FONT color="#000000"&gt;on JMP13.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#000000"&gt;(3) Can you help me to extend the Delaunay triangulation to actually show the Voronoi diagram? I'm not comfortable with the math myself.&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 22:24:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-Voronoi-Diagrams-in-JMP-or-JSL/m-p/55279#M31257</guid>
      <dc:creator>thisismiller</dc:creator>
      <dc:date>2018-04-19T22:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Voronoi Diagrams in JMP or JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-Voronoi-Diagrams-in-JMP-or-JSL/m-p/55339#M31303</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First of all sorry for the misspelling of Voronoi, old eyes. I am not sure what question you are trying to answer. I think you might be looking for a density or clustering pattern on a wafer map, given the circular picture with a 150 mm radius. I have experience with semiconductor manufacturing data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;JMP has many clustering methods and since JMP12 provides several spatial pattern methods, including one that can cluster wafers based upon pattern similarities.&amp;nbsp; The script below opens a JMP sample data table representing 125 wafer with different defect density and classifies/clusters the wafers by patterns. It can do it for 1 wafer as well.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);

dt = Open("$sample_data/Wafer Stacked.jmp");

dt &amp;lt;&amp;lt; run script( "Spatial Cluster of Defects");

spWin = Window("Wafer Stacked - Hierarchical Cluster of Defects");
spClust = (spWin&amp;lt;&amp;lt; child)&amp;lt;&amp;lt;child;
dendro = spClust &amp;lt;&amp;lt; Xpath("//OutlineBox[@helpKey='Clust Dendro']");
dendro &amp;lt;&amp;lt; Close(0);
//scroll down grab the diamond and move to the left or right to see the clustering change.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I tackled this task because I have been trying to learn more about generating 3D terrains using opengl which has mesh methods. However, I do not know enough about them yet. I decided to tackle craeteing the dual Voronoi graph because spatial geometry is an interest of mine. As stated in my first reply, JMP Triangularization (can be found in the Help &amp;gt; Scripting Index under objects) creates the Delaunay traingularization and also provides messages to get, triangles, points and edges.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I expanded my script to compute the Voronoi dual graph. I have not tested performance for dense points; many of the websites with alternate algorithms and approximations deal with performance. Using the pseudo code reported at the link Craig Hales provided, I created a script. I have only tested it on the single example data table. By the way that data&amp;nbsp; table was generated by copyiong the picture from the link, using it as a background in an XY graph and using mousetrap to capture the coordinates as i clicked on the vertices. You'll note the left most point is a little more left than the original. [yes JMP provides numerous tools to tackle a task.]&amp;nbsp; The new script seems to do the job.&amp;nbsp; It is not application ready, uses&amp;nbsp; a square frame, not a circular wafer, and it standardizes the points (so centered between +/-3 in X and Y).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The script&amp;nbsp; includes a file &lt;STRONG&gt;&lt;EM&gt;LCombine.jsl&lt;/EM&gt;&lt;/STRONG&gt; (one of the scripts from "JSL Companion Applications of the JMP Scripting Language, 2nd Ed."). It is attached. You will need to change the path in the attached script to the directory where you saved it. I attached the picture generated by the script. It was tested in JMP 12, 13 and 14.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can narrow down the task, like what you want to do with the Voronoi graph or clusters, it would be helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is not high on my list, but I do believe opengl mesh methods might be able to create a Voronoi graph. I need to do more learning/exploring before saying anything definitively.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="voronoi diagram with JMP" style="width: 406px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/10490iE684635FD78153AD/image-size/large?v=v2&amp;amp;px=999" role="button" title="jmp_voronoi.png" alt="voronoi diagram with JMP" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;voronoi diagram with JMP&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 00:22:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-Voronoi-Diagrams-in-JMP-or-JSL/m-p/55339#M31303</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-04-25T00:22:00Z</dc:date>
    </item>
  </channel>
</rss>

