POV-Ray : Newsgroups : povray.newusers : How to construct a trapezium in a difference : Re: How to construct a trapezium in a difference Server Time
19 May 2024 13:34:12 EDT (-0400)
  Re: How to construct a trapezium in a difference  
From: gharryh
Date: 2 Jul 2013 14:55:01
Message: <web.51d3216460b1b0f2520168c30@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> You can make a difference from a box, using 4 planes at right angle from
> each other and slightly tilted to get the correct shape. You will have
> to calculate the angle to get it right.
>
> very basic example:
>
> #local Plane = plane {y, 0  rotate 110*z}
>
> difference {
>    box {<-1,0,-1>, <1,2,1>}
>    object {Plane translate 1*x}
>    object {Plane rotate 90*y translate -1*z}
>    object {Plane rotate 180*y translate -1*x}
>    object {Plane rotate -90*y translate 1*z}
>    rotate 180*z
> }
>
> Thomas
Solved it like this:
[code]
        difference{
            box{<base1/2,0,base1/2><-base1/2,-(Altetude+.05),-base1/2> }
            union{
                box{<base2/2,0,base2><0,-base2,-base2> rotate<0,0,45>
translate<base2/2,0,0> rotate<0,  0,0> }
                box{<base2/2,0,base2><0,-base2,-base2> rotate<0,0,45>
translate<base2/2,0,0> rotate<0, 90,0> }
                box{<base2/2,0,base2><0,-base2,-base2> rotate<0,0,45>
translate<base2/2,0,0> rotate<0,180,0> }
                box{<base2/2,0,base2><0,-base2,-base2> rotate<0,0,45>
translate<base2/2,0,0> rotate<0,270,0> }
            }
        }

[/code]


Post a reply to this message

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