POV-Ray : Newsgroups : povray.beta-test : [includes] VPow does not work : Re: [includes] VPow does not work Server Time
29 Jul 2024 08:19:02 EDT (-0400)
  Re: [includes] VPow does not work  
From: Warp
Date: 15 Jun 2002 16:14:31
Message: <3d0ba027@news.povray.org>
Rune <run### [at] mobilixnetdk> wrote:
> Yes, if it is possible to detect, I'd be interested. Especially since
> there are several other macros in math.inc which also come in several
> versions due to the various types of vectors.

> But I don't know of such a method.

  I found a method. It may not be the fastest possible, but at least it works.

#macro Is5DVector(V)
  (strcmp(vstr(5, (V=V), "", 0, 0), "11111") = 0)
#end

#declare V1 = <1,2,3>;
#declare V2 = <4,5,6,7,8>;

#if(Is5DVector(V1)) #debug "yes, " #else #debug "no, " #end
#if(Is5DVector(V2)) #debug "yes" #else #debug "no" #end
#debug "\n"


-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

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