POV-Ray : Newsgroups : povray.newusers : Dynamic Prisms : Re: Dynamic Prisms Server Time
30 Jul 2024 08:15:02 EDT (-0400)
  Re: Dynamic Prisms  
From: ingo
Date: 8 Aug 2004 03:14:39
Message: <Xns953F5E08DFC09seed7@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.