unpolar and foci

Description

The unpolar variation is the opposite of polar2; see the polar description. Whereas polar2 treats the log-polar coordinates of a point as rectangular coordinates, unpolar treats the rectangular coordinates of a point and treats them as log-polar coordinates. It also inexplicably scales the result down by 2π. The author undoubtedly had a reason for doing this, but it generally makes the result too small. So a tip for using unpolar: as a starting point, change the amount from 1 to 6.28 (a rough approximation of 2π).

Name: foci
Type: 2D
Authors: Joel and Michael Faber

Name: unpolar
Type: 2D
Author: Michael Faber

Since it is the opposite of polar2, applying a final unpolar to a rectangular tiling should result in a log-polar tiling. And it does, but unfortunately, it isn’t quite that simple; it results in a mess!

Unpolar converts each row of circles into a ring of circles. But they don’t line up because the circles are one unit apart in the rectangular tiling but unpolar wraps them every 2π radians (the equivalent of 360°, one full rotation). We could fix this by adjusting the spacing in the tiling, but it’s more flexible to adjust the pre-affine triangle size. We first need to choose how many tiles we want in each ring; call it n. We then scale the pre-affine triangle by 2π/n. Let’s use 12 as an example. We compute 2π/12≈0.5236, and enter that into the X1 and Y2 boxes in the Affine tab. This makes the overlapping circles line up, resulting in the log-polar tiling we expect.

Unpolar converts horizontal lines into circles, so converts horizontal linear tilings into rings. Let’s use something more interesting than circles! The first image below uses dc_perlin and post_mirror_wf to make a base tile and two linears to tile it horizontally. For the second image, a final unpolar was added with amount 6.28 and X1 and Y2 set to 0.5236 as done above, converting the linear tiling into a ring. For the last image, we rotated the pre-affine triangle by 8°, showing another feature of unpolar: in converts diagonal lines into spirals.


The easiest way to use unpolar is as the variation in a final transform. If the flame is not tiled, we don’t need to worry about lining up the tiles for unpolar; we can scale by any amount to get a nice result. This works especially well with flames that have strong horizontal lines. The first image below is made with splits and two elliptic transforms. For the second image, we add a final with unpolar, and simply shrink the triangle a bit. This turns the horizontal lines into circles and arcs. For the third image, we rotated the triangle as well as moving and further scaling it to get an interesting albeit somewhat messy result.


The Foci and Unpolar Tutorial by pillemaster uses unpolar on a final transform with a rectangular grid for a similar effect. Since the tiling is precise, it is possible to use exact values to scale and rotate the final unpolar to make everything line up exactly. However, the tutorial does not follow the tip above to change the unpolar amount to 6.28. Since the result is based on a log-polar grid, the pattern is the same when it is zoomed out. However, using the tip and increasing the unpolar amount to 6.28 will zoom in and result in a better color distribution.

Here is an example flame made using that tutorial and tweaked a bit.

That tutorial also works for foci, which does the same thing as unpolar but uses bipolar coordinates; see the bipolar description. Like unpolar, the pre-affine transform needs to be scaled by 2π/n to make things line up. But unlike unpolar, foci doesn’t scale down the result, so the amount should not be scaled by 2π. Here is foci applied to the rectangular tiling shown above, with X1 and Y2 both set to 0.5236 as we did with unpolar. The result is a bipolar tiling.

For comparison, here is the same flame made using the Foci and Unpolar Tutorial, but with the variation on the final transform changed to foci (and the amount changed from 6.23 to 1 since scaling is not needed or wanted using foci).

As shown above, unpolar converts a linear tiling into a ring. This is the basis for the popular Circular Flame Tutorial, also by pillemaster. It has two JWildfire adaptations, one by Naomi Richmond and one by Brad Stefanov. The idea is to create a linear tile, use unpolar to bend it into a ring, then use the ring to make something interesting. But using unpolar as a final to make the ring as we did above won’t let us further use the ring; we need to put unpolar in a normal transform and use xaos to direct the linear tile to the unpolar transform, and then to direct the resulting ring into whatever we will use to make the final result. This process is explained in the tutorial.

Note that the tutorial increases the post transform for the unpolar by 628.308%. This is almost 2π, and has the same effect as setting the variation value to 6.28308 following our tip above. This technique is most commonly used with glynnSim3, where the ring conveniently fills the space left by that variation. But other variations can be used instead. Pay attention to the draw mode of the unpolar transform; it controls whether the original ring is visible. Leave it normal to show the ring, which is typically how we use it with glynnSim3. Set it to hidden to hide the ring, which is typically what we want when using other variations.

Let’s use lazysusan on the last transform. If we set all of the parameters to 0, it is the same as linear. We can then shrink the pre-affine triangle slightly, then move and rotate it to spiralize the ring. Next, we change the lazysusan twist and spin parameters to distort things, and the x and y parameters to change the effect. Increase space slightly to add some lines. Here, the variations on the first two transforms is changed to crackle and exblur.

The original pillemaster tutorial creates a base flame after step 4. It then goes on in step 5 to show one way to tweak it. That part is optional; there are many ways to tweak the base circular flame. But if you want to replicate pillemasters result from step 5, step 5.2 is hard to convert to JWildfire. The values shown are for the Apophysis “Triangle” tab, which does not exist in JWildfire. Here are the correct values to use on the Affine tab: For the pre-affine transform (Post TF not selected), use X1=1, Y2=1, O2=01, the rest 0. For the post-affine transform (Post TF selected), use X1=-1, Y2=1, O2=1, the rest 0.

Using foci instead of unpolar in this tutorial doesn’t produce a neat ring (so won’t fill a glynnSim3), but it can still have interesting results. Be sure to reset the post-transform for the foci to remove the scaling by 2π needed only for unpolar. This image uses the same base as the above, but with unpolar changed to foci and using spherical to iterate the result.

Parameters

variation amountScale factor for the output. Suggested starting values are 6.28 for unpolar and 1 for foci.

Resources

Foci and Unpolar Tutorial by pillemaster.
Circular Flame Tutorial by pillemaster.
Walkthrough of Circular Flame Tutorial by Tatyana Zabanova.
JWildfire Adapation of Circular Flame Tutorial by Brad Stefanov.
JWildfire Adaptation of Circular Flame Tutorial by Naomi Richmond.
Flame pack (flames used above)

Related Posts

You may be interested in ...

1 thought on “unpolar and foci”

Leave a Comment