Chris Mc on Twitter is kind of amazed that a rather sophisticated graph like Julia Set can be generated using only 8 rows of data.
OMG EIGHT rows of data !!!! I've often thought of doing this, just never got around to trying.— Chris Mc (@cmcau) March 2, 2018
In visualizing math functions, usually we can use a fairly small data set as seed, such as 2 rows for one dimensional graphs or 8 rows for 3 dimensional graphs. The rest of data can be derived via data densification, a special tool in Tableau.
Basically the data densification allows us to create an indexed grid along each of the dimensions, on which the math functions will be drawn.
Usually we need 2^N rows of data as seed to create a N-dimensional data grid. For example, for a 3-d grid, we would start with a seed table of 8 rows like:
- Create 2 rows in a single columns: (the other columns are all calculated fields.)
- Seed
- 1
- 2
- Case [Seed]
- When 1 then 1
- When 2 then [points]
- End
- Create bins for each of x_base, y_base, z_base with step size 1.
- Drag x_base(bin), y_base(bin), z_base(bin), to the Details shelf. These bins are the bases for data densification.
- Create Index() and drag it to the Details shelf. Set it to compute along all dimensions: x_base(bin), y_base(bin), z_base(bin). This will trigger the data densification in all 3 dimensions. This is the most consistent way to do it. It took a while for me to figure this out because it can be tricky to trigger the densification.
Voila the above are the essential steps for creating a 3-dimensional grid through data densification. The size of each dimension can be fixed or dynamic.
See examples in creating the Julia set and Mandelbrot set.
Conclusion
For visualizing mathematical functions, all you need is 2 rows of data as seed. You can derive the rest. A great benefit of this approach is being able to use parameters to explore various combinations, because we can create data sets on the fly.
Add a comment