POV-Ray : Newsgroups : povray.general : Conic Sweep questiom Server Time
11 Aug 2024 13:24:07 EDT (-0400)
  Conic Sweep questiom (Message 1 to 4 of 4)  
From: Steve
Subject: Conic Sweep questiom
Date: 1 Aug 1999 15:51:10
Message: <37A4A68A.F91315F8@puzzlecraft.com>
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

From: Alberto
Subject: Re: Conic Sweep questiom
Date: 1 Aug 1999 17:15:08
Message: <37A4B951.76F105FB@ma.usb.ve>
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

From: David Wilkinson
Subject: Re: Conic Sweep questiom
Date: 2 Aug 1999 17:01:51
Message: <37a6028b.23909897@news.povray.org>
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

From: Steve
Subject: Re: Conic Sweep questiom
Date: 2 Aug 1999 17:51:15
Message: <37A61454.E86C0550@puzzlecraft.com>
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

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