POV-Ray : Newsgroups : povray.general : Declaring y component only Server Time
1 Nov 2024 07:27:38 EDT (-0400)
  Declaring y component only (Message 1 to 3 of 3)  
From: Greg M  Johnson
Subject: Declaring y component only
Date: 23 Oct 1999 10:59:10
Message: <3811cd3e@news.povray.org>
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.....


Post a reply to this message

From: Margus Ramst
Subject: Re: Declaring y component only
Date: 23 Oct 1999 11:56:50
Message: <3811DA8A.D0BD4D18@peak.edu.ee>
No, you can't. I wish it were implemented, though.

Margus

"Greg M. Johnson" wrote:
> 
> Can I declare the y component only?
>


Post a reply to this message

From: John VanSickle
Subject: Re: Declaring y component only
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.