|
![](/i/fill.gif) |
> I'm having a problem with a sphere-sweep that looks like the bounding box
> is too small: some of it is not shown. It's not related to the tolerance
> setting or self-shadowing, nor seem it to be a precision problem, as
> scaling it all larger or smaller makes no difference. I also tried to
> apply my own larger bounding_box, but it makes no difference. Any pointers
> what I can do?
Yeah, sphere_sweeps are bugged. I wish they weren't.
I'd use a macro...
#macro Sweep(SPL, from, to, rez)
#local eval_to = to;
#local C = from;
sphere {<SPL(C).x,SPL(C).y,SPL(C).z>,SPL(C).t}
#while (C<eval_to-rez)
cone {<SPL(C).x,SPL(C).y,SPL(C).z>,SPL(C).t,
<SPL(C+rez).x,SPL(C+rez).y,SPL(C+rez).z>,SPL(C+rez).t}
sphere {<SPL(C+rez).x,SPL(C+rez).y,SPL(C+rez).z>,
SPL(C+rez).t}
#local C=C+rez;
#end
#end
#declare Foo = spline {
cubic_spline
-0.33, <0, -6.0, 0.00, 0.12 >,
0.00, <0, -6.0, 0.00, 0.12 >,
0.33, <0, -0.2, 0.07, 0.05 >,
0.66, <0, 2.1, 0.70, 0.01 >,
1.00, <0, 2.5, 2.50, 0.0001>,
1.33, <0, 2.5, 2.50, 0.0001>
};
#declare Bar = union {Sweep(Foo, 0, 1, 0.01)};
#declare FlowerAlignments = array[3]
{1.24*<1,1,1>, <-65, 5,-50>, <8.1,-7.8,30>},
union {
#declare C = 0;
#while (C<6)
object { Bar
rotate 60*y*C
}
#declare C = C+1;
#end
pigment {rgb <1.50,0.90,0.00>}
translate -y
scale FlowerAlignments[0]
rotate FlowerAlignments[1]*<0,1,0>
rotate FlowerAlignments[1]*<1,0,1>
translate FlowerAlignments[2]
}
camera {
location -FlowerAlignments[2]
look_at 0
angle FlowerAlignments[0].x*5
translate FlowerAlignments[2]
}
light_source {< 1, 2,-3>*1000, rgb 1.0}
light_source {<-3, 1,-2>*1000, rgb 0.6}
light_source {<-1,-3,-2>*1000, rgb 0.6}
Post a reply to this message
|
![](/i/fill.gif) |