POV-Ray : Newsgroups : povray.general : How to use Rounded Prism for objects with void? Server Time
24 Nov 2024 07:00:57 EST (-0500)
  How to use Rounded Prism for objects with void? (Message 1 to 3 of 3)  
From: Kima
Subject: How to use Rounded Prism for objects with void?
Date: 28 Jan 2020 13:20:00
Message: <web.5e307b1e33de45afecc0fada0@news.povray.org>
The macro given at http://www.slimeland.com/misc/roundedprism.inc is very handy
for building a rounded prism. However, I cannot create any rounded prism if the
object has a void within like
https://www.povray.org/documentation/images/tutorial/subshape.png

How can I create a rounded prism for an object like

prism {
    linear_sweep
    cubic_spline
    0,  // sweep the following shape from here ...
    1,  // ... up through here
    18, // the number of points making up the shape ...
    <3,-5>, <3,5>, <-5,0>, <3, -5>, <3,5>, <-5,0>,//sub-shape #1
    <2,-4>, <2,4>, <-4,0>, <2,-4>, <2,4>, <-4,0>, //sub-shape #2
    <1,-3>, <1,3>, <-3,0>, <1, -3>, <1,3>, <-3,0> //sub-shape #3
    pigment { Green }
  }


Post a reply to this message

From: JimT
Subject: Re: How to use Rounded Prism for objects with void?
Date: 29 Jan 2020 12:50:00
Message: <web.5e31c4ee23de503bbe7517870@news.povray.org>
"Kima" <nomail@nomail> wrote:
> The macro given at http://www.slimeland.com/misc/roundedprism.inc is very handy
> for building a rounded prism. However, I cannot create any rounded prism if the
> object has a void within like
> https://www.povray.org/documentation/images/tutorial/subshape.png
>
> How can I create a rounded prism for an object like
>
> prism {
>     linear_sweep
>     cubic_spline
>     0,  // sweep the following shape from here ...
>     1,  // ... up through here
>     18, // the number of points making up the shape ...
>     <3,-5>, <3,5>, <-5,0>, <3, -5>, <3,5>, <-5,0>,//sub-shape #1
>     <2,-4>, <2,4>, <-4,0>, <2,-4>, <2,4>, <-4,0>, //sub-shape #2
>     <1,-3>, <1,3>, <-3,0>, <1, -3>, <1,3>, <-3,0> //sub-shape #3
>     pigment { Green }
>   }

The incredible Sam Benge provided his Rounded Linear Prism macros back in 2010.
You can find them in the POV-Ray Object Collection - in the Resources section of
Home, same place as these newsgroups.

Don't know if you have seen these and rejected them, but you don't mention them.
The example he gives is a P. I think that is what you mean by void.

If you search on rounded prism and wade through a few results you will get to
the posts. Sam called them the rlp macros.

They took only straight lines and circular arcs, but this turned out to be less
of a restriction than you might think, given that sharp corners, that is corners
from line segment to line line segment rather than line segment to circular arc,
could be rounded.

JimT


Post a reply to this message

From: Kima
Subject: Re: How to use Rounded Prism for objects with void?
Date: 29 Jan 2020 19:10:00
Message: <web.5e321e1d23de503becc0fada0@news.povray.org>
"JimT" <nomail@nomail> wrote:
> "Kima" <nomail@nomail> wrote:
> > The macro given at http://www.slimeland.com/misc/roundedprism.inc is very handy
> > for building a rounded prism. However, I cannot create any rounded prism if the
> > object has a void within like
> > https://www.povray.org/documentation/images/tutorial/subshape.png
> >
> > How can I create a rounded prism for an object like
> >
> > prism {
> >     linear_sweep
> >     cubic_spline
> >     0,  // sweep the following shape from here ...
> >     1,  // ... up through here
> >     18, // the number of points making up the shape ...
> >     <3,-5>, <3,5>, <-5,0>, <3, -5>, <3,5>, <-5,0>,//sub-shape #1
> >     <2,-4>, <2,4>, <-4,0>, <2,-4>, <2,4>, <-4,0>, //sub-shape #2
> >     <1,-3>, <1,3>, <-3,0>, <1, -3>, <1,3>, <-3,0> //sub-shape #3
> >     pigment { Green }
> >   }
>
> The incredible Sam Benge provided his Rounded Linear Prism macros back in 2010.
> You can find them in the POV-Ray Object Collection - in the Resources section of
> Home, same place as these newsgroups.
>
> Don't know if you have seen these and rejected them, but you don't mention them.
> The example he gives is a P. I think that is what you mean by void.
>
> If you search on rounded prism and wade through a few results you will get to
> the posts. Sam called them the rlp macros.
>
> They took only straight lines and circular arcs, but this turned out to be less
> of a restriction than you might think, given that sharp corners, that is corners
> from line segment to line line segment rather than line segment to circular arc,
> could be rounded.
>
> JimT

Thanks very much. When you mentioned "P", I just recalled that I've already seen
it. Funny enough, I didn't need to search for it as I could find it on my
computer. So silly of me.

Anyhow, you saved me from re-inventing the wheel.


Post a reply to this message

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