POV-Ray : Newsgroups : povray.binaries.animations : Re: Snake! WIP : Re: Snake! WIP Server Time
19 Jul 2024 08:10:50 EDT (-0400)
  Re: Snake! WIP  
From: Dave Vogt
Date: 23 Sep 2003 06:30:42
Message: <kkj541-uf4.ln1@control-alt-del.ch>
Steve Shelby wrote:

> Dave,
> What you say makes sense to me, however, I am not all that
> well-versed on using povray. (I normally use Moray for
> everything, only going to Povray when Moray can't do what I want
> to do.)
>> You can easily put the values into an array and use this (I
>> don't know well Chris' macro, but it seems to be possible to
>> get my values in there.
>>
> Could you please show me how one would put your sample code into
> an array? Steve

See the docs: 6.1.8  Array Identifiers

#include "SPLINE.MCR"

#declare a    = array[103];
#declare a[0] = z * clock;
#declare a[1] = z * clock - z;
#declare a[2] = z * clock - 2 * z;

#local i = 0;
#while (i<100)
   #declare a[i+3] = <sin(clock-i),0,clock-i-3>;
   #local i = i+1;
#end
#declare splHead = create_spline(a, create_default_spline)

You can now do everything with splHead what what you can with the
spline macros.


Greets
Dave

-- 
Dave "tPassive" Vogt| ruby -e "n=gets.to_i;a=(2..n).to_a;a.each{
Linux  user  #225040| |x|puts x;(x*2).step(n,x){|j|a.delete j}}"
____________________|_____________________________             |
PGP Key: http://control-alt-del.ch/public_key.asc \____________/


Post a reply to this message

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