|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I am making a flat top pyramid, 4 sided.
What I need to know -
1. How can I precisely position the thing?
2. How can I precisely define the height - or, how does the starting
point number work?
#declare Base6 = prism
{
linear_spline
conic_sweep
0.83, // What's the precise height? Where is this surface located?
Should be 38 units high.
1,
5,
<32, 32 >,
<-32, 32 >,
<-32, -32 >,
<32, -32 >,
<32, 32 >
sturm
rotate <180, 0, 0>
translate <0, 0.119, 0>// it's actually located at -142y. How'd it
get there with a +0.119 tanslation?
scale <1, 204, 1>// starting pyramid is 204 units high by 32 units
square base.
}
THANKS for any help ya'll can offer!
steve
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
You can tray this
#declare My_Prism = prism{
linear_spline conic_sweep 0, 1, 5,
<-1,-1>, <-1,1>, <1,1>, <1,-1>, <-1,-1>
translate -y rotate 180*x
}
object{My_Prism
scale <32,38,32>
pigment{pigment}
}
Alberto.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Sun, 01 Aug 1999 14:56:59 -0500, Steve <ste### [at] puzzlecraftcom> wrote:
>I am making a flat top pyramid, 4 sided.
>
>What I need to know -
>
>1. How can I precisely position the thing?
>
>2. How can I precisely define the height - or, how does the starting
>point number work?
>
>#declare Base6 = prism
>{
> linear_spline
> conic_sweep
> 0.83, // What's the precise height? Where is this surface located?
>Should be 38 units high.
> 1,
> 5,
> <32, 32 >,
> <-32, 32 >,
> <-32, -32 >,
> <32, -32 >,
> <32, 32 >
> sturm
> rotate <180, 0, 0>
> translate <0, 0.119, 0>// it's actually located at -142y. How'd it
>get there with a +0.119 tanslation?
> scale <1, 204, 1>// starting pyramid is 204 units high by 32 units
>square base.
>}
>
>THANKS for any help ya'll can offer!
>
>steve
>
Steve,
You need to scale, rotate, translate in that order.
This little macro does the trick for any dimensions and leaves the frustrated pyramid
sitting on <0,0,0>.
David
// --------------------pyramid macro--------------
#macro Pyramid_4_Side(Apex,Height,Side)
prism
{
conic_sweep
1,
1-Height/Apex,
5,
<Side, Side >,
<-Side, Side >,
<-Side, -Side >,
<Side, -Side >,
<Side, Side >
scale <1,Apex,1>
rotate <180, 0, 0>
translate <0, Apex, 0>
}
#end
object { Pyramid_4_Side(204,38,32)
pigment { Red }
}
//-----------------end of program
------------
dav### [at] cwcomnet
http://www.hamiltonite.mcmail.com
------------
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks David - I'll give it a try.
As a workaround I can always write a bicubic_patch, but that's a lot of work.
steve
David Wilkinson wrote:
> Steve,
> You need to scale, rotate, translate in that order.
> This little macro does the trick for any dimensions and leaves the frustrated
pyramid
> sitting on <0,0,0>.
> David
>
> // --------------------pyramid macro--------------
> #macro Pyramid_4_Side(Apex,Height,Side)
> prism
> {
> conic_sweep
> 1,
> 1-Height/Apex,
> 5,
> <Side, Side >,
> <-Side, Side >,
> <-Side, -Side >,
> <Side, -Side >,
> <Side, Side >
> scale <1,Apex,1>
> rotate <180, 0, 0>
> translate <0, Apex, 0>
> }
> #end
>
> object { Pyramid_4_Side(204,38,32)
> pigment { Red }
> }
> //-----------------end of program
> ------------
> dav### [at] cwcomnet
> http://www.hamiltonite.mcmail.com
> ------------
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|