|
|
|
@ -195,11 +195,8 @@ function sierpinski() {
@@ -195,11 +195,8 @@ function sierpinski() {
|
|
|
|
|
var r = generate( |
|
|
|
|
'iIjJX', |
|
|
|
|
[ |
|
|
|
|
['X', 'F[-lfX][cfX][+rfX]'], |
|
|
|
|
//['F'.split(''), 'FF'.split('')], |
|
|
|
|
//['L'.split(''), 'LL'.split('')], |
|
|
|
|
//['C'.split(''), 'CC'.split('')], |
|
|
|
|
//['R'.split(''), 'RR'.split('')], |
|
|
|
|
//['X', 'F[-lfX][.cfX][+rfX]'], |
|
|
|
|
['X', ['F[-lfX][.cfX][+rfX]', 'F[-lfX]m[.cfX][+rfX]']], |
|
|
|
|
], |
|
|
|
|
8 |
|
|
|
|
); |
|
|
|
@ -210,6 +207,7 @@ function sierpinski() {
@@ -210,6 +207,7 @@ function sierpinski() {
|
|
|
|
|
{ |
|
|
|
|
'F': draw_forward(), |
|
|
|
|
'f': draw_forward(0.5), |
|
|
|
|
'm': draw_forward(0.5), |
|
|
|
|
|
|
|
|
|
'l': draw_stepsize_mul(0.7), |
|
|
|
|
'c': draw_stepsize_mul(0.8), |
|
|
|
@ -220,9 +218,9 @@ function sierpinski() {
@@ -220,9 +218,9 @@ function sierpinski() {
|
|
|
|
|
'j': draw_set_turn_noise(1), |
|
|
|
|
'J': draw_set_length_noise(1), |
|
|
|
|
|
|
|
|
|
'*': draw_angle_add((Math.random() - 0.5) * 0.01), |
|
|
|
|
'-': draw_angle_turn(-1), |
|
|
|
|
'+': draw_angle_turn(1), |
|
|
|
|
'.': draw_angle_turn(0.1), |
|
|
|
|
'[': draw_state_push(), |
|
|
|
|
']': draw_state_pop(), |
|
|
|
|
} |
|
|
|
|