SVG to Laser Cutter
small Penrose tiling Use Save as SVG to create a design for a laser cutter.
small Penrose tiling Use Save as SVG to create a design for a laser cutter.
inspired by Is there a way to extract columns used in a formula? and Ian@JMPcomment.
dt = New Table( "Get Columns in Formula",
Add Rows( 20 ),
New Column( "H", Numeric, "Continuous", Format( "Best", 12 ), Formula( Random Uniform() ) ),
New Column( "W", Numeric, "Continuous", Format( "Best", 12 ), Formula( Random Uniform() ) ),
New Column( "D", Numeric, "Continuous", Format( "B...
Transform Use JSL to scrape images from Twitter and experiment with an FFT to cross fade the images.
DavidK asked about drawing the ellipses around data points. I struggled through this a while back and this is a summary of what I puzzled out with help from people that actually know what they are doing. All the mistakes here are mine, comments and corrections welcome! This picture is the output from Bivariate, produced at the very end of the script. The goal of the script is to calculate the pa...
A bunch of JMP character functions appeared in a previous post: length, substr, contains, etc. They are great for simple things, and you could do hard things with them if you wanted to. But Regex might be better.
Regex, short for Regular Expression, is a powerful JSL function for manipulating text.
result = regex( sourceText, searchPattern, replaceTemplate, options );
(There are two other functio...
Simple Find and Replace
JMP's scripting language, JSL, can store numbers, strings, and other objects in variables. A string assignment might look like this:
place = "Cary, North Carolina, USA";
the variable place now holds the string. Here's a set of functions for working with strings in JSL. Place will keep that same string in all the examples. Regex and Pattern Matching are covered in later po...
Valentine's day coincides with Doomsday this year. Again.
The Doomsday rule is neat, here's a JSL snippet to illustrate part of the idea.
For( year = 1901, year <= 2099, year++, // 1900 was not a leap year and 2100 won't be
really =
Day Of Week( Date DMY( if(mod(year,4),3,4), 1, year ) ) == // 3rd day of January, 3 years out of 4
Day Of Week( Date DMY( if(mod(year,4),28,29), 2, year ) ) ...
Here's some JSL to operate FTP through JMP 11's RunProgram function. More about RunProgram below.
// this example is specific to Windows because of FTP and RunProgram issues
// you'll need to supply a proper site to open and replace
// anonymous... with proper credentials.
// for the example, build a "junk" directory in the temp folder
temp = Convert File Path( "$TEMP", windows ) || "junk"; // no ...
Coming back from the eclipse You can set your phone to add GPS data to pictures.
GPS Uncertainty Fixing a data collection mistake. Video too.
Xan posted very cool code to read JSON data into JMP. Xan noted the JSL was slow loading large JSON files; here's a look at some replacement JSL to make it faster. (JSON is better suited for small objects, but if you must load 100K or more, this will help.) Xan's original code has a parsing routine to read the JSON string a character at a time: the variable pos walks through the length of t...
Using the kites and darts from part 2, make a 3D surface. Some of the Scene3D code was borrowed from some of the examples that ship with JMP. This JSL was written to make the video clip. Buried in it are some scaling and animation controlling values, tweaked to make the video just right. There is also a path to a directory on the desktop that will be filled with numbered bitmaps. Part 4 will expl...
In part 1 the penrose tiling generator stored its results in a data table. The graph in part 1 contained lines of different gray levels, indicating how many times each line was drawn. The tiles are not emitted from the generator as polygons, just a bunch of loose and repeated edges. Part 2 JSL won't be using the data table; instead an associative array will collect the line segments using their...
Here's the first part of the code for the video in the previous post. This is a straight-forward translation/conversion of the reference. The generator recursively subdivides the starting space, using a set of rules that make a valid Penrose tiling. Sorry, can't explain the rules, just the code to apply them.
// http://martinpblogformasswritingproject.blogspot.com/2011/06/penrose-tiling-in-pyp...
Overlapping red, green, blue rings Using Associative Arrays as sets. Intersect, Union, Difference.
Animated gif of Gosper's glider gun, tilted 30 degrees JSL to power a glider gun
Apollonian circles video of Apollonian Gasket and code to make your own