Octagon Limit I
From Ultrafractal Wiki
Octagon Limit I is a Transformation in sam.uxf.
Contents |
What is it?
This is a transformation that reproduces the tiling pattern used by Escher in his "Square Limit" work. Escher introduced some "irregularities" in the tiling in order to get a square. So the shape obtained is an octagon. The code is completely messy. I tried to rewrite a more logical and natural version, but it didn't work anymore, so I decided to keep it so...
How to start?
First, choose the "Pixel" formula in mt.ufm and the "Gradient" coloring in standard.ucl. Set the location to a point close to zero, but not zero, because, there are some problem when the transform is applied to an integer. Set for instance (0.00001234, 0.0000000998756) or anything like that. Then load the transform. Select then Mode -> Shape Only. You should see a triangle. Now you can modify this shape. You can only modify the bottom side of the triangle, the other sides will be modified in order to make the tiling possible. This bottom side is the segment (0,0)-(1,0). So to modify the shape, select the parameter "Point 1". Take the eyedropper and set it above or below the bottom segment of the triangle. You will see that the shape has changed. Now take the parameter "Point 2" and do the same. You have ten points to play with. Try not setting points too far from the bottom segment because else the shape risks intersecting iteself and you'll get strange things. Once you're satisfied with your shape, go back to the "mapping" mode. This mode cuts a tile in the underlaying image and build the octagon with this tile. The "Color" mode allow you to make more Escher-like images. This mode assign the same point to all the points belonging to one tile and each tile is assigned a different point from the neighbouring ones. So, if in the underlaying formula, these points are colored with a different color, the tiles will look differently colored. Use this with the Gradient coloring. You have three colors available and you can choose which three points are assigned to the tiles with the Color 1,2,3 parameters. The parameters "Center", "Rotation" and "Magnification" must be used with the Mapping mode and allow you to choose which part of the underlaying image is mapped on the tile. The remaining modes (like "Tile 1 solid", "Tile 2 and 3 solid") enables you to set some tiles to solid color while the remaining ones are computed as in the mapping mode. This allow you to make tiles that look really different from each other.
I have written two colorings especially designed to be used with this transformation : Gradient for Octagon Limit and Octagonal Gradient.
The Parameters
Mode
"Mapping" is the standard mode. It will map a part of the underlying image on each tile. "Shape Only" displays only one tile and is useful to choose the its shape (see the tutorial above). The "Color" mode color the pattern with three colors. These colors are the colors of the underlying image at the points specified with the "Color 1/2/3" parameters. The six remaining modes allow you to set some tiles to solid color, while the other ones behave as in the "Mapping" mode.
Number of iterations
This transform use an iterative algorythm to generate the pattern. You may want to increase this parameter if you zoom a lot and remark strange things near the borders.
Center/Rotation/Magnification
To choose which part of your image will be mapped on the tiles.
Point 1/.../10
Ten points which define the shape of the tiles (see the tutorial above).
For the formula writers
Here are some explanations about how it works : The idea is to perform iterative transformations so that any point that finally belongs to a tile ends on the tile you see when you set the Shape only mode. So after having set the first symetry (of order 4), the first shape is bailed out. This gives the four central tiles. Now you see that there are two smaller ones adjacent to one of it. So I have to perform a transformation (depending on where the pixel currently calculated is) to set the little shape exactly one the big one (it's just a combination of translation, rotation and magnification). And now you have the smaller tile ready to be bailed out by the same algorithm that bailed out the bigger one. You just have to iterate the process. Actually, the formula to draw the figure when the base tile is a simple triangle (the default shape) is rather simple. All the complications arise when you do this with an arbitrary shape. The Koch Curves use a similar algorithm.
Examples
Copyright 2000 Samuel Monnier
octlim2 {
; Copyrights 2000 S. Monnier
; http://www.crosswinds.net/~s31415/index/index.htm
fractal:
title="octlim2" width=400 height=400 author="Samuel"
created="January 16, 2000" numlayers=5
layer:
method=multipass caption="New Layer 4" opacity=100 visible=yes alpha=no
mergemode=overlay
mapping:
center=0.0123961772727272736/-0.00217272727272727264
magn=0.916666666666666624 angle=0
formula:
filename="mt.ufm" entry="mt-pixel" maxiter=100 percheck=normal
p_inside=no
inside:
transfer=none repeat=yes
outside:
filename="dmj.ucl" entry="dmj-fBm" transfer=linear repeat=yes
p_offset=0/0 p_scale=0.3 p_angle=0 p_step=0.5 p_anglestep=37 p_octaves=7
p_power=2
gradient:
smooth=no numnodes=2 index=98 color=16777215 index=290 color=0
layer:
method=multipass caption="New Layer 3" opacity=100 visible=yes alpha=yes
mapping:
center=0.0123961772727272736/-0.00217272727272727264
magn=0.916666666666666624 angle=0
formula:
filename="mt.ufm" entry="mt-pixel" maxiter=100 percheck=normal
p_inside=no
inside:
transfer=none repeat=yes
outside:
filename="sam.ucl" entry="OctogonalGradient" density=0.200000000000000011
transfer=linear repeat=yes p_angle=26.6
gradient:
smooth=no numnodes=1 index=211 color=6052956
alpha:
smooth=yes numnodes=4 index=34 alpha=0 index=49 alpha=255 index=232
alpha=255 index=233 alpha=0
layer:
method=multipass caption="New Layer 7" opacity=100 visible=yes alpha=no
mergemode=hardlight
mapping:
center=0.0123961772727272736/-0.00217272727272727264
magn=0.916666666666666624 angle=0 numtransforms=1
transform:
filename="sam.uxf" entry="OctogonLimitI" p_mode="Mapping" p_niter=30
p_center=0/0 p_rot=0 p_magn=1
p_colpoint1=-0.546666666666666688/1.17333333333333328 p_colpoint2=1/0
p_colpoint3=2/0 p_p1=0.206666666666666656/0.4 p_p2=1/0 p_p3=1/0 p_p4=1/0
p_p5=1/0 p_p6=1/0 p_p7=1/0 p_p8=1/0 p_p9=1/0 p_p10=1/0
formula:
filename="mt.ufm" entry="mt-pixel" maxiter=100 percheck=normal
p_inside=no
inside:
transfer=none repeat=yes
outside:
filename="Standard.ucl" entry="Gradient" density=2 transfer=linear
repeat=yes p_type="Linear"
gradient:
smooth=no numnodes=3 index=41 color=11184810 index=42 color=15395562
index=206 color=1381653
layer:
method=multipass caption="New Layer 2" opacity=100 visible=yes alpha=no
mergemode=overlay
mapping:
center=0.0123961772727272736/-0.00217272727272727264
magn=0.916666666666666624 angle=0 numtransforms=1
transform:
filename="sam.uxf" entry="OctogonLimitI" p_mode="Mapping" p_niter=30
p_center=0/0 p_rot=0 p_magn=1
p_colpoint1=-0.546666666666666688/1.17333333333333328 p_colpoint2=1/0
p_colpoint3=2/0 p_p1=0.206666666666666656/0.4 p_p2=1/0 p_p3=1/0 p_p4=1/0
p_p5=1/0 p_p6=1/0 p_p7=1/0 p_p8=1/0 p_p9=1/0 p_p10=1/0
formula:
filename="mt.ufm" entry="mt-pixel" maxiter=100 percheck=normal
p_inside=no
inside:
transfer=none repeat=yes
outside:
filename="dmj.ucl" entry="dmj-fBm" density=2 transfer=linear repeat=yes
p_offset=0/0 p_scale=0.3 p_angle=0 p_step=0.5 p_anglestep=37 p_octaves=7
p_power=2
gradient:
smooth=no numnodes=3 index=29 color=16777215 index=318 color=16777215
index=353 color=0
layer:
method=multipass caption="New Layer 1" opacity=100 visible=yes alpha=no
mapping:
center=0.00739617727272727296/-0.00717272727272727296
magn=0.916666666666666624 angle=0 numtransforms=1
transform:
filename="sam.uxf" entry="OctogonLimitI" p_mode="Color" p_niter=30
p_center=0/0 p_rot=0 p_magn=1
p_colpoint1=-0.546666666666666688/1.17333333333333328 p_colpoint2=1/0
p_colpoint3=2/0 p_p1=0.206666666666666656/0.4 p_p2=1/0 p_p3=1/0 p_p4=1/0
p_p5=1/0 p_p6=1/0 p_p7=1/0 p_p8=1/0 p_p9=1/0 p_p10=1/0
formula:
filename="mt.ufm" entry="mt-pixel" maxiter=100 percheck=normal
p_inside=no
inside:
transfer=none repeat=yes
outside:
filename="Standard.ucl" entry="Gradient" density=2 transfer=linear
repeat=yes p_type="Linear"
gradient:
smooth=no numnodes=3 index=0 color=254 index=200 color=49150 index=268
color=16673280
}
Copyright 2000 Samuel Monnier
ol7 {
; Copyrights 2000 S. Monnier
; http://www.crosswinds.net/~s31415/index/index.htm
::Qkw3cin2trVyOOuNQ07Gw/DC+e7m7LTguMHygAMJ5QP3DUsptZi2gEdv83niSULd7uHPjhn0
Ox6iBZxlqIrqe6RaupKZlLJ9DznFF5suUT8iiU5ioHsrd7iFIU0Ojd7OXTx0knMV1xYaUlpu
IdvzWkHjRIkf0rqMrtu64F3lkt3k+TkbJybJQjLmPrZgN6YVSZzoW8bmHi+sXcEmuIqoMZl1
9UMK6ebt9PBzIvIKzUt1kVs2EXcvpCmD/EkZc7KWHntP1ZLTqrjcVJ51lJVmcX8Tm65zySKL
t5bbVHI1UFjWiAzkSlMKXphfpSxtgQkgj4dyEUKmTa0Ry2cYMKmUrEcGSylCCHpURJ5bBbjI
RtqdTRVGsfMfWftGtC7N21waZjN1knkB7p1JZL3/4mFRg9U9U8ifflrYbR+ntZW3vswPmy/o
Zlu4LwYqjogmWHhjuz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