POV-Ray : Newsgroups : povray.newusers : While in while: help me, please! : While in while: help me, please! Server Time
14 May 2024 02:33:41 EDT (-0400)
  While in while: help me, please!  
From: LanuHum
Date: 19 Jan 2014 10:50:00
Message: <web.52dbf34f4068fb557a3e03fe0@news.povray.org>
Hi!
Sorry!
Again it is impossible to me :(
It is necessary to create object from the array

File 'HairSystem.inc' line 54: Parse error:
Expected 'numeric expression', array identifier found instead
Fatal error in parser: Cannot parse input
Render failed

#declare ArrayHairSystem = array[4] {
spline { cubic_spline
0/9 <1.104,-0.535,-0.7421>
1/9 <1.358,-0.4768,-0.8438>
2/9 <1.626,-0.3345,-0.922>
3/9 <1.939,-0.1466,-0.9378>
4/9 <2.328,0.04195,-0.8999>
5/9 <2.732,0.1853,-0.8488>
6/9 <3.079,0.2744,-0.8224>
7/9 <3.371,0.3472,-0.8292>
8/9 <3.616,0.4306,-0.8473>
},
spline { cubic_spline
0/9 <1.281,-0.6221,-0.5943>
1/9 <1.531,-0.6057,-0.8389>
2/9 <1.761,-0.4055,-1.027>
3/9 <2.022,-0.1217,-1.065>
4/9 <2.371,0.1307,-0.9738>
5/9 <2.757,0.2744,-0.8509>
6/9 <3.1,0.3207,-0.7875>
7/9 <3.387,0.3535,-0.8038>
8/9 <3.616,0.4306,-0.8473>
},
spline { cubic_spline
0/9 <1.091,-0.6223,-0.6592>
1/9 <1.357,-0.5827,-0.841>
2/9 <1.618,-0.4031,-0.9808>
3/9 <1.915,-0.1566,-1.009>
4/9 <2.296,0.07255,-0.9414>
5/9 <2.704,0.2209,-0.85>
6/9 <3.062,0.2908,-0.8028>
7/9 <3.366,0.346,-0.815>
8/9 <3.616,0.4306,-0.8473>
},
spline { cubic_spline
0/9 <1.107,-0.5015,-0.7747>
1/9 <1.356,-0.4359,-0.8449>
2/9 <1.627,-0.3081,-0.8988>
3/9 <1.946,-0.1432,-0.9097>
4/9 <2.339,0.02948,-0.8836>
5/9 <2.742,0.171,-0.8484>
6/9 <3.084,0.2678,-0.8302>
7/9 <3.372,0.3476,-0.8348>
8/9 <3.616,0.4306,-0.8473>
},
}
#declare HairSegment =
sphere {0,0.1 translate z*0.125}

#declare HairStep = 1;
#declare Hair =
union {
    #declare I = 0;
    #while (I < ArrayHairSystem)
        union {
            #declare ctr = 0;
            #while (ctr < 1)
                object { HairSegment texture{pigment{rgb 1}}rotate z*0
                        translate ArrayHairSystem[I] (ctr)}
            #declare ctr = ctr + 0.00025;
            #end
#local I = I + HairStep
#end
}}

Thanks!


Post a reply to this message

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