Tuesday, 24 November 2009

From Crystals to Spirals

Initial Design
Crystal 1
Created with this script
startshape crystals

rule crystals {
crystal { h 81.87 sat 0.8642 b 1.0000 }
crystal { h 81.87 sat 0.8642 b 1.0000 r 90}
crystal { h 81.87 sat 0.8642 b 1.0000 r 180}
crystal { h 81.87 sat 0.8642 b 1.0000 r 270}
}

rule crystal {
blob {}
crystal {s 0.5 y 0.75}
crystal {s 0.5 x 0.75}
}

rule blob {
SQUARE {}
blob {s 0.9 b - 0.1 r 5}
}


Add an extra layer of recursion
Crystal 2
startshape gem

rule gem{
crystals {}
gem { s 0.8 r 10 }
}

rule crystals {
crystal { h 81.87 sat 0.8642 b 1.0000 }
crystal { h 81.87 sat 0.8642 b 1.0000 r 90}
crystal { h 81.87 sat 0.8642 b 1.0000 r 180}
crystal { h 81.87 sat 0.8642 b 1.0000 r 270}
}

rule crystal {
blob {}
crystal {s 0.5 y 0.75}
crystal {s 0.5 x 0.75}
}

rule blob {
SQUARE {}
blob {s 0.9 b - 0.1 r 5}
}


Or with this change create a spiral effect
Crystal 3
startshape gems

rule gems{
8 * {r 45} gem {}
}

rule gem{
crystals {}
gem { s 0.8 r 10 x 2.5}
}

rule crystals {
crystal { h 81.87 sat 0.8642 b 1.0000 }
crystal { h 81.87 sat 0.8642 b 1.0000 r 90}
crystal { h 81.87 sat 0.8642 b 1.0000 r 180}
crystal { h 81.87 sat 0.8642 b 1.0000 r 270}
}

rule crystal {
blob {}
crystal {s 0.5 y 0.75}
crystal {s 0.5 x 0.75}
}

rule blob {
SQUARE {}
blob {s 0.9 b - 0.1 r 5}
}


Finally add some colour and change the angle
Crystal 4
startshape gems

rule gems{
8 * {r 45} gem {h 81.87 sat 0.8642 b 1.0000}
}

rule gem{
crystals {}
gem { s 0.8 r 25 x 2.5 h +25}
}

rule crystals {
crystal { }
crystal { r 90}
crystal { r 180}
crystal { r 270}
}

rule crystal {
blob {}
crystal {s 0.5 y 0.75}
crystal {s 0.5 x 0.75}
}

rule blob {
SQUARE {}
blob {s 0.9 b - 0.1 r 5}
}


Alastair's Fractals Main Page,
My Shop at CafePress, My Shop at Zazzle Sign My Guestbook
In association with Zazzle.com

© Alastair Montgomery 2008

No comments:

Buy Fractal Stuff


See more personalized gifts from Zazzle.