POV-Ray : Newsgroups : povray.advanced-users : Vector components to function in isosurface : Re: Vector components to function in isosurface Server Time
28 Jul 2024 20:35:34 EDT (-0400)
  Re: Vector components to function in isosurface  
From: Mikael Pohjola
Date: 29 Jan 2004 09:18:54
Message: <opr2jjdwem0x9foi@news.povray.org>
On Wed, 28 Jan 2004 16:04:37 +0100, Christoph Hormann 
<chr### [at] gmxde> wrote:

> Mikael Pohjola wrote:
>> I tried to use a component from a vector and pass it to a function in 
>> an isosurface, and the parser returned an error. Se minimal scene 
>> below. The parser seems to confuse the notations k.u (component of a 
>> vector) and x (variable for the isosurface). Is this a "feature" or a 
>> bug? Or have I misunderstood something?
>>
>
> This is a feature, vectors are not allowed in user defined functions.
>
> Christoph
>

Yes, I know that vectors are not allowed in user defined functions, but 
why are not vector components?
If V = <a, b, c>, then V.x does not return <a, 0, 0>, but a.
What is the difference with a component of a vector and a float? (I guess 
it have something to do with the parser and inner representation??)
I got my answer already from ABX, and I am happy with the workaround.

-- 
light_source{20*y,1}#macro _(M,X,Y,P)#macro L(N,D)#if(N)#declare 
P=P+D;box{-
0.5,0.5translate z*mod(9*P.gray,4)pigment{rgb P}rotate 45*x+clock*y 
translate
P}L(N-1,D)#end#end#if(M)L(mod(M,8)<mod(X,3)mod(Y,3)1>-1)_(div(M,8)div(X,3)div
(Y,3)P)#end#end _(2301603551,12850,60365,20*z-5*x)plane{y,-9pigment{rgb 1}}


Post a reply to this message

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