POV-Ray : Newsgroups : povray.advanced-users : How to address last 2 components of 5-component vectors? : Re: How to address last 2 components of 5-component vectors? Server Time
4 May 2024 00:19:19 EDT (-0400)
  Re: How to address last 2 components of 5-component vectors?  
From: Bald Eagle
Date: 16 Jul 2016 08:50:01
Message: <web.578a2ce4ff0686005e7df57c0@news.povray.org>
> No error for that page, as it is a page about function{}. Just you cannot use .hf
outside of function{}.


Sorry to keep this thing going for this long, but perhaps someone can post some
working code to clarify HOW to use .hf "IN" (a) function.

I tried to implement the (partial) example code on the referenced documentation
page by issuing the directive:

#debug concat( "fn_Pigm(1, 2, 3).hf  = ", str(fn_Pigm(1, 2, 3).hf, 3, 0),
"\n\n")

[ At first I used it literally, as:

#debug concat( "fn_Pigm().hf  = ", str(fn_Pigm().hf, 3, 0), "\n\n")

even though I expected, and got, an error:
....VectorComponents.pov" line 44: Parse Error: Expected 'numeric expression', )
found instead

so the docs should clarify the need for a vector argument]

and got:

.... VectorComponents.pov" line 41: Parse Error: Expected 'x, y, z or color
component', undeclared identifier 'hf' found instead

doing:

#declare Pigment =
 pigment {
  agate
  color_map {
   [0 color rgb 0]
   [1 color rgb 1]
  } // end color map
 } // end pigment

#declare fn_Pigm =
function {
pigment {Pigment}
} // end function

I cannot do:

#declare fn_Pigm =
function {
pigment {Pigment}.hf
} // end function

.... VectorComponents.pov" line 41: Parse Error: No matching } in '{', . (period)
found instead

or:

#declare fn_Pigm =
function {
pigment {Pigment.hf}
} // end function

.... VectorComponents.pov" line 41: Parse Error: No matching } in 'pigment', .
(period) found instead


Since so much has been covered and clarified, I just wanted to address this one
last (?) loose thread.


Post a reply to this message

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