POV-Ray : Newsgroups : povray.newusers : How to construct a trapezium in a difference Server Time
7 May 2024 23:54:04 EDT (-0400)
  How to construct a trapezium in a difference (Message 1 to 5 of 5)  
From: gharryh
Subject: How to construct a trapezium in a difference
Date: 2 Jul 2013 08:55:01
Message: <web.51d2cd241602efbb520168c30@news.povray.org>
I have a problem constructing a trapezium piramide to be used removing a bit
from a box.
The upper plane has dimension 6mm square and the lower plane is 4mm square.
I was looking at the prism object but cant get the points down.

Any idea's?
The part i want to create can be found here:
http://www.gradconn.com/2-54mm/pdf/BB02-JS.pdf


Post a reply to this message

From: Thomas de Groot
Subject: Re: How to construct a trapezium in a difference
Date: 2 Jul 2013 10:30:04
Message: <51d2e3ec$1@news.povray.org>
On 2-7-2013 14:52, gharryh wrote:
> I have a problem constructing a trapezium piramide to be used removing a bit
> from a box.
> The upper plane has dimension 6mm square and the lower plane is 4mm square.
> I was looking at the prism object but cant get the points down.
>
> Any idea's?
> The part i want to create can be found here:
> http://www.gradconn.com/2-54mm/pdf/BB02-JS.pdf

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


Post a reply to this message

From: gharryh
Subject: Re: How to construct a trapezium in a difference
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

From: Alain
Subject: Re: How to construct a trapezium in a difference
Date: 2 Jul 2013 15:58:14
Message: <51d330d6@news.povray.org>

> I have a problem constructing a trapezium piramide to be used removing a bit
> from a box.
> The upper plane has dimension 6mm square and the lower plane is 4mm square.
> I was looking at the prism object but cant get the points down.
>
> Any idea's?
> The part i want to create can be found here:
> http://www.gradconn.com/2-54mm/pdf/BB02-JS.pdf
>
>
>
If your prism have the correct shape, you only need to apply this scalling:

scale<1,-1,1>

to inverse it verticaly.

Lastly, just translate it to place it at exactly the location you want it.



Alain


Post a reply to this message

From: clipka
Subject: Re: How to construct a trapezium in a difference
Date: 16 Jul 2013 16:47:59
Message: <51e5b17f$1@news.povray.org>
Am 02.07.2013 16:30, schrieb Thomas de Groot:

> 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}

It might be easier to use a suitable normal vector in this case rather 
than rotating a horizontal plane.


Post a reply to this message

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