Let's assume for a second i knew which object are in the back, even then, how do i need to draw this? I've added my code.

use GD; use constant PI => 4 * atan2(1, 1); $im = new GD::Image(400,400); $black = $im->colorAllocate(0,0,0); $red=$im->colorAllocate(255,0,0); $green=$im->colorAllocate(0,255,0); $im->filledEllipse(200,200,50,50,$red); $im->filledEllipse(300,200,25,25,$green); for($xy=0;$xy<6.28;$xy+=0.01){ $x = 100*cos($xy); $y = (43.75/2)*sin($xy); push @punten,[200+$x,200+$y]; } $data =$im->gifanimbegin(1,0); $data.=$im->gifanimadd(1,0,0,1); for($z=0;$z<=$#punten;$z+=20){ $ima = new GD::Image(400,400); $black = $ima->colorAllocate(0,0,0); $red=$ima->colorAllocate(255,0,0); $green=$ima->colorAllocate(0,255,0); $ima->filledEllipse(200,200,50,50,$red); $xc = $punten[$z][0]; $yc = $punten[$z][1]; $ima->filledEllipse($xc,$yc,25,25,$green); $data.= $ima->gifanimadd(1,0,0,1); } $data.=$ima->gifanimend; binmode STDOUT; print $data;

In reply to Re^2: color problem by Anonymous Monk
in thread color problem by Anonymous Monk

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.