Koch Curve
From Ultrafractal Wiki
Koch Curve is a Fractal Formula in sam.ufm.
What is it?
This formula draws the Koch Curve, one of the most famous fractal. Depending on which default gradient you have, the Koch Curve may appear all black when you load the formula. Just slide the gradient.
Parameters
With the "Inside" mode, the inside of the Koch Curve will be assigned the outside coloring. With the "Ouside" mode, the outside of the Koch Curve will be colored outside. With the "Both" mode, all the points are outside.
The "Offset" parameter has no effect on the formula, but can be used to "fool" a coloring algorithm. Load for instance "Final Decomposition" in dmj.ufm, modify the offset parameter and observe the results...
Maybe the two transformations Koch Curve Scissor and Rotating Koch Curve Scissor will be more useful to create interesting images.
Example
kochcurve {
; Copyrights 1999 S. Monnier
; http://www.crosswinds.net/~s31415/index/index.htm
fractal:
title="kochcurve" width=600 height=600 author="Samuel"
created="January 2, 2000" numlayers=5
layer:
inalpha=0 mapalpha=0 caption="New Layer 4" opacity=100 visible=yes
alpha=yes mergemode=hardlight
mapping:
center=-0.00424444444444444444/0 magn=1.42857142857142857 angle=0
numtransforms=1
transform:
filename="fs.uxf" entry="fs-3d-map" p_shape="Sphere" p_rotx=0 p_roty=0
p_rotz=30 p_transx=0 p_transy=0 p_transz=2 p_fraccenter=0/0 p_fracmagn=1
p_fracangle=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=0.1 transfer=linear
repeat=yes p_type="Linear"
gradient:
smooth=no position=-161 numnodes=2 index=242 color=0 index=274
color=16777215
layer:
inalpha=0 caption="New Layer 1" opacity=100 visible=yes alpha=yes
mergemode=softlight
mapping:
center=-0.0175777777777777778/0.00888888888888888889
magn=1.07142857142857143 angle=0
formula:
filename="sam.ufm" entry="KochCurve" maxiter=100 percheck=normal
inside:
transfer=none repeat=yes
outside:
filename="dmj.ucl" entry="dmj-Decomp" transfer=linear repeat=yes
p_portion=256
gradient:
smooth=no numnodes=2 index=0 color=0 index=203 color=16777215
layer:
inalpha=0 caption="Layer 1" opacity=97 visible=yes alpha=yes
mergemode=overlay
mapping:
center=-0.0175777777777777778/0.00888888888888888891
magn=1.07142857142857143 angle=0
formula:
filename="sam.ufm" entry="KochCurve" maxiter=100 percheck=normal
inside:
transfer=none repeat=yes
outside:
filename="dmj.ucl" entry="dmj-fBm" transfer=linear repeat=yes p_scale=1
p_angle=0 p_step=0.5 p_anglestep=37 p_octaves=7 p_power=2
gradient:
smooth=no position=32 numnodes=2 index=152 color=0 index=232
color=16777215
layer:
inalpha=0 caption="New Layer 2" opacity=100 visible=yes alpha=yes
mapping:
center=-0.0175777777777777778/0.00888888888888888889
magn=1.07142857142857143 angle=0
formula:
filename="sam.ufm" entry="KochCurve" maxiter=100 percheck=normal
inside:
transfer=none repeat=yes
outside:
filename="dmj.ucl" entry="dmj-Light" transfer=linear repeat=yes
p_angle=90 p_elevation=30 p_ambient=0
gradient:
smooth=no position=-200 numnodes=3 index=0 color=0 index=63 color=0
index=396 color=16777215
layer:
caption="New Layer 3" opacity=97 visible=yes alpha=no
mergemode=difference
mapping:
center=0.0002/0 magn=1.5 angle=0 numtransforms=1
transform:
filename="dmj.uxf" entry="dmj-Unspiral" p_spicenter=0/0 p_centermove=yes
p_spipower=1
formula:
filename="mt.ufm" entry="mt-pixel" maxiter=100 percheck=normal
p_inside=no
inside:
filename="dmj.ucl" entry="dmj-fBm" transfer=linear repeat=yes p_scale=1
p_angle=0 p_step=0.5 p_anglestep=37 p_octaves=7 p_power=2
outside:
filename="dmj.ucl" entry="dmj-fBm" transfer=linear repeat=yes p_scale=1
p_angle=0 p_step=0.5 p_anglestep=37 p_octaves=7 p_power=2
gradient:
smooth=no position=51 numnodes=2 index=0 color=16777215 index=255 color=0
}

