Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Thanks, maybe it me but I use ex. my @nloops = join(',',@{$collection[0]}); and try print @nloops[1] OUT [1,1,1,1,1] but the correct should be 1 To make this little test a more clear view from my part as you could see there are 4 array in the renderman rib ex. for ($i = 0; $i < array_length; $i ++ ) { print @params[0+$i] @params[1+$i] @params[2+$i] 1; } this would be output: -1 1 1 1 1 -1 1 1 1 ... next I apply a custom string in print "Run $count_lvert_length Poly\n"; for ($i = 0; $i < count_lverts*4; $i += 4 ) { if ( $lverts[0+($i/4)] == 3 ) { print "$lverts[0+($i/4)] < $vertid[2+$i] $vertid[1+$i] $vertid[0+$i]\n"; } else { print "$lverts[0+($i/4)] < $vertid[3+$i] $vertid[2+$i] $vertid[1+$i] $vertid[0+$i]\n"; } } append the end line !!! ---------------------------------- here is the 'renderman' rib example this file this what I read in and like to get data from # Starting polys PointsGeneralPolygons [1 1 1 1 1 1] [4 4 4 4 4 4] [ 0 4 5 1 1 5 6 2 2 6 7 3 3 7 4 0 3 0 1 2 4 7 6 5 ] "P" [ -0.5 -0.5 -0.5 0.5 -0.5 -0.5 0.5 -0.5 0.5 -0.5 -0.5 0.5 -0.5 0.5 -0.5 0.5 0.5 -0.5 0.5 0.5 0.5 -0.5 0.5 0.5 ] # Starting curves # Done curves --------------------------- and this is the code I trying to get Perl to make for me !!! -0.5 -0.5 -0.5 1 0.5 -0.5 -0.5 1 0.5 -0.5 0.5 1 -0.5 -0.5 0.5 1 -0.5 0.5 -0.5 1 0.5 0.5 -0.5 1 0.5 0.5 0.5 1 -0.5 0.5 0.5 1 Run 6 Poly 4 < 1 5 4 0 4 < 2 6 5 1 4 < 3 7 6 2 4 < 0 4 7 3 4 < 2 1 0 3 4 < 5 6 7 4 regards, Fredrik Gustafsson

In reply to Re: Re: Re: Re: build array of geometry data by Frippe
in thread build array of geometry data by Frippe

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (7)
    As of 2014-09-01 19:39 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite cookbook is:










      Results (17 votes), past polls