|
|
"twister" <twi### [at] o2pl> wrote in message
news:web.499e8fba4c7fcf678896485d0@news.povray.org...
>I have noticed that when I use shapes (with splines according to your
>macro)
> that are curved much and width of 'road' is big enough, there are some
> holes in
> the output shape. Some kind of intersection must occur then. Is there any
> solution for that?
>
Yes, if the radius of curvature of the spline is less than half the width of
the road, then the inner edge of the curve effectively loops back on itself
(the 'left' vectors from successive positions along the spline start to
cross over each other). The prism object determines the inside and outside
of the object based on the number of times you have to pass through the
perimeter to get outside it, so POV-Ray thinks of these folds as being
hollows within the main body of the prism.
In some specific cases it may help to adjust the number of slices used. I
used 100. A far lower figure may help in certain cases, but the straight
edges will become more visible and success in this would be very much down
to luck.
If you want to do hairpin bends or Z shapes with neat creases then you'll
have to make sure that the radius of curvature of the central spline is
never less than half the width of the 'road'. If you only get these tight
curves on one side of the 'road', you could achieve this by adjusting the
technique to follow a spline that defines that edge of the 'road' on the
'outward' journey and a line that is displaced by twice as much on the
'return' journey.
The other technique, using a union of spheres (or vertical cylinders) to
follow the line of the spline, doesn't suffer from this problem. If you find
it isn't smooth enough for your needs you could simply increase the number
of spheres/cylinders until it is.
Regards,
Chris B.
Post a reply to this message
|
|