Page 1 of 1

Less hacking rose

Posted: Mon Jul 25, 2005 11:25 am
by MtnViewJohn
I figured out a different way to get the red-to-yellow effect in rose.cfdg without the double-rose hack (no rose2 rule). It looks better too.

Code: Select all

startshape plant{color alpha}

rule rose {
   petal {}
   petal { r 90 }
   petal { r 180 }
   petal { r 270 }
   rose { r 14 s 0.92 hue 1}
}

rule petal {
   petal2 {r 15 x 0.9 s 0.9 1.8}
}

rule petal {
   petal2 {r -15 x 0.9 s 0.9 1.8}
}

rule petal2 {
	CIRCLE {}
	petal2 {hue 10 x -0.02 s 0.98 a -0.5}
}

rule stem { 
	CIRCLE {s 2 6 r -15 y -3 x -.5}
	CIRCLE {s 2 6 r -15 y -3 x -0.35 sat -1 b 1}
	leaf { r 30 y -3 x -2.2 } 
	leaf { r -45 y -3.15 x -0.8  } 
}

rule leaf {
	CIRCLE [s 0.75 2 b 0.2 y 0.25]
	TRIANGLE [y -0.25 s 0.1 3 ]
}

rule plant {
	rose { b 1 sat 1 hue =0}
	stem { b =0.5 sat 1 hue =120}
}