|
|
I am no expert in quadratic splines. Actually, I have forgotten most of
what I once knew about them. I have a question about how POV-Ray generates
splines. I have included at the bottom of this epistle the sample page
found in the POV-Ray 3.1 docs in the tutorial section.
If I redefine the points from the example to be this:
#declare Red_Point = <0.00, 0.000, 0>;
#declare Orange_Point = <1., 1.00, 0>;
#declare Yellow_Point = <2.50, 2.00, 0>;
#declare Green_Point = <2.00, 3.00, 0>;
#declare Blue_Point = <1.50, 4.00, 0>;
I get a lovely lathe object. If, however, I move the Red_Point a bit up in
the Y direction, like this:
#declare Red_Point = <0.00, 0.100, 0>;
then I suddenly get a bunch of white lines in the lower half of my lathe
object instead of a solid white object. The lines appear for values from .1
to 1.2. I also get lines for negative values.
Can someone explain what's going on?
Thanks,
Hershel
PS: In case you don't have it handy, here is the full code:
#include "colors.inc"
camera {
orthographic
up <0, 5, 0>
right <5, 0, 0>
location <2.5, 2.5, -100>
look_at <2.5, 2.5, 0>
}
/* set the control points to be used */
#declare Red_Point = <1.00, 0.00, 0>;
#declare Orange_Point = <1.75, 1.00, 0>;
#declare Yellow_Point = <2.50, 2.00, 0>;
#declare Green_Point = <2.00, 3.00, 0>;
#declare Blue_Point = <1.50, 4.00, 0>;
/* make the control points visible */
cylinder { Red_Point, Red_Point - 20*z, .1
pigment { Red }
finish { ambient 1 }
}
cylinder { Orange_Point, Orange_Point - 20*z, .1
pigment { Orange }
finish { ambient 1 }
}
cylinder { Yellow_Point, Yellow_Point - 20*z, .1
pigment { Yellow }
finish { ambient 1 }
}
cylinder { Green_Point, Green_Point - 20*z, .1
pigment { Green }
finish { ambient 1 }
}
cylinder { Blue_Point, Blue_Point- 20*z, .1
pigment { Blue }
finish { ambient 1 }
}
/* something to make the curve show up */
lathe {
linear_spline
5,
Red_Point,
Orange_Point,
Yellow_Point,
Green_Point,
Blue_Point
pigment { White }
finish { ambient 1 }
}
Post a reply to this message
|
|
|
|
Wasn't it Hershel Robinson who wrote:
>I am no expert in quadratic splines. Actually, I have forgotten most of
>what I once knew about them. I have a question about how POV-Ray generates
>splines. I have included at the bottom of this epistle the sample page
>found in the POV-Ray 3.1 docs in the tutorial section.
>
>If I redefine the points from the example to be this:
>
> #declare Red_Point = <0.00, 0.000, 0>;
> #declare Orange_Point = <1., 1.00, 0>;
> #declare Yellow_Point = <2.50, 2.00, 0>;
> #declare Green_Point = <2.00, 3.00, 0>;
> #declare Blue_Point = <1.50, 4.00, 0>;
>
>I get a lovely lathe object. If, however, I move the Red_Point a bit up in
>the Y direction, like this:
>
> #declare Red_Point = <0.00, 0.100, 0>;
>
>then I suddenly get a bunch of white lines in the lower half of my lathe
>object instead of a solid white object. The lines appear for values from .1
>to 1.2. I also get lines for negative values.
>
>Can someone explain what's going on?
The help file says:
Sturm
Some of POV-Ray's objects allow you to choose between a fast but
sometimes inaccurate root solver and a slower but more accurate one.
This is the case for all objects that involve the solution of a
cubic or quartic polynomial.
If you add the keyword "sturm" to your lathe object you'll find that the
lines disappear. This just happens to be a case where the inaccuracy of
the fast root solver is particularly noticeable.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|