Hey! This thing is still a Work in Progress. Files, instructions, and other stuff might change!

Ambiguous Cylinder Generator

by drjames, published

Ambiguous Cylinder Generator by drjames Jul 4, 2016

Featured Thing!

49 Share
Download All Files

Thing Apps Enabled

Open in Customizer Order This Printed View All Apps


Design Tools



Liked By

View All

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag

Thing Statistics

79363Views 18021Downloads Found in Interactive Art


This is my Ambiguous Cylinder Generator to create Illusions based on the "Ambiguous Cylinder illusion" by Kokichi Sugihara.

Use Thingiverse Customizer to Customize to your liking!

Have fun and share a make if you print one!


  • v1.4: Presets for two kinds of illusions
  • v1.3: Better Support Structure (should be easier to remove)

More from Interactive Art

view more

All Apps

Customizer is the easiest way to take great 3D printable designs and make them your own. Make your OpenSCAD designs infinitely more valuable by empowering the community to customize them.

App Info Launch App
Customizer Thing App

With 3D Slash, you can edit 3d models like a stonecutter. A unique interface: as fun as a building game! The perfect tool for non-designers and children to create in 3D.

App Info Launch App

Print through a distributed network of 3D printing enthusiasts from across the US, at a fraction of the cost of the competitors. We want to change the world for the better through technology, an...

App Info Launch App

Treatstock is an online platform that offers decentralized manufacturing services such as 3D printing and CNC machining for clients all over the world. We offer free and instant access to comparati...

App Info Launch App

3D print your favourite design with NinjaPrototype, a professional 3D manufacture with consistent quality and speed.

App Info Launch App

Totally amazing - and yes - it works!! Any chance you'll be posting any of the other variations?? I love the Butterfly/Flower cylinder on the Sugihara site http://home.mims.meiji.ac.jp/~sugihara/ambiguousc/ambiguouscylindere.html - anyway, thanks for posting this!

Dr James, I finally cleared my backlog of things to print and will try to print this one during the weekend. I still don't understand the math, but I know for a fact that this works 100%. Is there an easy way (i.e. changing a single parameter) to change the angle for the illusion to work? e.g. something like 70° if you are setting it up in a coffee table, or 30° for a high table?

Thanks for sharing your work for FREE, and please don't pay attention to the trolls :-).

Hey fmargueirat, thanks for your reply! Don't worry i won't be put off by the trolls :-)

The parameter to tweak for a specific viewing angle is the height (amplitude) of the sinusoidal cutout at the top. You can best tweak it if you download and open the "ambicylinder.scad" script in OpenSCAD on your PC, because there you can see the changes directly. (Use F5 preview mode for a quick look at the changes). The parameter is called "SineCutoutHeight" and it has a default value of 1.5mm. For flatter viewing angles decrease, for higher viewing angles (from above) increase this value. Please keep in mind that there is a certain limit how far you can tweak the angle before the illusion stops working...

Hope it works for you and please share a make if you print it :-)

Amazing! Will sure share it when I printed it.

Thanks again

Don't you know about illusions? It will change by the angle you're looking at.

is not just tried it works

Just printed one, it works perfectly! Reading through the comments, I'm not sure why people are giving you so much hate. No, the video DrJames linked is not altered, no you do not need a special setup, just a mirror. Thanks for the great design, don't let the haters get to you!

Thanks for creating this. This illusion is amazing, and it's really cool that you could reproduce it.

Were you able to get the other shapes? I really want to create the one with the 6 non-intersecting circles and 8 non-intersecting squares. If you are able to do it, would you mind sharing the parameters you used?

For those having trouble viewing it in OpenSCAD, tying changing the viewport to

$vpr = [60, 0, 135]; // for the squares use -45 instead of 135
$vpt = [12, 12, 12];
$vpd = 200;

Hey, thanks for your reply and your tip regarding the viewport.
To get your desired shape with 6 circles and 8 squares try the following parameters: Rotation 0, X-Count 2, Y-Count 3, X- and Y-Distance equal to the diameter (default 36, probably a little bit lower to make the cylinders stick together when printed).
Please upload a make if you do print it :) thanks!

Amazing, that worked! I don't understand how rotation works yet, so I was not playing with that parameter. Thank you!

I uploaded an example with 3 by 2 arrangement of cylinders for you!

it is so cool how I can see the optical ilussion when viewing the 3d model on my computer

i downloaded just to try it after reading your comment its so weird how that works :O then i printed and put it near a mirror and my family were saying its trick mirror x) lol

Comments deleted.

Great little effect - v simple and fascinating - thanks!

Does anybody know how to generate the 2 "separated cylinders" on the right in the video? I have downloaded the scad file and played around with the parameters but have only succeeded in generating intersecting squares and cylinders, not one where the original looks overlapped and the reflection looks separated, as in the video.

Dear drjames,

as you did not answer precisly my questions, I need to do your job:

to obtain the optical illusion the 3D printout must have this key

  • a 'roller coaster shaped' upper edge 2 mm distance from to lowest 'track'
    to the highest 'track'. See attached photo - I made the thing

So, if the slice resolution is 0.3 mm, depending on your slicer, you will probably have an almost flat upper edge...and there is no 'wow'!. I think a slice/print resolution of at least 0.2 mm, is nescessary.

Furthermore the lower 'line' is not to seperate the 'thing' from the print bed but to amplify the effect as it follows the roller coaster track, destracting from the
bottom. But the 'distraction line' is poorly realized by seperating the cylinder, which results in a 'not clean' print, unclear destraction line.

Finally, YES, the illusion works perfectly, even no need to print, just look the turnable
print preview.


Dear APing, thanks for doing my "job" and sorry for providing you with free stuff that does not live up to your standards. Please update me when you have fixed the poorly realized support structure!

Wow, what an @$$#0!3 you are APing!

There is a syntax error in line 98 of the SCAD file:
2 [ (w/R/2)a, sin(a)*h/2 ]

Hey, that works fine with my openSCAD version (2015.03-2) and the Thingiverse Customizer seems to accept that kind of array definition as well. Do you probably have another version of openSCAD?

I have version 2013.06, seems I need a newer version of OpenScad. Thanks for your answer.

no problem, hope it works after an update :-)

I belive the video has been bothered with. If you look at 0:39 the left 4 item thing.: The mirror shows much more edges than the originoal. even perspective cannot do that.

Even if it is not my recording - i can assure you the video is not modified. Perspective can do that by obscuring visible lines and edges because of the form of the object. You can check that even without printing by using "Thingiview" and rotating the camera :)

Maybe I'm stupid. I printed this and I don't see any differences in the mirror

Have you changed any parameters or printed one of the STL-files directly? You should also see a difference with your own eyes when looking from two sides (with a slight downward angle)

Dear drjames,
I cannot see any changes from
any perspective, as scottrider and davesaint. So, now, please give a detailed instruction of print parameters, light conditions and view setup/parameters... or confess a hoax !
P.S: You know the fairy tail of the King without cloth?

Hey APing,
I cannot believe that anyone still thinks this is a fake, even after 15 confirmed makes with photographic evidence :-)

As murphy2712 explained in his comment the illusion can be seen at a specific angle (looking slightly from above and from two of the four sides). See one of the images under "makes" to get an idea from where you should look at it.

You can print any of the two supplied STLs, they work for sure. Use reasonable default print parameters (i used 0.2 layer height, 15% infill, no support). There are no specific light conditions needed to see the illusion.

Here is a Video: https://goo.gl/sZzVFV

I printed one and it works fine. Note that the illusion works best at one very specific angle and 2 object orientations. Cf. video.

There is a gap near the bottom. Is this on purpose?

The gap is supposed to separate the included support (lower part) from the object. You can disable the included support or change the distance by using thingiverse customizer or openSCAD. (Parameters: "Generate Base Support" and "Support Distance" )


Hey guys, can some of you tell me which software you are using to assemble these ambiguous cylinders into more intricate shapes? I have a Zortrax M200 which came with its own software but I don't think it has the capability to really play around with designs. Thanks.

Hey, this is done with openSCAD so you can best modify it with this software after dowloading the script file. You can also use thingiverse customizer to change a lot of parameters, try that first :)

Fool me once shame on you. Fool me 4 times, WTBH!

Very nice! It took me a little while to figure out that the cylinders should be at a 45 degree angle and not straight-on like they are in the original person's video. Printed two. Wife's mind...blown!

What should this be for? I don't get the reason why this is featured. It seems everything can get featured how ever useless it seems to be xD

It is filed under "interactive art" and tagged as "optical illusion", what did you expect it would do?

How does it work ? Does it rely on a special video camera perspective ?

It does rely on perspective, but you can see it with your own eyes.

Really amazing. At the moment I am printing a turntable that rotates 180 degrees after pushing a button. It also holds the mirror.
After testing it will be Thingiversed.

Thanks! looking forward to see this turntable in motion... keep us updated!

Waw! Printing 10 now!

A wise man once said "Believe nothing you are told and half of what you see." Perfect illustration here.

Really Great! Works perfect. Thanks for the cool 3D File.

Looks really cool. If you have issues I had to run a repair to get Simplify3D to slice this correctly.

Dear Dr James,
thanks for sharing this great optical illusion!
That's about : I trust only what I can see with my own eyes..

thats awesome thanks for sharing

This is pretty cool, but maybe you should make it only generate one at once. The translations are a bit glitchy.

Thanks, you can do just that in the customizer: set X/Y count to "1" under "array". You can also change the distance between the cylinders to optimize the illusion.