Choose Language Hide Translation Bar
Highlighted

Curlicue Fractals

Here is a fun example, if you like math. You have probably heard of fractals. There are many fractal sets today. One of these sets is called curlicue fractals. You can learn more about them in this MathWorld article. The article uses Mathematica and the Wolfram Language, which have many dedicated functions for lots of math, but you can build your own fractal demonstration in a JMP data table:

 

table.JPG

 

The θ and φ data columns use formulas to generate the recursive fractal angles. The formulas depend on a constant s, which is defined as a table variable so that you can easily view and change it. The constant s is initially equal to π, but you can change it to other famous mathematical and physical constants or any value that you like.

 

The distance between points is always 1.

 

The x and y data columns perform the conversion from polar to rectangular coordinates and apply the recursion relation. This version, like the article, uses 10,000 recursions, but you can use more or less recursions to change the shape.

 

Use the Curlicue Fractal table script to launch Graph Builder and visualize the fractal.

 

fractal.JPG

 

Note that if you change the value of the table variable, the formulas run to update the data columns. This change is automatically pushed to Graph Builder to make a new plot.

Learn it once, use it forever!
2 REPLIES 2
Highlighted
ian_jmp
Staff

Re: Curlicue Fractals

Nice! This makes it easier to change the value of the table variable and see the effect:

NamesDefaultToHere(1);

dt = DataTable("Curlicue Fractal.jmp");
sVal = dt << getTableVariable("s");

NewWindow("Curlicue Fractal Control",
	PanelBox("Move the slider to update the fractal",
		SliderBox(pi() - 0.3, pi() + 0.3, sVal, sliderScript);
		);
	);
	
sliderScript =
Expr(
	STV = Expr(dt << setTableVariable("s", sValTBD));
	SubstituteInto(STV, Expr(sValTBD), sVal);
	STV;
	);

 

Highlighted
G_M
G_M
Level III

Re: Curlicue Fractals

Very Cool!
Article Labels

    There are no labels assigned to this post.