Page 1 of 1

repeat a path

Posted: Sat Apr 14, 2012 11:05 am
by surrealista1
I want to repeat and rotate the following path, but i cant, i had try using a rule before and after the path, but i had not success

Code: Select all

startshape serp
path serp {

    MOVETO {x 0 y 0}

     ARCTO { x -1  y 0  r 1     }
 ARCTO{x -2  y 0 r -1}
ARCTO{x -3  y 0 r 1}
ARCTO{x -3.2 y 0 r 0.2}
ARCTO{x -3 y 0 r 0.2}
  STROKE { h 248.33 sat 0.8728 b 1.0000}
}
Does anybody know what i should do.
Thanks

Re: repeat a path

Posted: Sun Apr 15, 2012 6:51 am
by MtnViewJohn
This works fine for me:

Code: Select all

startshape serps
path serp {

MOVETO {x 0 y 0}

ARCTO { x -1 y 0 r 1 }
ARCTO{x -2 y 0 r -1}
ARCTO{x -3 y 0 r 1}
ARCTO{x -3.2 y 0 r 0.2}
ARCTO{x -3 y 0 r 0.2}
STROKE { h 248.33 sat 0.8728 b 1.0000}
}

rule serps {
  10* [x 1 y 1]
    serp {}
}
Did you remember to change the startshape to the name of your rule?

Re: repeat a path

Posted: Sun Apr 15, 2012 6:25 pm
by surrealista1
Thank you Mountview john, it solve my problem