|
|
Is it possible to provide the prism construct with vertex coords from an
array? I have the coordinates generated and in an array but if I use the
array variable instead of literal values it gives me a parse error saying,
"Expected 'numeric expression', array identifier found instead". Any
ideas?
Thanks in advance!
Tim
My email is twy@_n0$p@m_shawbiz.ca. Just remove the underscores and the
stuff between them.
Post a reply to this message
|
|
|
|
in news:web.4115b6f927ac47e07f3aa99d0@news.povray.org Administrator
wrote:
> Is it possible to provide the prism construct with vertex coords from
> an array?
You have to get the values from the array 'manually', the prism won't do
it for you, see example below:
---%<------%<---
#declare A=array[5]{<1,0>,<0,1>,<-1,0>,<0,-1>,<1,0>}
#declare NrPoints=dimension_size(A,1);
prism{
linear_spline
linear_sweep
0,
1,
NrPoints,
#declare I=0;
#while (I<NrPoints)
#local P=A[I];
P
#declare I=I+1;
#end
pigment { rgb 1}
}
---%<------%<---
Ingo
Post a reply to this message
|
|