POV-Ray : Newsgroups : povray.binaries.images : The ghost of a box : Re: The ghost of a box Server Time
20 May 2024 04:54:19 EDT (-0400)
  Re: The ghost of a box  
From: Mike Miller
Date: 29 Jul 2023 21:20:00
Message: <web.64c5ba29a9f3bc0ab5177e91dabc9342@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> Some time ago and entirely by chance, I came across this site/image:
> https://www.printables.com/model/431413-illusion-cube
>
> I thought this was an interesting shape and I built my own version in
> POV-Ray code:
>
> //==========================================================
> #declare BaseBox =
> box {
>    <-1.00, -1.00, -1.00>,< 1.00, 1.00, 1.00>
> }
>
> #declare InsideHollow =
> union {
>    box {< 0.00, -0.899, -0.70>,< 1.01, 0.70, 0.899>}//+x
>    box {<-1.01, -0.70, -0.899>,< 0.00, 0.899, 0.70>}//-x
>
>    box {<-0.70, -0.70,  0.00>,< 0.899, 0.899, 1.01>}//+z
>    box {<-0.899, -0.899, -1.01>,< 0.70, 0.70, 0.00>}//-z
>
>    box {<-0.899,  0.00, -0.70>,< 0.70, 1.01, 0.899>}//+y
>    box {<-0.70, -1.01, -0.899>,< 0.899, 0.00, 0.70>}//-y
>
>    box {<-0.90, -0.90, -0.90>,< 0.90, 0.90, 0.90> }
> }
>
> #declare EdgeHollow = box {<-1.01, -0.2, -0.2>,< 1.01, 0.2, 0.2>}
>
> #declare EdgeHollowsTop =
> union {
>    object {EdgeHollow translate <0.00, 1.00,-1.00>}
>    object {EdgeHollow rotate 90*y translate < 1.00, 1.00, 0.00>}
> }
>
> #declare EdgeHollowsBase =
> union {
>    object {EdgeHollow translate <0.00, -1.00, 1.00>}
>    object {EdgeHollow rotate 90*y translate <-1.00, -1.00, 0.00>}
> }
>
> #declare EdgeHollowsSides =
> union {
>    object {EdgeHollow rotate 90*z translate <-1.00, 0.00, 1.00>}
>    object {EdgeHollow rotate 90*z translate <1.00, 0.00,-1.00>}
> }
>
> #declare IllusionBox =
> difference {
>    object {BaseBox}
>    object {InsideHollow /*pigment {rgb <0,1,0>}*/}
>    object {EdgeHollowsTop /*pigment {rgb <1,0,0>}*/}
>    object {EdgeHollowsBase /*pigment {rgb <1,0,0>}*/}
>    object {EdgeHollowsSides /*pigment {rgb <1,0,0>}*/}
>
>    pigment {rgb 0.9}
> }
>
> object {IllusionBox}
> //==========================================================
>
> Adding a spaceship I built years ago using Silo, and a media (portal?) I
> composed the present scene.
>
> --
> Thomas

Very cool. Love the look.
Miller


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.