POV-Ray : Newsgroups : povray.newusers : vector data structure : Re: vector data structure Server Time
2 Nov 2024 13:20:35 EDT (-0400)
  Re: vector data structure  
From: Warp
Date: 20 Feb 2004 16:27:13
Message: <40367bb1@news.povray.org>
bongotastic <cbl### [at] csdalca> wrote:
> #declare pt = <0,0,0>;
> #declare pt = VRand_On_Sphere(MySeed);
> #declare pt.z = pt.z / 2.0;

> The third line does not process, saying that  a '=' is expected but a '.' is
> found. The docs indicate that it should work. Am I declaring my variable pt
> wrong?

  Actually I'm not sure now whether assigning to a vector component should
work or not according to the documentation...

  Anyways, you can get that working like this (a bit longer, but at
least it should work):

#declare pt = <pt.x, pt.y, pt.z/2>;

  In fact, this should work as well:

#declare pt = pt*<1, 1, 0.5>;

-- 
#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

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