POV-Ray : Newsgroups : povray.newusers : prism and (not) rounded corners Server Time
27 Dec 2024 00:33:22 EST (-0500)
  prism and (not) rounded corners (Message 1 to 9 of 9)  
From: marabou
Subject: prism and (not) rounded corners
Date: 11 Oct 2006 10:11:55
Message: <20061011161122.772637e1.not@available.yet>
hello,

I did fight again through Pov-man related to prisms but did not find any solution for
this:
aim is to produce a nearly quadratic prism with rounded edges. 
superellipsoid does not fulfill my needs because one side is shorter than opposit one.
radius should be low|small(?).
but now cubic_spline in superellipsoid produces stars at the corners.

does anybody have a clue, why? and how can it be done better?

thank you in advance

code follows:
#version 3.6

//povray +Iprismtest.pov +Oprismtest.png +W640 +H480 +A0.01 +p +Q9

camera {
   location <0,3,0>
	look_at <0,0,-0>
	}

light_source {
	< 0,10,0>
	color rgb <255,255,255>/255
}

#declare ar_prism = array[15]{
<2,-1.9>,

<1.85,1.95>,
<1.7,2>,
<-1.7,2>,
<-1.85,1.95>,

<-1.9,1.8>,
<-2,-1.9>,
<-1.95,-2.05>
<-1.8,-2.1>

<1.8,-2.1>,
<1.95,-2.05>,
<2,-1.9>,
<1.9,1.8>,
<1.85,1.95>,

<1.7,2>
}

#declare pricnt = 0;
#declare max_pricnt = dimension_size(ar_prism,1);
prism {
cubic_spline
//linear_spline
0, 
1, 
max_pricnt, 
#while (pricnt<(max_pricnt-1))
	ar_prism[pricnt],
	#declare pricnt = pricnt + 1;
#end //while
ar_prism[pricnt]
pigment { color <255,255,255>/255 }
scale <0.3,1,0.25>
}

#declare cnt = 0;
#declare max_cnt = dimension_size(ar_prism,1);
union{
#while (cnt<max_cnt)
	sphere {
		<ar_prism[cnt].x, 4, ar_prism[cnt].y>, .05
		pigment { color <255,0,0>/255 }
	}
	#declare cnt = cnt + 1;
#end //while
scale <0.3,0.25,0.25>
}


Post a reply to this message

From: Bill Pragnell
Subject: Re: prism and (not) rounded corners
Date: 11 Oct 2006 10:45:00
Message: <web.452d02ae72cd667d731f01d10@news.povray.org>
Hello!

For prisms (and lathes) I have found the open source drawing program
Inkscape (http://www.inkscape.org/) to be invaluable - it's very easy to
manipulate curves, and then you can export the drawing as a POV-Ray bezier
spline. All you need to do is cut and paste the object definition into your
scene, or #include the saved file.

Hope that helps
Bill


Post a reply to this message

From: Penelope20k
Subject: Re: prism and (not) rounded corners
Date: 11 Oct 2006 10:49:36
Message: <452d0480$1@news.povray.org>
what are you trying to do ..

a simple cube with all same round edges ?
a piece of sugar with same round edge radius?
a tronqued pyramid ?


something else



news:200### [at] availableyet...
> hello,
>
> I did fight again through Pov-man related to prisms but did not find any
solution for this:
> aim is to produce a nearly quadratic prism with rounded edges.
> superellipsoid does not fulfill my needs because one side is shorter than
opposit one.
> radius should be low|small(?).
> but now cubic_spline in superellipsoid produces stars at the corners.
>
> does anybody have a clue, why? and how can it be done better?
>
> thank you in advance
>
> code follows:
> #version 3.6
>
> //povray +Iprismtest.pov +Oprismtest.png +W640 +H480 +A0.01 +p +Q9
>
> camera {
>    location <0,3,0>
> look_at <0,0,-0>
> }
>
> light_source {
> < 0,10,0>
> color rgb <255,255,255>/255
> }
>
> #declare ar_prism = array[15]{
> <2,-1.9>,
>
> <1.85,1.95>,
> <1.7,2>,
> <-1.7,2>,
> <-1.85,1.95>,
>
> <-1.9,1.8>,
> <-2,-1.9>,
> <-1.95,-2.05>
> <-1.8,-2.1>
>
> <1.8,-2.1>,
> <1.95,-2.05>,
> <2,-1.9>,
> <1.9,1.8>,
> <1.85,1.95>,
>
> <1.7,2>
> }
>
> #declare pricnt = 0;
> #declare max_pricnt = dimension_size(ar_prism,1);
> prism {
> cubic_spline
> //linear_spline
> 0,
> 1,
> max_pricnt,
> #while (pricnt<(max_pricnt-1))
> ar_prism[pricnt],
> #declare pricnt = pricnt + 1;
> #end //while
> ar_prism[pricnt]
> pigment { color <255,255,255>/255 }
> scale <0.3,1,0.25>
> }
>
> #declare cnt = 0;
> #declare max_cnt = dimension_size(ar_prism,1);
> union{
> #while (cnt<max_cnt)
> sphere {
> <ar_prism[cnt].x, 4, ar_prism[cnt].y>, .05
> pigment { color <255,0,0>/255 }
> }
> #declare cnt = cnt + 1;
> #end //while
> scale <0.3,0.25,0.25>
> }
>
>


Post a reply to this message

From: Penelope20k
Subject: Re: prism and (not) rounded corners
Date: 11 Oct 2006 11:06:13
Message: <452d0865$1@news.povray.org>
if its more coplicated than that then you must sphere_sweep all the edges
and corners of your volume (or if you dont like sphere_sweep, you should use
cylinder and spheres}
then use prism for complete the gaps ..




news:452d0480$1@news.povray.org...
> what are you trying to do ..
>
> a simple cube with all same round edges ?
> a piece of sugar with same round edge radius?
> a tronqued pyramid ?
>
>
> something else
>
>

> news:200### [at] availableyet...
> > hello,
> >
> > I did fight again through Pov-man related to prisms but did not find any
> solution for this:
> > aim is to produce a nearly quadratic prism with rounded edges.
> > superellipsoid does not fulfill my needs because one side is shorter
than
> opposit one.
> > radius should be low|small(?).
> > but now cubic_spline in superellipsoid produces stars at the corners.
> >
> > does anybody have a clue, why? and how can it be done better?
> >
> > thank you in advance
> >
> > code follows:
> > #version 3.6
> >
> > //povray +Iprismtest.pov +Oprismtest.png +W640 +H480 +A0.01 +p +Q9
> >
> > camera {
> >    location <0,3,0>
> > look_at <0,0,-0>
> > }
> >
> > light_source {
> > < 0,10,0>
> > color rgb <255,255,255>/255
> > }
> >
> > #declare ar_prism = array[15]{
> > <2,-1.9>,
> >
> > <1.85,1.95>,
> > <1.7,2>,
> > <-1.7,2>,
> > <-1.85,1.95>,
> >
> > <-1.9,1.8>,
> > <-2,-1.9>,
> > <-1.95,-2.05>
> > <-1.8,-2.1>
> >
> > <1.8,-2.1>,
> > <1.95,-2.05>,
> > <2,-1.9>,
> > <1.9,1.8>,
> > <1.85,1.95>,
> >
> > <1.7,2>
> > }
> >
> > #declare pricnt = 0;
> > #declare max_pricnt = dimension_size(ar_prism,1);
> > prism {
> > cubic_spline
> > //linear_spline
> > 0,
> > 1,
> > max_pricnt,
> > #while (pricnt<(max_pricnt-1))
> > ar_prism[pricnt],
> > #declare pricnt = pricnt + 1;
> > #end //while
> > ar_prism[pricnt]
> > pigment { color <255,255,255>/255 }
> > scale <0.3,1,0.25>
> > }
> >
> > #declare cnt = 0;
> > #declare max_cnt = dimension_size(ar_prism,1);
> > union{
> > #while (cnt<max_cnt)
> > sphere {
> > <ar_prism[cnt].x, 4, ar_prism[cnt].y>, .05
> > pigment { color <255,0,0>/255 }
> > }
> > #declare cnt = cnt + 1;
> > #end //while
> > scale <0.3,0.25,0.25>
> > }
> >
> >
>
>


Post a reply to this message

From: marabou
Subject: Re: prism and (not) rounded corners
Date: 11 Oct 2006 11:51:12
Message: <pan.2006.10.11.15.50.32.981150@available.yet>
Am Wed, 11 Oct 2006 18:03:01 +0200 schrieb Penelope20k:

> what are you trying to do ..
> 
> a simple cube with all same round edges ?

no.

> a piece of sugar with same round edge radius?

no. no cube.

> a tronqued pyramid ?
> 
sorry for my english: what is that?

> 
> something else
> 

something like parallelogram.

> 

> news:200### [at] availableyet...
>> hello,
>>
>> I did fight again through Pov-man related to prisms but did not find any
> solution for this:
>> aim is to produce a nearly quadratic prism with rounded edges.
>> superellipsoid does not fulfill my needs because one side is shorter than
> opposit one.
>> radius should be low|small(?).
>> but now cubic_spline in superellipsoid produces stars at the corners.
>>
>> does anybody have a clue, why? and how can it be done better?
>>


Post a reply to this message

From: marabou
Subject: Re: prism and (not) rounded corners
Date: 11 Oct 2006 12:13:26
Message: <pan.2006.10.11.16.12.48.918959@available.yet>
Am Wed, 11 Oct 2006 11:41:50 -0400 schrieb Bill Pragnell:

> Hello!
> 
> For prisms (and lathes) I have found the open source drawing program
> Inkscape (http://www.inkscape.org/) to be invaluable - it's very easy to
> manipulate curves, and then you can export the drawing as a POV-Ray bezier
> spline. All you need to do is cut and paste the object definition into your
> scene, or #include the saved file.
> 
> Hope that helps
> Bill

great idea. I did it yet with other 2D objects.
does is not fuction with cubic_spline?


Post a reply to this message

From: marabou
Subject: Re: prism and (not) rounded corners
Date: 11 Oct 2006 16:22:55
Message: <pan.2006.10.11.20.22.20.44706@available.yet>
On Wed, 11 Oct 2006 11:41:50 -0400 Bill Pragnell wrote:

> Hello!
> 
> For prisms (and lathes) I have found the open source drawing program
> Inkscape (http://www.inkscape.org/) to be invaluable - it's very easy to
> manipulate curves, and then you can export the drawing as a POV-Ray bezier
> spline. All you need to do is cut and paste the object definition into your
> scene, or #include the saved file.
> 
> Hope that helps
> Bill

but it was not my aim. i want a prism.


Post a reply to this message

From: Tim Attwood
Subject: Re: prism and (not) rounded corners
Date: 11 Oct 2006 17:36:37
Message: <452d63e5@news.povray.org>
> but now cubic_spline in superellipsoid produces stars at the corners.
> does anybody have a clue, why? and how can it be done better?

Cubic means that POV attempts to fit each set of 3 points to a curve,
because your prism has sides that are long and flat and the corners are
mostly sharp, the long sides have more "weight", to avoid this just add
a few points on the flat part close to the corners, which means 5
points for a corner.

I like SplilinEditor, it exports lathes and prisms...
http://www.flashnet.it/users/fn027571/spil/index.html


Post a reply to this message

From: Tek
Subject: Re: prism and (not) rounded corners
Date: 14 Oct 2006 09:50:07
Message: <4530eb0f@news.povray.org>
If I'm understanding you correctly, you can do this with CSG. Though 
admittedly it's a lot harder than just doing a rounded box. I was just going 
to dump some code here but it's way too long, so I've put something in 
povray.binaries.scene-files called "rounded boxoids", because I don't know 
what the correct mathematical term for that shape is.

I've also posted an image in p.b.i so people can see what I think marabou is 
asking for.

-- 
Tek
http://evilsuperbrain.com

"marabou" <not### [at] availableyet> wrote in message 
news:200### [at] availableyet...
> hello,
>
> I did fight again through Pov-man related to prisms but did not find any 
> solution for this:
> aim is to produce a nearly quadratic prism with rounded edges.
> superellipsoid does not fulfill my needs because one side is shorter than 
> opposit one.
> radius should be low|small(?).
> but now cubic_spline in superellipsoid produces stars at the corners.
>
> does anybody have a clue, why? and how can it be done better?
>
> thank you in advance
>
> code follows:
> #version 3.6
>
> //povray +Iprismtest.pov +Oprismtest.png +W640 +H480 +A0.01 +p +Q9
>
> camera {
>   location <0,3,0>
> look_at <0,0,-0>
> }
>
> light_source {
> < 0,10,0>
> color rgb <255,255,255>/255
> }
>
> #declare ar_prism = array[15]{
> <2,-1.9>,
>
> <1.85,1.95>,
> <1.7,2>,
> <-1.7,2>,
> <-1.85,1.95>,
>
> <-1.9,1.8>,
> <-2,-1.9>,
> <-1.95,-2.05>
> <-1.8,-2.1>
>
> <1.8,-2.1>,
> <1.95,-2.05>,
> <2,-1.9>,
> <1.9,1.8>,
> <1.85,1.95>,
>
> <1.7,2>
> }
>
> #declare pricnt = 0;
> #declare max_pricnt = dimension_size(ar_prism,1);
> prism {
> cubic_spline
> //linear_spline
> 0,
> 1,
> max_pricnt,
> #while (pricnt<(max_pricnt-1))
> ar_prism[pricnt],
> #declare pricnt = pricnt + 1;
> #end //while
> ar_prism[pricnt]
> pigment { color <255,255,255>/255 }
> scale <0.3,1,0.25>
> }
>
> #declare cnt = 0;
> #declare max_cnt = dimension_size(ar_prism,1);
> union{
> #while (cnt<max_cnt)
> sphere {
> <ar_prism[cnt].x, 4, ar_prism[cnt].y>, .05
> pigment { color <255,0,0>/255 }
> }
> #declare cnt = cnt + 1;
> #end //while
> scale <0.3,0.25,0.25>
> }
>
>


Post a reply to this message

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