|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Some of the macros in arrays.inc redefine array elements without using
semi-colons (;) in the end. This means that the macros work also if the data
in the arrays isn't floats or vectors. However, it also means that when
floats or vectors are used, lots of warnings are generated.
From my personal experience I've never needed arrays to contain anything
else than floats or vectors. And though there are many cases where it can be
useful to use other types of data in arrays, such as objects, the questions
is if the array manipulation macros are really needed in such cases? I can
only imagine the need to resize, reverse or sort an array that contains
floats or vectors, not other data.
But what do you think? Should semi-colons be added to the array macros?
The user can always modify the macros, so the question is what should be the
default set-up.
Rune
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Tue, 2 Oct 2001 22:40:56 +0200, Rune wrote:
>is if the array manipulation macros are really needed in such cases? I can
>only imagine the need to resize, reverse or sort an array that contains
>floats or vectors, not other data.
I can certainly imagine resizing an array of objects or reversing an
array of strings.
--
#local R=rgb 99;#local P=R-R;#local F=pigment{gradient x}box{0,1pigment{gradient
y pigment_map{[.5F pigment_map{[.3R][.3F color_map{[.15red 99][.15P]}rotate z*45
translate x]}]#local H=pigment{gradient y color_map{[.5P][.5R]}scale 1/3}[.5F
pigment_map{[.3R][.3H][.7H][.7R]}]}}}camera{location.5-3*z}//only my opinions
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> But what do you think? Should semi-colons be added to the array macros?
IMO, a better solution would be to optionally allow semicolons in the
language when declaring things other than floats or vectors!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Anders K. <and### [at] f2scom> wrote:
: IMO, a better solution would be to optionally allow semicolons in the
: language when declaring things other than floats or vectors!
I agree. Making generic macros which work with any item types is an
extremely good reason to add this.
--
#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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Ron Parker" wrote:
> I can certainly imagine resizing an array of objects or
> reversing an array of strings.
I sure can imagine it too. The question is if anyone has ever actually
needed to do this.
And again, the question is about what should be the default behavior, as the
user can always modify the macros.
Rune
--
3D images and anims, include files, tutorials and more:
Rune's World: http://rsj.mobilixnet.dk (updated June 26)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Anders K." wrote:
> IMO, a better solution would be to optionally allow
> semicolons in the language when declaring things
> other than floats or vectors!
I agree, but that's not an option here and now, so my question remains.
Rune
--
3D images and anims, include files, tutorials and more:
Rune's World: http://rsj.mobilixnet.dk (updated June 26)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rune wrote:
>
> I agree, but that's not an option here and now, so my question remains.
>
The obvious solution would be making two versions - one with and one
without.
Christoph
--
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other
things on: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |