|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |