POV-Ray : Newsgroups : povray.newusers : Height of a polygon. Server Time
14 May 2024 10:04:21 EDT (-0400)
  Height of a polygon. (Message 1 to 3 of 3)  
From: gharryh
Subject: Height of a polygon.
Date: 22 Jun 2013 16:40:01
Message: <web.51c60b85f9759873520168c30@news.povray.org>
I created a polygon to make a object that has rounded edges.
Its works wel apart that i cant get the height of the polygon any larger.
{code]
#declare housing_grnd =
difference {
    union {
        polygon{
            21,
            <17.925,28.575>,  <-17.925,28.575>, <-18.925,27.575>,
<-18.925,18.925>,
            <-27.575,18.925>, <-28.575,17.925>,
<-28.575,-17.925>,<-27.575,-18.925>,

<-18.925,-18.925>,<-18.925,-27.575>,<-17.925,-28.575>,<17.925,-28.575>,
            <18.925,-27.575>, <18.925,-18.925>, <27.575,-18.925>,
<28.575,-17.925>,
            <28.575,17.925>,  <27.575,18.925>,  <18.925,18.925>,
<18.925,27.575>,
            <17.925,28.575>
            pigment{ Red }
            rotate<90,0,0>
            scale<1,2,1>
        }
        cylinder{<-27.575,.05,17.925><-27.575,-.05,17.925>1  material{ MyRedLed
} }
        cylinder{<27.575,.05,17.925><27.575,-.05,17.925>1  material{ MyRedLed }
}
        cylinder{<-27.575,.05,-17.925><-27.575,-.05,-17.925>1  material{
MyRedLed } }
        cylinder{<27.575,.05,-17.925><27.575,-.05,-17.925>1  material{ MyRedLed
} }
        cylinder{<-17.925,.05,27.575><-17.925,-.05,27.575>1  material{ MyRedLed
} }
        cylinder{<17.925,.05,27.575><17.925,-.05,27.575>1  material{ MyRedLed }
}
        cylinder{<-17.925,.05,-27.575><-17.925,-.05,-27.575>1  material{
MyRedLed } }
        cylinder{<17.925,.05,-27.575><17.925,-.05,-27.575>1  material{ MyRedLed
} }
    }
}
[/code]
Looking from above the polygon looks like it should be.
From the side it looks that there is no polygon.
It needs to be as thick as the rounds at the edgd\es.
Acoording to the documentation it says:
    }
    //scale and rotate as needed here
  }
But the scale modifier seems not to work.


Post a reply to this message

From: William F Pokorny
Subject: Re: Height of a polygon.
Date: 22 Jun 2013 20:14:10
Message: <51c63dd2$1@news.povray.org>
On 06/22/2013 04:39 PM, gharryh wrote:
> I created a polygon to make a object that has rounded edges.
> Its works wel apart that i cant get the height of the polygon any larger.
> {code]
...
> [/code]
> Looking from above the polygon looks like it should be.
>  From the side it looks that there is no polygon.
> It needs to be as thick as the rounds at the edgd\es.
> Acoording to the documentation it says:
>      }
>      //scale and rotate as needed here
>    }
> But the scale modifier seems not to work.
>
>
The polygon object is in the same class of objects as the disc. It is 
completely flat so the scale in y of 2 in your code is a scale of an 
object with thickness 0.0.

You can instead use a prism :

prism {
     linear_spline
     linear_sweep
     0.0, 0.05, 21,
     <17.9250,28.5750>
     <-17.9250,28.5750>
     <-18.9250,27.5750>
     <-18.9250,18.9250>
     <-27.5750,18.9250>
     <-28.5750,17.9250>
     <-28.5750,-17.9250>
     <-27.5750,-18.9250>
     <-18.9250,-18.9250>
     <-18.9250,-27.5750>
     <-17.9250,-28.5750>
     <17.9250,-28.5750>
     <18.9250,-27.5750>
     <18.9250,-18.9250>
     <27.5750,-18.9250>
     <28.5750,-17.9250>
     <28.5750,17.9250>
     <27.5750,18.9250>
     <18.9250,18.9250>
     <18.9250,27.5750>
     <17.9250,28.5750>
     pigment { color Red }
     translate <0.0,-0.025,0.0>
     rotate <90.0,0,0>
}

Bill P.


Post a reply to this message

From: Alain
Subject: Re: Height of a polygon.
Date: 24 Jun 2013 13:51:45
Message: <51c88731$1@news.povray.org>

> I created a polygon to make a object that has rounded edges.
> Its works wel apart that i cant get the height of the polygon any larger.
>

A polygon have NO thickness at all. It all lay in a single plane. It's 
strictly a 2D object. Like a triangle, it's only a flat surface, and you 
don't have any normal control like you would with a smooth_triangle.

If you want a thickness, you need to use a prism object.


Post a reply to this message

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