POV-Ray : Newsgroups : povray.general : Extracting values from predefined vectors Server Time
16 Nov 2024 15:16:29 EST (-0500)
  Extracting values from predefined vectors (Message 1 to 7 of 7)  
From: Greg Sanders
Subject: Extracting values from predefined vectors
Date: 11 Jun 1998 13:43:31
Message: <6lp4ld$pmr$1@oz.aussie.org>
Does anyone know how to extract the X,Y and Z values from a defined vector.
Specifically, I am using Chris Colefax's Spline Generator.  It generates a
"spline_pos" vector of (X,Y,Z).  Is there a way to extract the numerical
values of each?  I hope this is clear.

Thanks,
Greg Sanders

BTW if you haven't checked out Chris's Include files page yet.. You don't
know what you're missing!


Post a reply to this message

From: Ronald L  Parker
Subject: Re: Extracting values from predefined vectors
Date: 11 Jun 1998 14:05:43
Message: <35801c5a.1108161268@news.povray.org>
On Thu, 11 Jun 1998 10:43:31 -0700, "Greg Sanders"
<gvi### [at] oraclerenonvus> wrote:

>Does anyone know how to extract the X,Y and Z values from a defined vector.
>Specifically, I am using Chris Colefax's Spline Generator.  It generates a
>"spline_pos" vector of (X,Y,Z).  Is there a way to extract the numerical
>values of each?  I hope this is clear.

Yep.  Just use spline_pos.x, spline_pos.y, and spline_pos.z


Post a reply to this message

From: Greg Sanders
Subject: Re: Extracting values from predefined vectors
Date: 11 Jun 1998 16:13:53
Message: <6lpdfh$q0r$1@oz.aussie.org>
What?!  You mean read the documentation?!

Is there a way to extract the numerical
>>values of each?  I hope this is clear.
>
>Yep.  Just use spline_pos.x, spline_pos.y, and spline_pos.z
>


Post a reply to this message

From: Nieminen Mika
Subject: Re: Extracting values from predefined vectors
Date: 12 Jun 1998 10:11:09
Message: <6lrctt$sct$1@oz.aussie.org>
Greg Sanders <gvi### [at] oraclerenonvus> wrote:
: What?!  You mean read the documentation?!

  That's always a good idea.

  Section 7.1.4.3 says:

You may use the dot operator to extract a single component from a vector.
Suppose the identifier Spot was previously defined as a vector. Then Spot.x is
a float value that is the first component of this x, y, z vector. Similarly
Spot.y and Spot.z reference the 2nd and 3rd components. If Spot was a two
component UV vector you could use Spot.u and Spot.v to extract the first and
second component. For a 4D vector use .x, .y, .z and .t to extract each float
component. The dot operator is also used in color expressions which are
covered later.

-- 
                                                              - Warp. -


Post a reply to this message

From: Michael Lundahl
Subject: Re: Extracting values from predefined vectors
Date: 15 Jun 1998 04:38:59
Message: <6m2mj3$96a$1@oz.aussie.org>
In article <6lp4ld$pmr$1@oz.aussie.org>,
	"Greg Sanders" <gvi### [at] oraclerenonvus> writes:
>Does anyone know how to extract the X,Y and Z values from a defined vector.
>Specifically, I am using Chris Colefax's Spline Generator.  It generates a
>"spline_pos" vector of (X,Y,Z).  Is there a way to extract the numerical
>values of each?  I hope this is clear.

Well, there should have been, by using the dot-operator... To get the x-value, 
you should have been able to type spline_pos.x according to the manual.
However, there is a bug in POV which causes this operator to malfunction
for .y, .z, .v and .t  I hope POV 3.1 will have this bug fixed.

/Michael


Post a reply to this message

From: Dan Connelly
Subject: Re: Extracting values from predefined vectors
Date: 2 Sep 1998 21:39:55
Message: <35EDE567.D4ED9AD9@flash.net>
Michael Lundahl wrote:
> 
> Well, there should have been, by using the dot-operator... To get the x-value,
> you should have been able to type spline_pos.x according to the manual.
> However, there is a bug in POV which causes this operator to malfunction
> for .y, .z, .v and .t  I hope POV 3.1 will have this bug fixed.

There is no problem with the .y and .z operators as applied to 3-vectors.
The problem is with 2-vectors (.y and .v). 

-- 
http://www.flash.net/~djconnel/


Post a reply to this message

From: Dan Connelly
Subject: Re: Extracting values from predefined vectors
Date: 2 Sep 1998 21:42:02
Message: <35EDE5E7.155C9637@flash.net>
Greg Sanders wrote:
> 
> What?!  You mean read the documentation?!
>

Folks who take the time to post thoughtful replies
to questions don't find this funny.

Yeah -- it's easier to fire off a quickie than
do a search of the excellent on-line help.  But
it's pretty selfish, if you realize someone else
will probably need to do it instead to answer your
question well.

-- 
http://www.flash.net/~djconnel/


Post a reply to this message

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