Motion illusions

If you have a design you're proud of, share the cfdg file here. It's also a good place to ask for feedback and collaborate.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
User avatar
lagroue
Posts: 114
Joined: Wed Jul 06, 2005 11:33 pm
Location: Paris, France
Contact:

Motion illusions

Post by lagroue »

If you don't know Kitaoka Akiyoshi's illusions, it's high time to check it !

He designs many pictures which provide illusion of motion - many of them are spiral-based, maybe something which could be acheived with Context Free.

I choose to reproduce an easy one, "Rollers" :
Image

Code: Select all

startshape rollers { color }

rule rollers {
	SQUARE { s 12 10 y 3.5 hue 50 brightness 0.7 saturation 0.5 }
	roller { x -3.4 }
	roller { flip 90 }
	roller { x 3.4 }
}

rule roller {
	eggrow { }
	eggrow { y 1.2 }
	eggrow { y 2.4 }
	eggrow { y 3.6 }
	eggrow { y 4.8 }
	eggrow { y 6 }
	eggrow { y 7.2 }
}

rule eggrow {
	eggl { }
	eggr {  }
}

rule egg {
	CIRCLE { x -0.1 s 0.5 1 }
	CIRCLE { x 0.1 s 0.5 1 b 1}
	CIRCLE { s 0.5 1 b 0.5 hue 200 saturation 1}
}

rule eggl {
	egg { }
	eggl { x 0.7 s 0.6 1 }
}

rule eggr {
	egg { }
	eggr { x -0.7 s 0.6 1 }
}

User avatar
mtnviewmark
Site Admin
Posts: 81
Joined: Wed May 04, 2005 12:46 pm
Location: Mountain View, CA
Contact:

Post by mtnviewmark »

Not only do I know of them - but they are some of Kyle's favorite images to look at. I have a whole bunch I printed out for him some time ago.
I'm the "m" in "mtree.cfdg"

User avatar
vapocalypse
Posts: 7
Joined: Tue Jul 19, 2005 8:41 am
Location: Amsterdam

Rotating rays

Post by vapocalypse »

I tried to reproduce the Rotating Rays.

First, I tried doing it spiral, but it would not give the motion illusion, so I had a little more work to try to reproduce exactly.

And, if we had a background control, I wouldn't need to draw a huge circle, to make it as a background. Doing this gives too much margin space and I need to render to a size and view the image in another application, zoomed, to fit the circle in the screen.

All in all, the result was as expected. Neat! =)

Here is the (rather big) code:

Code: Select all

startshape rotating_rays {
	color
	alpha
}

rule rotating_rays {
	CIRCLE { s 23 hue =180.0 sat =1.0000 b =1.0000 }
	faces90 { }
	faces90 { s .875 r 5 }
	faces90 { s .75 }
	faces180 { s .6 }
	faces180 { s .525 r 5 }
	faces180 { s .45 }
}

rule faces90 {
	spaced_diamond90 { }
	spaced_diamond90 { r 10 }
	spaced_diamond90 { r 20 }
	spaced_diamond90 { r 30 }
	spaced_diamond90 { r 40 }
	spaced_diamond90 { r 50 }
	spaced_diamond90 { r 60 }
	spaced_diamond90 { r 70 }
	spaced_diamond90 { r 80 }
	spaced_diamond90 { r 90 }
	spaced_diamond90 { r 100 }
	spaced_diamond90 { r 110 }
	spaced_diamond90 { r 120 }
	spaced_diamond90 { r 130 }
	spaced_diamond90 { r 140 }
	spaced_diamond90 { r 150 }
	spaced_diamond90 { r 160 }
	spaced_diamond90 { r 170 }
	spaced_diamond90 { r 180 }
	spaced_diamond90 { r 190 }
	spaced_diamond90 { r 200 }
	spaced_diamond90 { r 210 }
	spaced_diamond90 { r 220 }
	spaced_diamond90 { r 230 }
	spaced_diamond90 { r 240 }
	spaced_diamond90 { r 250 }
	spaced_diamond90 { r 260 }
	spaced_diamond90 { r 270 }
	spaced_diamond90 { r 280 }
	spaced_diamond90 { r 290 }
	spaced_diamond90 { r 300 }
	spaced_diamond90 { r 310 }
	spaced_diamond90 { r 320 }
	spaced_diamond90 { r 330 }
	spaced_diamond90 { r 340 }
	spaced_diamond90 { r 350 }
	spaced_diamond90 { r 360 }
}

rule faces180 {
	spaced_diamond180 { }
	spaced_diamond180 { r 10 }
	spaced_diamond180 { r 20 }
	spaced_diamond180 { r 30 }
	spaced_diamond180 { r 40 }
	spaced_diamond180 { r 50 }
	spaced_diamond180 { r 60 }
	spaced_diamond180 { r 70 }
	spaced_diamond180 { r 80 }
	spaced_diamond180 { r 90 }
	spaced_diamond180 { r 100 }
	spaced_diamond180 { r 110 }
	spaced_diamond180 { r 120 }
	spaced_diamond180 { r 130 }
	spaced_diamond180 { r 140 }
	spaced_diamond180 { r 150 }
	spaced_diamond180 { r 160 }
	spaced_diamond180 { r 170 }
	spaced_diamond180 { r 180 }
	spaced_diamond180 { r 190 }
	spaced_diamond180 { r 200 }
	spaced_diamond180 { r 210 }
	spaced_diamond180 { r 220 }
	spaced_diamond180 { r 230 }
	spaced_diamond180 { r 240 }
	spaced_diamond180 { r 250 }
	spaced_diamond180 { r 260 }
	spaced_diamond180 { r 270 }
	spaced_diamond180 { r 280 }
	spaced_diamond180 { r 290 }
	spaced_diamond180 { r 300 }
	spaced_diamond180 { r 310 }
	spaced_diamond180 { r 320 }
	spaced_diamond180 { r 330 }
	spaced_diamond180 { r 340 }
	spaced_diamond180 { r 350 }
	spaced_diamond180 { r 360 }
}

rule spaced_diamond90 {
	diamond { x 10 r 90 }
}

rule spaced_diamond180 {
	diamond { x 10 r -90 }
}

rule diamond {
	SQUARE { x -.1 r 45 b 1 s 1.01 }
	SQUARE { x .1 r 45 b 0 s 1.01 }
	SQUARE { r 45 hue =0.0 sat =1.0000 b =0.75 }
	CIRCLE { x .45 y .1 s .1 b 1 }
	CIRCLE { x .45 y -.1 s .1 b 1 }
}
--
Apoc
Last edited by vapocalypse on Wed Jul 27, 2005 10:59 pm, edited 1 time in total.

User avatar
vapocalypse
Posts: 7
Joined: Tue Jul 19, 2005 8:41 am
Location: Amsterdam

Cushion

Post by vapocalypse »

Yeah, now a perfect one! :D

I made the cushion (http://www.ritsumei.ac.jp/~akitaoka/Cushion5.jpg)

This is very nice and the code is recursive.

Here s the code:

Code: Select all

startshape cushion

rule cushion {
	center_line { }
	external_lines1 { y 1 }
	external_lines1 { y -1 flip 180 }
}

rule center_line {
	SQUARE { }
	SQUARE { s .3 y .3 x .3 b 1 }
	SQUARE { s .3 y .3 x -.3 b 1 }
	SQUARE { s .3 y -.3 x -.3 b 1 }
	SQUARE { s .3 y -.3 x .3 b 1 }
	side_center1 { x 1 }
	side_center1 { x -1 flip 90 }
}

rule side_center1 {
	SQUARE { b 1 }
	SQUARE { s .3 x -.3 y .3 }
	SQUARE { s .3 x -.3 y -.3 }
	side_center2 { s .75 1 x .875 }
}

rule side_center2 {
	SQUARE { }
	SQUARE { s .3 x -.3 y .3 b 1}
	SQUARE { s .3 x -.3 y -.3 b 1 }
	side_center1 { s .75 1 x .875 }
}

rule external_lines1 {
	SQUARE { b 1 }
	SQUARE { s .3 y -.3 x -.3 }
	SQUARE { s .3 y -.3 x .3 }
	side1 { x 1 }
	side1 { x -1 flip 90 }
	external_lines2 { y .875 s 1 .75 }
}

rule external_lines2 {
	SQUARE { }
	SQUARE { s .3 y -.3 x -.3 b 1 }
	SQUARE { s .3 y -.3 x .3 b 1 }
	side2 { x 1 }
	side2 { x -1 flip 90 }
	external_lines1 { y .875 s 1 .75 }
}

rule side1 {
	SQUARE { }
	SQUARE { s .3 x -.3 y .3 b 1 }
	SQUARE { s .3 x .3 y -.3 b 1 }
	side2 { s .75 1 x .875 }
}

rule side2 {
	SQUARE { b 1 }
	SQUARE { s .3 x -.3 y .3 }
	SQUARE { s .3 x .3 y -.3 }
	side1 { s .75 1 x .875 }
}
--
Apoc

User avatar
lagroue
Posts: 114
Joined: Wed Jul 06, 2005 11:33 pm
Location: Paris, France
Contact:

Re: Cushion

Post by lagroue »

vapocalypse wrote:Yeah, now a perfect one! :D

I made the cushion (http://www.ritsumei.ac.jp/~akitaoka/Cushion5.jpg)

This is very nice and the code is recursive.
8)
I wonder how does Kitakoa produce his pictures. :?:

User avatar
lagroue
Posts: 114
Joined: Wed Jul 06, 2005 11:33 pm
Location: Paris, France
Contact:

Post by lagroue »

"Something appears to run along red tubes"
Image
It's difficult to acheive the same level of effect...
Now should we invent our own motion illusions ?
Or go back to work ? :)

Code: Select all

startshape scene { color }

rule scene {
	bluecircles { }
	redspiral { }
}

rule bluecircles {
	CIRCLE { hue 240 brightness 0.7 saturation 1 }
	CIRCLE { s 0.95 brightness 1 saturation 0 }
	bluecircles { s 0.9025 }
}

rule redspiral {
	redcircle4 { }
	redcircle4 { r 180 }
	redcircle4 { r 30 }
	redcircle4 { r 210 }
	redspiral { r 0.5 s 0.97 }
}

rule redcircle4 {
	redcircle [ x 0.5 s 0.2  alpha -1 s 1.1]
	redcircle [ r 60 x 0.5  s 0.2  alpha -1 s 1.1]
	redcircle [ r 120 x 0.5  s 0.2  alpha -1 s 1.1]
}

rule redcircle {
	CIRCLE { hue 0 saturation 1 brightness 1 }
	redcircle { s 0.98 alpha 0.0004 }
}

Post Reply