|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
<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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
: 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
|
|