|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I can use bezier_spline set of points in lathe as
lathe {
bezier_spline
80
<2.00, 1.00>, <1.00, 1.50>, <3.00, 3.50>, <2.00, 4.00>
<2.00, 4.00>, <3.00, 4.50>, <1.00, 6.50>,<2.00, 7.00>
pigment { color rgbt<0.4,0.2,1,.5>}
finish { ambient 1 }
}
but when I use the same set in prism as
prism {
bezier_spline
0,1,1,
// 80
<2.00, 1.00>, <1.00, 1.50>, <3.00, 3.50>, <2.00, 4.00>
<2.00, 4.00>, <3.00, 4.50>, <1.00, 6.50>,<2.00, 7.00>
pigment { color rgbt<0.4,0.2,1,.5>}
finish { ambient 1 }
}
I get an error, "Prism with Bezier splines must have four points per segment."
Where did I do wrong?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 8/19/19 3:18 PM, Kima wrote:
> I can use bezier_spline set of points in lathe as
>
> lathe {
> bezier_spline
> 80
> <2.00, 1.00>, <1.00, 1.50>, <3.00, 3.50>, <2.00, 4.00>
> <2.00, 4.00>, <3.00, 4.50>, <1.00, 6.50>,<2.00, 7.00>
> pigment { color rgbt<0.4,0.2,1,.5>}
> finish { ambient 1 }
> }
>
> but when I use the same set in prism as
>
> prism {
> bezier_spline
> 0,1,1,
> // 80
> <2.00, 1.00>, <1.00, 1.50>, <3.00, 3.50>, <2.00, 4.00>
> <2.00, 4.00>, <3.00, 4.50>, <1.00, 6.50>,<2.00, 7.00>
> pigment { color rgbt<0.4,0.2,1,.5>}
> finish { ambient 1 }
> }
>
> I get an error, "Prism with Bezier splines must have four points per segment."
> Where did I do wrong?
>
>
Hi. Not sure how either works. In the first where you have '80' I think
it should be '8,'. In the second where you have '0,1,1,' I think
'0,1,8,' is what is needed. In the latter the parser is probably seeing
the 1 as the point count and saying you need at least 4 for a valid
segment.
Bill P.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
William F Pokorny <ano### [at] anonymousorg> wrote:
> On 8/19/19 3:18 PM, Kima wrote:
> > I can use bezier_spline set of points in lathe as
> >
> > lathe {
> > bezier_spline
> > 80
> > <2.00, 1.00>, <1.00, 1.50>, <3.00, 3.50>, <2.00, 4.00>
> > <2.00, 4.00>, <3.00, 4.50>, <1.00, 6.50>,<2.00, 7.00>
> > pigment { color rgbt<0.4,0.2,1,.5>}
> > finish { ambient 1 }
> > }
> >
> > but when I use the same set in prism as
> >
> > prism {
> > bezier_spline
> > 0,1,1,
> > // 80
> > <2.00, 1.00>, <1.00, 1.50>, <3.00, 3.50>, <2.00, 4.00>
> > <2.00, 4.00>, <3.00, 4.50>, <1.00, 6.50>,<2.00, 7.00>
> > pigment { color rgbt<0.4,0.2,1,.5>}
> > finish { ambient 1 }
> > }
> >
> > I get an error, "Prism with Bezier splines must have four points per segment."
> > Where did I do wrong?
> >
> >
> Hi. Not sure how either works. In the first where you have '80' I think
> it should be '8,'. In the second where you have '0,1,1,' I think
> '0,1,8,' is what is needed. In the latter the parser is probably seeing
> the 1 as the point count and saying you need at least 4 for a valid
> segment.
>
> Bill P.
Thanks, Bill. 80 in lathe was a typo, as I clipped a larger bezier_spline set
for readability here. My mistake was the third parameter of prism. Now
everything works perfectly. Thank you very much.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I tried the fixed prism, but that doesn't work for me. The lathe works fine, but
with the prism, I only see nothing. Thats my code:
#version 3.7; // 3.7
global_settings{assumed_gamma 1.0}
#default{ finish{ ambient 0.2 diffuse 0.9 }}
#default{pigment{rgb <0.800, 0.800, 0.800>}}
//------------------------------------------
#include "colors.inc"
#include "textures.inc"
//------------------------------------------
// camera ----------------------------------
#declare CamUp = < 0, 0, 1>;
#declare CamRight = <1.33, 0, 0>;
#declare CamRotation = <-35.264390534, 1.9538003485e-05, 45.0000026303>;
#declare CamPosition = <17.0710754395, -7.07106590271, 17.0710659027>;
camera {
location <0, 0, 0>
direction < 0, 1, 0>
up CamUp
right CamRight
rotate CamRotation
translate CamPosition
angle 57.82
}
// sun -------------------------------------
light_source { <17.0710754395, -7.07106590271, 17.0710659027> color rgb<0.5,
0.5, 0.5> }
// background ------------------------------
sky_sphere {
pigment {
gradient z
color_map {
[ 0.00 color rgb<0.098, 0.667, 0.067> ]
[ 0.30 color rgb<0.098, 0.667, 0.067> ]
[ 0.50 color rgb<0.576, 0.000, 0.000> ]
[ 0.70 color rgb<0.200, 0.200, 0.396> ]
[ 1.00 color rgb<0.200, 0.200, 0.396> ]
}
scale 2
translate -1
rotate<-35.264390534, 1.9538003485e-05, 45.0000026303>
}
}
//------------------------------------------
// objects in scene ------------------------
prism {
bezier_spline
0,.2,8,
<2.00, 1.00>, <1.00, 1.50>, <3.00, 3.50>, <2.00, 4.00>
<2.00, 4.00>, <3.00, 4.50>, <1.00, 6.50>,<2.00, 7.00>
pigment { color rgbt<0.4,0.2,1,.5>}
finish { ambient 1 }
}
/*
lathe {
bezier_spline
8
<2.00, 1.00>, <1.00, 1.50>, <3.00, 3.50>, <2.00, 4.00>
<2.00, 4.00>, <3.00, 4.50>, <1.00, 6.50>,<2.00, 7.00>
pigment { color rgbt<0.4,0.2,1,.5>}
finish { ambient 1 }
}*/
Thanks in advance!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
"Usb Hub" <nomail@nomail> wrote:
> I tried the fixed prism, but that doesn't work for me. The lathe works fine, but
> with the prism, I only see nothing. Thats my code:
when I comment out bezier_spline, ie using default spline type, the prism shows.
otherwise POV-Ray complains about prism "not closed". hth.
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "Usb Hub" <nomail@nomail> wrote:
> > I tried the fixed prism, but that doesn't work for me. The lathe works fine, but
> > with the prism, I only see nothing. Thats my code:
>
> when I comment out bezier_spline, ie using default spline type, the prism shows.
> otherwise POV-Ray complains about prism "not closed". hth.
>
>
> regards, jr.
OK, that's crazy :) With my POV-ray on Linux Mint 19 Cinnamon there a no errors,
also with the not outcommented bezier_spline. The only thing POV-Ray shows me,
is
that (with both, outcommented and not outcommented):
Ray->Shape Intersection
usbhub
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
"Usb Hub" <nomail@nomail> wrote:
> "jr" <cre### [at] gmailcom> wrote:
> > "Usb Hub" <nomail@nomail> wrote:
> > > I tried the fixed prism, but that doesn't work for me. The lathe works fine, but
> > > with the prism, I only see nothing. Thats my code:
> >
> > when I comment out bezier_spline, ie using default spline type, the prism shows.
> > otherwise POV-Ray complains about prism "not closed". hth.
>
> OK, that's crazy :) With my POV-ray on Linux Mint 19 Cinnamon there a no errors,
using v3.8 and and v3.71 on Slackware Linux. not error, "Parse Warning" prism
not closed, ie not enough points. when using default linear spline, POV-Ray
closes the prism for you, not with other splines (afaik).
> also with the not outcommented bezier_spline. The only thing POV-Ray shows me,
> is
> that (with both, outcommented and not outcommented):
>
> Ray->Shape Intersection
strange.
regards ,jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Now it works! The solution is, that the direction of the tangents at the start
and end control point of joining curves must be identical.
(http://wiki.povray.org/content/HowTo:Use_Splines_and_Bezier_Curves)
With this example it works:
prism {
bezier_spline
0, 10, 16
<0, 1>, <.5, 1>, <1, .5>, <1, 0>
<1, 0>, <1, -.5>, <.5, -1>, <0, -1>
<0, -1>, <-.5, -1>, <-1, -.5>, <-1, 0>
<-1, 0>, <-1, .5>, <-.5, 1>, <0, 1>
}
But now is the question, how can I make edges in the spline?
Thank you very much jr!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I don't understand POV-Ray :)
This example works also, even there are edges:
prism {
bezier_spline
0, 10, 16
<0, 1>, <.5, 1>, <1, 1.5>, <1, 0>
<1, 0>, <1, -.5>, <.5, -1>, <0, -1>
<0, -1>, <-.5, -3>, <-1, -.5>, <-1, 0>
<-1, 0>, <-1, .5>, <-.5, 5>, <0, 1>
}
I don't know why it works now, but whatever.
usbhub
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
"Usb Hub" <nomail@nomail> wrote:
> I don't understand POV-Ray :)
> This example works also, ...
> I don't know why it works now, but whatever.
> usbhub
keep going. some here, including self, find (strong) coffee an invaluable help.
:-)
note that the "finish {ambient 1}" also will give you grief (ie POV-Ray
warnings) when/if you upgrade to v3.8.
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|