POV-Ray : Newsgroups : povray.binaries.images : ISO CGS issue Server Time
18 Nov 2024 02:21:19 EST (-0500)
  ISO CGS issue (Message 1 to 3 of 3)  
From: chaps
Subject: ISO CGS issue
Date: 14 Oct 2002 05:22:49
Message: <3daa8ce9@news.povray.org>
I'm still working on my jellyfish model, first part is convert in ISO CGS
and work fine - at least the way I want -
See attached image.

But I am in trouble using IC_Merge_Array. The code I try is:

#declare SP4 = IC_Translate ( IC_Scale ( IC_Sphere ( <0, 0, 0 > , 1 ), < 0.5
, 1 , 0.2 > ), < 0.7 , -0.7 , 0 > )

#declare SP_Array = array[12]

#declare SP_Array[0] = SP4
#declare SP_Array[1] = IC_Rotate( SP4 , y*30 )
#declare SP_Array[2] = IC_Rotate( SP4 , y*30 )
#declare SP_Array[3] = IC_Rotate( SP4 , y*60 )
#declare SP_Array[4] = IC_Rotate( SP4 , y*90 )
#declare SP_Array[5] = IC_Rotate( SP4 , y*120 )
#declare SP_Array[6] = IC_Rotate( SP4 , y*150 )
#declare SP_Array[7] = IC_Rotate( SP4 , y*180 )
#declare SP_Array[8] = IC_Rotate( SP4 , y*210 )
#declare SP_Array[9] = IC_Rotate( SP4 , y*240 )
#declare SP_Array[10] = IC_Rotate( SP4 , y*270 )
#declare SP_Array[11] = IC_Rotate( SP4 , y*300 )

#declare MedTent = IC_Merge_Array ( SP_Array )

but I get the following message:

File: D:\transfert\perso\povfile\include\iso_csg.inc  Line: 82
        #if (Counter>0) , #end

          _ICSG_Array[Counter] <----ERROR

Parse Error: Attempt to access uninitialized array element.

and Christoph Hormann code is:

#macro IC_Merge_Array(_ICSG_Array)        // merge an array of objects
  #local Size=dimension_size(_ICSG_Array,1);

  function {
    min(
      #local Counter=0;
      #while (Counter<Size)
        #if (Counter>0) , #end
          _ICSG_Array[Counter] (x,y,z)  // line 82
        #local Counter=Counter+1;
      #end
    )
  }
#end

Any clue to solve this?

Chaps.


Post a reply to this message


Attachments:
Download 'meduse2.jpg' (22 KB)

Preview of image 'meduse2.jpg'
meduse2.jpg


 

From: Christoph Hormann
Subject: Re: ISO CGS issue
Date: 14 Oct 2002 05:34:25
Message: <3DAA8FA1.FF0EA924@gmx.de>
chaps wrote:
> 
> 
> But I am in trouble using IC_Merge_Array. The code I try is:
> 
> #declare SP4 = IC_Translate ( IC_Scale ( IC_Sphere ( <0, 0, 0 > , 1 ), < 0.5
> , 1 , 0.2 > ), < 0.7 , -0.7 , 0 > )
> 
> #declare SP_Array = array[12]
> 
> #declare SP_Array[0] = SP4
> [...]

This does not work, SP4 is a function.  Try:

#declare SP_Array[0] = function { SP4(x, y, z) }

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: chaps
Subject: Re: ISO CGS issue
Date: 14 Oct 2002 05:57:28
Message: <3daa9508@news.povray.org>
Fast response time :o)

Many thanks, Christoph,

it works - even if it is a bit slow :o[

Thank you for posting all this work.

Chaps.

"Christoph Hormann" <chr### [at] gmxde> wrote in message
news:3DAA8FA1.FF0EA924@gmx.de...
>
>
> chaps wrote:
> >
> >
> > But I am in trouble using IC_Merge_Array. The code I try is:
> >
> > #declare SP4 = IC_Translate ( IC_Scale ( IC_Sphere ( <0, 0, 0 > , 1 ), <
0.5
> > , 1 , 0.2 > ), < 0.7 , -0.7 , 0 > )
> >
> > #declare SP_Array = array[12]
> >
> > #declare SP_Array[0] = SP4
> > [...]
>
> This does not work, SP4 is a function.  Try:
>
> #declare SP_Array[0] = function { SP4(x, y, z) }
>
> Christoph
>
> --
> POV-Ray tutorials, IsoWood include,
> TransSkin and more: http://www.tu-bs.de/~y0013390/
> Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

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