Message Boards Message Boards

Reproducing strong visual effect of the rotating cube illusion

Posted 3 months ago

EDITORIAL TEAM NOTE: The first section of this post is the original question that appeared on Mathematica Stack Exchange. It puts in context the winning Akishi Kato answer found in the second section.


1) Original question

A very "strong" visual effect illusion was posted recently HERE. Here are a few frames of it at low resolution. The cubes are NOT rotating in reality. Curious: to see cube NOT moving use "cross-eyed viewing" as you would do for a stereogram and a static cube will appear in the middle.

enter image description here

Notice, cubes rotate in different directions. If you look at it at high resolution screenshot (click to zoom on the image below) you will see the difference at the edges of cube frames - different colors, different sides - that's probably the source of the illusion:

enter image description here

Here is a starter code to implement a cube with rotating background. Define half-disk:

halfDisk[angle_:0,color_:Black,radius_:.5,center_:{.5,.5}]:=
{color,DiskSegment[center,radius,{angle+0,angle+Pi}]}

The rest is pretty easy. The control of Manipulate is the angle of rotation:

Manipulate[Graphics3D[
{EdgeForm[Directive[Thickness[.03],Orange]],FaceForm[None],Cube[]},
Prolog->{halfDisk[-a],halfDisk[Pi-a,White]},
ViewPoint->5.{Sin[2],Cos[2],.4},
Boxed->False,SphericalRegion->True,Background->Gray]
,{a,0,2Pi}]

You can generate a .GIF or .MP4 by replacing Manipulate with a Table and using Export to the corresponding file format. Or use any other method, the above code is not necessarily the best idea to start from, up to you.

Obviously this minimal rotation is not enough to create the visual effect. Probably something close to things discussed here is happening:

I am looking for any (but desirably minimal and clear) implementation that reproduces this strong visual effect.

2) The winning Akishi Kato answer

POSTED BY: Akishi Kato

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract