POV-Ray : Newsgroups : povray.beta-test : Request for help Server Time
12 Nov 2024 20:02:31 EST (-0500)
  Request for help (Message 1 to 10 of 10)  
From: Rune
Subject: Request for help
Date: 23 Sep 2001 14:11:53
Message: <3bae25e9@news.povray.org>
I'm currently responsible for the scene and include files, and I need the
help of you beta-testers.

I currently have the problem that I am not quite aware if all the macros
in the files arrays.inc and textures.inc are working properly. Some of them
may be unfinished or contain major bugs. The scene and include files
coordinator before me didn't leave much information on this. I don't know
these macros very well myself and I'm not able to test them properly on my
own.

I would appreciate if you could test all the macros in those files and help
me find out which ones are working. Thank you in advance!

Rune


Post a reply to this message

From:
Subject: Re: Request for help
Date: 27 Sep 2001 04:11:16
Message: <jsl5rt43ngjm9bsg59ishf03u4ghm4621c@4ax.com>
On Sun, 23 Sep 2001 20:09:11 +0200, "Rune"
<run### [at] mobilixnetdk> wrote:

> I currently have the problem that I am not quite aware if all the macros
> in the files arrays.inc

ok. let's start

POV3.5b4 on PII233 128 MB with NT4Sp6

o) first macro: Rand_Array_Item
    it uses floor of rand but rand can return value 1
    which causes error  "array subscript out of range"
    I advice to multiply rand with 0.9999999 or something
    It not change probability very much

o) macro: Resize_Array
     suggested content
    #macro Resize_Array(Arr,NewSize)
      #local NewArray=array[NewSize]
      #local C=0;
      #local Max=min(NewSize,dimension_size(Arr, 1))
      #while (C<Max)
        #local NewArray[C]=Arr[C] // not use ";" !!!
        #local C=C+1;
      #end
      #declare Arr=NewArray
    #end

o)  macro: Reverse_Array
      lines
        #local Array[J] = Array[N-J]
        #local Array[N-J] = Temp
      should be replaced with
        #local Array[J] = Array[N-J-1]
        #local Array[N-J-1] = Temp

o) do you want me to write
    #macro Insert_In_Array(Item, DestArray, Index)
    #macro Insert_Array_In_Array(ItemArray, DestArray, Index)
    #macro Append_To_Array(Item, DestArray, Index)
    #macro Append_Array_To_Array(ItemArray, DestArray, Index)
   ?

o) macro: Sort_Compare
    seems ok

o) macro: Sort_Swap_Data
    there should be no ";" if it is treated as universal macro
    but of couse it could be annoying number of warnings for float
    than there should be some description in comments

o) with sort macros I must concern little more

ABX


Post a reply to this message

From:
Subject: Re: Request for help
Date: 27 Sep 2001 04:44:36
Message: <mkp5rto4db5bkdp03ckkb5isd3037jpmji@4ax.com>

<abx### [at] babilonorg> wrote:

>o) macro: Resize_Array

and in my suggestion replace line

>        #local NewArray[C]=Arr[C] // not use ";" !!!

with

        #if(defined(Arr[C]))
          #local NewArray[C]=Arr[C] // not use ";" !!!
        #end

becouse of partialy defined arrays

ABX


Post a reply to this message

From:
Subject: Re: Request for help
Date: 27 Sep 2001 05:14:56
Message: <uuq5rtsbakb9rveh792lldp1e308ahihsk@4ax.com>
On Sun, 23 Sep 2001 20:09:11 +0200, "Rune"
<run### [at] mobilixnetdk> wrote:

>I am not quite aware if all the macros
>in textures.inc are working properly.

well, I'm not sure if it is a bug within macro or whole povray but
render for such script

#include "textures.inc"
plane{
  -z,0
  pigment{Irregular_Bricks_Pig(
    pigment{color rgb 0},
    pigment{color rgb 1},
    .5,.1)
  }
  translate z
}
camera{location -z look_at 0}
light_source{-z*100 color rgb 1}

I think parameters for macro are filled ok but it looks strange -
image in p.b-t.binaries

ABX


Post a reply to this message

From: Warp
Subject: Re: Request for help
Date: 27 Sep 2001 07:14:17
Message: <3bb30a09@news.povray.org>

: o) macro: Sort_Swap_Data
:     there should be no ";" if it is treated as universal macro

  It isn't. The documentation says it's used for arrays containing floats.
If the array contains anything else, you have to define your own Sort_Swap_Data
macro.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From:
Subject: Re: Request for help
Date: 27 Sep 2001 07:28:10
Message: <5v26rtkde2kpcst83s5l1mtst0b5dphu29@4ax.com>
On 27 Sep 2001 07:14:17 -0400, Warp <war### [at] tagpovrayorg> wrote:
>W?odzimierz ABX Skiba <abx### [at] babilonorg> wrote:
>: o) macro: Sort_Swap_Data
>:     there should be no ";" if it is treated as universal macro
>
>  It isn't. The documentation says it's used for arrays containing floats.

I missed this, probably becouse there is no such note within
description of Sort_Swap_Data in chapter 7.1
than there should be ";"

ABX


Post a reply to this message

From: Adrien Beau
Subject: Re: Request for help
Date: 27 Sep 2001 07:32:13
Message: <3BB30E3B.83C59F99@sycomore.fr>
Warp wrote:
> 

> : o) macro: Sort_Swap_Data
> :     there should be no ";" if it is treated as universal macro
> 
>   It isn't. The documentation says it's used for arrays containing floats.
> If the array contains anything else, you have to define your own Sort_Swap_Data
> macro.

No. In 7.1, it is said that Sort_Swap_Data() is used by
Sort_Array(). It is also said that Sort_Array() only works
with floats.

Change the macro, or change the name to Sort_Swap_Float_Data(),
or update the documentation.

-- 
Adrien Beau - adr### [at] freefr - http://adrien.beau.free.fr
 Mes propos n'engagent que moi et en aucun cas mes employeurs


Post a reply to this message

From: Warp
Subject: Re: Request for help
Date: 27 Sep 2001 12:03:43
Message: <3bb34ddf@news.povray.org>
Adrien Beau <adr### [at] sycomorefr> wrote:
: It is also said that Sort_Array() only works with floats.

  Nope. Sort_Array() works with any type of array as long as you can provide
comparison and swapping macros for it.
  What the documentation says is that with the *default* macros only float
arrays can be sorted.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Adrien Beau
Subject: Re: Request for help [change doc]
Date: 27 Sep 2001 12:54:40
Message: <3BB359CD.D9CD7A0F@sycomore.fr>
Then the documentation needs to be changed.
It really says that:

1) Sort_Swap_Data() documentation never mentions it is to
   be used with floats only.

2) Instead, Sort_Array() states its purpose is to sort
   an array of floats. Yes, I admit it also says "though you
   can redefine the Sort_Compare() and Sort_Swap_Data() macros
   to handle multidimensional arrays and other data types"
   so the clever minds concluded that Sort_Swap_Data() must
   be float-only.

Please correct 1.

-- 
Adrien Beau - adr### [at] freefr - http://adrien.beau.free.fr
 Mes propos n'engagent que moi et en aucun cas mes employeurs


Post a reply to this message

From: Warp
Subject: Re: Request for help [change doc]
Date: 27 Sep 2001 13:43:32
Message: <3bb36543@news.povray.org>
Adrien Beau <adr### [at] sycomorefr> wrote:
:    so the clever minds concluded that Sort_Swap_Data() must
:    be float-only.

  Of course. Why everything has to be minutely explained? ;)

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

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