|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi!
How can I assign the x (or y, z) value stored in a vector with a variable?
Thanks
Steve
http://csi.findhere.com
csi### [at] usanet
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
#declare this = <1, 2, 3>
sphere {<this.x, this.y, this.z>, this.x + this.y + this.z}
gives:
sphere {<1, 2, 3>, 6}
well, you get the idea...
-Mike
>
> Hi!
> How can I assign the x (or y, z) value stored in a vector with a variable?
>
> Thanks
> Steve
> http://csi.findhere.com
> csi### [at] usanet
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
#declare Myvector=<1,2,3>
if you want the x, you can type Myvector.x (as Mike said).
This is actually tha same as saying Myvector*<1,0,0>
Julius
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Julius Klatte wrote:
>
> #declare Myvector=<1,2,3>
>
> if you want the x, you can type Myvector.x (as Mike said).
> This is actually tha same as saying Myvector*<1,0,0>
>
Isn't the first one faster, since there si no vector multiplication
involved ???
I'd think it is, perhaps do a test with some 100 000 000 tries of each..
or, just assume .x is faster :-)
//Spider
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Julius Klatte <jku### [at] hotmailcom> wrote:
: if you want the x, you can type Myvector.x (as Mike said).
: This is actually tha same as saying Myvector*<1,0,0>
I dont think so.
If Myvector is <2,3,4>, Myvector.x is the float value 2 while
Myvector*<1,0,0> is the vector value <2,0,0>.
--
main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
*_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <36c3363e.0@news.povray.org> , Nieminen Mika <war### [at] cctutfi>
wrote:
> I dont think so.
> If Myvector is <2,3,4>, Myvector.x is the float value 2 while
> Myvector*<1,0,0> is the vector value <2,0,0>.
Hmm, this depends on the definition of the "*", it could mean dot product or
cross product...but in POV-Ray it is simply <v1.x * v2.x, v1.y * v2.y, v1.z
* v2.z>.
Thorsten
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|