|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hello everybody
i've got a little syntaxical problem, I would like to define a polygon whose
points comes from a spline that I'm covering.
I would like to do something like that :
#declare MySpline =
spline {
natural_spline
0, <0,1,0>
.5, <.5,.6,0>
1, <1,1,0>
}
#declare i=0;
polygon{10,
#while (i<10)
MySpline(i)
#declare i=i+1;
#end
pigment{Red}
}
but of course, it doesn't work, it brings a parse error. How should I do ?
Thanks for your help.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
kha### [at] hotmailcom
news:web.4199e8044d5e34fca3be01c60@news.povray.org
> I would like to do something like that :
> #declare MySpline =
> spline {
> natural_spline
> 0, <0,1,0>
> .5, <.5,.6,0>
> 1, <1,1,0>
> }
> #declare i=0;
> polygon{10,
> #while (i<10)
> MySpline(i)
> #declare i=i+1;
> #end
> pigment{Red}
> }
> but of course, it doesn't work, it brings a parse error. How should I
> do ? Thanks for your help.
This do work if You use MySpline(i/10) because spline has points 0..1 not
0..10
--
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rafal 'Raf256' Maj <spa### [at] raf256com> wrote:
> This do work if You use MySpline(i/10) because spline has points 0..1 not
> 0..10
Also 'polygon' takes 2-dimensional vectors so it might be necessary to
convert the three-dimensional spline vectors to two-dimensional.
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
war### [at] tagpovrayorg news:4199f5f7@news.povray.org
> Also 'polygon' takes 2-dimensional vectors so it might be necessary to
> convert the three-dimensional spline vectors to two-dimensional.
In this case it worked, just place camera properly or rotate figure by x*90
--
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|