POV-Ray : Newsgroups : povray.bugreports : animation display window does not reset to black : animation display window does not reset to black Server Time
13 May 2024 08:27:53 EDT (-0400)
  animation display window does not reset to black  
From: Jonathan Bush
Date: 1 Jan 2024 12:45:00
Message: <web.6592f8f55019edc16e558a71fde6c206@news.povray.org>
The first animated frame begins as a black window and generates as usual, but
the 2nd and subsequent animated frames do not. I just see the completed first
frame remaining on the screen while I hear the computer working hard. All the
generated images are identical to the first frame. This does not happen with
other animated scripts, so my script is buggy, but what bug in my script would
result in this behavior?

System:
  Host: XPS Kernel: 5.15.0-91-generic x86_64 bits: 64 Desktop: Xfce 4.18.1
    Distro: Linux Mint 21.2 Victoria

This is an informal build 3.7.0.10 by Andreas Beckmann, so perhaps I should ask
him?

I don't know if it is related, but there are supposed to be four animated
objects in an otherwise static scene. The animated objects do not appear in the
first animated frame, although diagnostic info I see in the console tells me two
of them begin positioned within the frame.

And speaking of diagnostic info, I am unable to disable the verbose option for
POVray. I put -V on the command line, and my povray.ini file includes the line

Verbose=Off

But it won't shut up. Futhermore, #debug messages are not displayed even though
I have Debug_Console=On in that same povray.ini file. I have to use the #warning
directive instead, and the warnings are embedded within the verbose output. Here
is a sample from the console display:

==== [Parsing...] ==========================================================
File 'ap_skip.inc' line 101: Parse Warning: In ap_skip.inc ANIMATING
File 'ap.pov' line 55: Parse Warning: ***** ANIM Time=  1.0351
File 'ap_animate.inc' line 65: Parse Warning: NewClock123=  0.0044 Path123Alpha=
  0.0138
File 'ap_animate.inc' line 67: Parse Warning: piece 1 y*-63.2734 <  5.6667,
 0.0092, -5.3333>
File 'ap_animate.inc' line 68: Parse Warning: NewClock4=  0.0050 Path4Alpha=
 1.5787
File 'ap_animate.inc' line 70: Parse Warning: piece 2 y*26.3322 <  5.3334,
 0.0092, -6.3333>
File 'ap_animate.inc' line 72: Parse Warning: piece 3 <  2.3335,  0.0092,
 -6.0000>
File 'ap_animate.inc' line 74: Parse Warning: piece 4 <  7.9843,  1.3333,
 -5.6667>
----------------------------------------------------------------------------

I apologize for the rambling tone of this bug report, but I'm just trying to
provide all the info I can.

Here is the .inc file which is responsible for generating the animated objects.

//****************************************************************************
// ap_animate.inc
//
//  A lot of these comments require the other files to understand
//  what is going on. I provide a link below to Google Drive.
//
//  Here we place the 4 animated objects. 3 are BlackLink and one is BlackPeg.
//
//  IntervalIndex is either 0, 1, or 2.
//    0 refers to the first 60 frames, which are static.
//      They generate just fine. The two object commands below execute
//      correctly.
//    1 refers to frames 61 to 540 which is where the problem lies.
//      The four object commands in this block do not execute.
//      Just prior to the object commands are some
//      #warning messages, and they display onscreen during execution.
//      Someone reading this code by itself might conclude that the objects
//      are placed outside of the frame. I present this file because it might
//      pertain to the weird POVray behavior of not blacking out the display
//      at the start of frames 62 to 540.
//
//      To summarize, the buggy behavior I see begins with frame 62
//      which is the first animated frame.
//
//    2 refers the the final second, frames 541 to 600, which is also
//      A static interval.

#if (IntervalIndex = 0)     // Static interval, two pieces on the board
     // calling macros from another file, but this only happens once.
     // These commands execute correctly.
  object { BlackLink rotate y*ATH translate  Link12Pos(20, 3)}
  object { BlackLink rotate y*(-AT2) translate Link34Pos(21, 4)}
#else   // Yes, I know I could use elseif, and I will when the bugs are fixed.
  #if (IntervalIndex = 1)               // animated interval
    #declare NewClock123 = (clock-0.1)*1.25;     // turns .1 to .9 into 0 to 1
    #declare Path123Alpha = radians(180*NewClock123);
    // angle of elliptical path, 0 to pi radians
    // Path 4 is the peg, which Alpha ranges PI/2 to Pi radians,
    // arriving at hole 1 second before the links
    #declare NewClock4 = ((clock<0.8)?(clock-0.1)*(10/7):1);
    #declare Path4Alpha   = radians(90+90*NewClock4);
    #declare Center1x = separation*8.25;  // center of ellipse. path 1 is the
                                          // link3 that moves to link2.
    #declare Center1z = separation*(-8.25);
    #declare Center2x = separation*8.5;   // Path 2 is the link1 that moves to
                                          // link2.
    #declare Center2z = separation*(-9.5);
    #declare Center3x = separation*6;     // 3 is the link3 that arrives from
                                          // offscreen left
    #declare Center3z = separation*(-9);
    #declare Center4x = separation*12;    // 4 is the peg arriving from
                                          // offscreen right
    #declare Center4z = separation*(-8.5);
    #declare BoardVector1x = 0.25*separation;
    #declare BoardVector1z = 0.25*separation;   // vectors for the ellipse axes
                                                // in the xz plane
    #declare BoardVector2x = -0.5*separation;
    #declare BoardVector2z = 0;
    #declare BoardVector3x = -2.5*separation;
    #declare BoardVector3z = 0;
    #declare BoardVector4x = 3*separation;
    #declare BoardVector4z = 0;
    #declare Height123 = separation;
    #declare Height4 = 2*separation;
    #declare RotStart1 =-AT2;
    #declare RotEnd1 = -ATH;
    #declare RotStart2 = ATH;
    #declare RotEnd2 = -ATH;



    #macro PathPos(Alpha, Centerx, Centerz, Height, BoardVectorx, BoardVectorz)
      <Centerx+BoardVectorx*cos(Alpha), Height*sin(Alpha),
       Centerz+BoardVectorz*cos(Alpha)>
    #end

     // animated paths 1 and 2 rotate during animation but nothing else.
    #macro PathRot(NewClock, RotStart, RotEnd)
      y*(RotStart+NewClock*(RotEnd-RotStart))
    #end

     // all these definitions are for the sake of the #warning messages.

    #declare RotVec1 = RotStart1+NewClock123*(RotEnd1-RotStart1);
    #declare PosVec1x = Center1x+BoardVector1x*cos(Path123Alpha);
    #declare PosVec1y = Height123*sin(Path123Alpha);
    #declare PosVec1z = Center1z+BoardVector1z*cos(Path123Alpha);
    #declare RotVec2 = RotStart2+NewClock123*(RotEnd2-RotStart2);
    #declare PosVec2x = Center2x+BoardVector2x*cos(Path123Alpha);
    #declare PosVec2y = Height123*sin(Path123Alpha);
    #declare PosVec2z = Center2z+BoardVector2z*cos(Path123Alpha);
    #declare PosVec3x = Center3x+BoardVector3x*cos(Path123Alpha);
    #declare PosVec3y = Height123*sin(Path123Alpha);
    #declare PosVec3z = Center3z+BoardVector3z*cos(Path123Alpha);
    #declare PosVec4x = Center4x+BoardVector4x*cos(Path4Alpha);
    #declare PosVec4y = Height4*sin(Path4Alpha);
    #declare PosVec4z = Center4z+BoardVector4z*cos(Path4Alpha);

    #warning concat("NewClock123=",str(NewClock123,8,4),
                    " Path123Alpha=",str(Path123Alpha,8,4),"\n")
    #warning concat("piece 1 y*",str(RotVec1,7,4),
                    " <",str(PosVec1x,8,4),",",str(PosVec1y,8,4),",",
                    str(PosVec1z,8,4),">\n")
    #warning concat("NewClock4=",str(NewClock4,8,4),
                    " Path4Alpha=",str(Path4Alpha,8,4),"\n")
    #warning concat("piece 2 y*",str(RotVec2,7,4),
                    " <",str(PosVec2x,8,4),",",str(PosVec2y,8,4),",",
                    str(PosVec2z,8,4),">\n")
    #warning concat("piece 3 <",str(PosVec3x,8,4),",",str(PosVec3y,8,4),",",
                    str(PosVec3z,8,4),">\n")
    #warning concat("piece 4 <",str(PosVec4x,8,4),",",str(PosVec4y,8,4),",",
                    str(PosVec4z,8,4),">\n")

    // These object commands do not execute correctly,
    // but the above warning directives are displayed on the console.
    object { BlackLink rotate PathRot(NewClock123, RotStart1, RotEnd1)
             translate  PathPos(Path123Alpha, Center1x, Center1z, Height123,
                        BoardVector1x, BoardVector1z)
    }
    object { BlackLink rotate PathRot(NewClock123, RotStart2, RotEnd2)
             translate  PathPos(Path123Alpha, Center2x, Center2z, Height123,
                        BoardVector2x, BoardVector2z)
    }
    object { BlackLink rotate -AT2*y
             translate  PathPos(Path123Alpha, Center3x, Center3z, Height123,
                        BoardVector3x, BoardVector3z)
    }
    object { BlackPeg translate  PathPos(Path4Alpha, Center4x, Center4z,
                                 Height4, BoardVector4x, BoardVector4z)
    }
  #else                        // last interval is static
    object { BlackLink rotate -ATH*y translate Link12Pos(20, 4) }
    // calling macros from another file, but this only happens once.

    object { BlackLink rotate -ATH*y translate Link12Pos(21, 3) }
    object { BlackLink rotate -AT2*y translate Link34Pos(21, 3) }
    object { BlackPeg translate PegPos(22, 4) }
  #end
#end

// *********************************************************************

You should be able to access the other files at
https://drive.google.com/file/d/1CUqz-eivsopQLrQc4bHrbSw_E5fWUgB4/view?usp=sharing
and I also attach the zip file here.

Thanks for your attention!


Post a reply to this message


Attachments:
Download 'ap_files.tar.gz' (10 KB)

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