POV-Ray : Newsgroups : povray.general : Declaring y component only : Re: Declaring y component only Server Time
10 Aug 2024 21:00:54 EDT (-0400)
  Re: Declaring y component only  
From: John VanSickle
Date: 23 Oct 1999 22:54:54
Message: <381278D7.22718580@erols.com>
Greg M. Johnson wrote:
> 
> Can I declare the y component only?
> 
> For example, if I want to say,
> 
> #declare velocity[n].y=velocity[n].y*0.9;
> 
> Do I have to say,
> 
> #declare velocity[n]=<velocity[n].x,velocity[n].y*0.9,velocity[n].z>;
> 
> The former OUGHT to be good enough!  I think pov gave me error
> messages until I went to the trouble of the latter.....

No, you cannot declare just one component.  However, you can do this:

  #declare velocity[n]=velocity[n]*<1,.9,1>;

which does what your code does, but with less typing.

Regards,
John
-- 
ICQ: 46085459


Post a reply to this message

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