POV-Ray : Newsgroups : povray.newusers : Using arrays of vectors : Re: Using arrays of vectors Server Time
29 Jul 2024 14:20:00 EDT (-0400)
  Re: Using arrays of vectors  
From: kurtz le pirate
Date: 28 Sep 2005 13:33:28
Message: <kurtzlepirate-BA70F2.19332728092005@news.povray.org>
In article <4338e578@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

::Alain <ele### [at] netscapenet> wrote:
::> sor{NbOfPoints,
::> #local Index = 0;
::> #while(Index < NbOfPoints - 1)
::>         VectorOfPoints[Index],
::> #local Index = Index + 1;
::> #end
::> VectorOfPoints[Index] // No comma for last point
::> texture{Texture}
::> }
::
::  You don't need the commas at all. Besides, the number of points doesn't
::need to be supplied explicitly.
::  And by the way, be so kind to not to teach bad habits to beginners by
::giving as example badly-indented code.

comma, no comma... documentation at 
http://www.povray.org/documentation/view/3.6.1/286/ is a little a 
ambiguous ! the syntax is :
SOR:
    sor
    {
        Number_Of_Points, <Point_1>, <Point_2>, ... <Point_n>
        [ open ] [SOR_MODIFIERS...]
    }
SOR_MODIFIER:
    sturm | OBJECT_MODIFIER

as you can see, there are comma between <Point_1> and <Point_2> and ...

but, in a simple vase exemple :
 #declare Vase = sor {
  7,
  <0.000000, 0.000000>
  <0.118143, 0.000000>
  <0.620253, 0.540084>
  <0.210970, 0.827004>
  <0.194093, 0.962025>
  <0.286920, 1.000000>
  <0.468354, 1.033755>
  open
 }
there is NO comma... and as Warp say : no need at all !

have fun
klp


Post a reply to this message

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