Page 1 of 1

yinyang folding into itself

Posted: Tue Mar 17, 2009 12:29 pm
by hmny
Hi everyone!

I'm trying to make a wave whichs "tips over" into itself and continues endlessly. Of course my math sucks so I'm just playing around :)

Code: Select all

startshape circle_path

path round {

   MOVETO{y 1}        // required
    ARCTO{y -1 r 1}
     ARCTO{y 1 r 1}
    STROKE{  width 0.01 }
}

path halfround {
	
	MOVETO {  y 1 }
	ARCTO{y -1 r 1}
	STROKE{  width 0.01 }	
}

rule sinus {
	
	halfround { x 1  y 0} 
	halfround { x 1   y -2   r 180  }


}

rule body_wave {

	round { x 0.5  y 0.5  }
	sinus {  s 0.5 flip 180 }  
}

rule circle_path {

	body_wave { }
	body_wave { s 0.5   flip 90  x 0.75 y -0.25 }
	body_wave { s 0.25 x 0.37 y -0.37 }

}
edit: it seems I cant attach the picture ? I have to put it online somewhere myself ?

Posted: Tue Mar 17, 2009 8:22 pm
by hmny
Ok! So I made my folding yinyang circle thingie :)

edit: I'm trying to make the top part smaller so the lower parts will
be more visible. maybe I need to use scaling or something. if someone
has a tip to make the top part say 0.25 and the lower part 0.75 size...
(I'll figure it out eventually though... 8) )


Image

Code: Select all

startshape yinyang

path round {

   MOVETO{ y 1}        // required
    ARCTO{ y -1  r 1}
    STROKE{  width 0.01 }
     ARCTO{ y -3   r 1   p cw }
    STROKE{  width 0.01 }
	ARCTO { y 1 }
    STROKE{  width 0.01 }
	MOVETO {  y -3 }
	ARCTO { y 1 p cw } 
    STROKE{  width 0.01 }
	


}


path circle  {

   MOVETO{y 1}        // required
    ARCTO{y -1 r 1}
     ARCTO{y 1 r 1}
    STROKE{  width 0.01 }
}


rule double {
	
	round {}
	circle { s 0.5 } 

}

rule twoshape {
	7 * { flip 90 s 0.5  y -1.5  } double { }
}

rule yinyang  {

	twoshape {} 

	
}


Posted: Thu Mar 19, 2009 3:12 pm
by Guigui
Hi hmny!

That's funny, I'm also playing with the yinyang on my times. Here's an experiment I've done with Processing. Also there's another yinyang topic in this forum.

Also, what do you think of these modifications:

Code: Select all

startshape twoshape

path round { 
   MOVETO{ y 1}
   ARCTO{ y 0  r .5} 
   ARCTO{ y -3   r 1.5   p cw } 
   ARCTO { y 1 } 
   MOVETO {  y -3 } 
   ARCTO { y 1 p cw } 
   STROKE{width 0.01 }
} 


path circle  { 
   MOVETO{y 1}
   ARCTO{y -1 r 1}
   ARCTO{y 1 r 1}
   STROKE{  width 0.05 }
} 


rule double { 
    
   round {} 
   circle { s 0.2 y .5 } 

} 

rule twoshape { 
   7 * { flip 90 s 0.75  y -.75  } double { } 
} 

Posted: Fri Mar 20, 2009 6:43 am
by hmny
Hey!

Thanks for your reply! Your modifications do make it look more visible for me :)

I saw your expirement! glad I didnt see it when I was trying to make mine would have kept me from wanting to learn howto do it ;)

cool to see there are so many differnt approaches!!