Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7911335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:12:25+00:00 2026-06-03T13:12:25+00:00

I have unobfuscated and simplified this animation into a jsfiddle available here . Nevertheless,

  • 0

I have unobfuscated and simplified this animation into a jsfiddle available here. Nevertheless, I still don’t quite understand the math behind it.

Does someone have any insight explaining the animation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:12:28+00:00Added an answer on June 3, 2026 at 1:12 pm

    Your fiddle link wasn’t working for me due to a missing interval speed, should be using getElementById too (just because it works in Internet Explorer doesn’t make it cross-browser).

    Here, I forked it, use this one instead:

    http://jsfiddle.net/spechackers/hJhCz/

    I have also cleaned up the code in your first link:

    <pre id="p">
    <script type="text/javascript">
    var charMap=['p','.'];
    var n=0;
    function myInterval()
    {
    
        n+=7;//this is the amount of screen to "scroll" per interval
        var outString="";
    
    
        //this loop will execute exactly 4096 times. Once for each character we will be working with.
        //Our display screen will consist of 32 lines or rows and 128 characters on each line
        for(var i=64; i>0; i-=1/64)
        {
    
            //Note mod operations can result in numbers like 1.984375 if working with non-integer numbers like we currently are
            var mod2=i%2;
    
            if(mod2==0)
            {
                outString+="\n";
            }else{
                var tmp=(mod2*(64/i))-(64/i);//a number between 0.9846153846153847 and -4032
                tmp=tmp+(n/64);//still working with floating points.
                tmp=tmp^(64/i);//this is a bitwise XOR operation. The result will always be an integer
                tmp=tmp&1;//this is a bitwise AND operation. Basically we just want to know if the first bit is a 1 or 0.
                outString+=charMap[tmp];
    
            }
        }//for
        document.getElementById("p").innerHTML=outString;
    }
    
    myInterval();
    setInterval(myInterval,64);
    </script>
    </pre>
    

    The result of the code in the two links you provided are very different from one another.
    However the logic in the code is quite similar. Both use a for-loop to loop through all the characters, a mod operation on a non-integer number, and a bitwise xor operation.

    How does it all work, well basically all I can tell you is to pay attention to the variables changing as the input and output change.

    All the logic appears to be some sort of bitwise cryptic way to decide which of 2 characters or a line break to add to the page.

    I don’t quite follow it myself from a calculus or trigonometry sort of perspective.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have a look at this picture alt text http://www.abbeylegal.com/downloads/2009-04-01/web%20part%20top%20line.jpg Does anyone know what css
Have converted devise new session from erb to Haml but doens't work, this is
have anyone can tell me what syntax error on this actionscript (actionscript3.0)? var rotY:
Have a look at this url: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:jquery_ui_methods#column_chooser I have got the Column Chooser dialog
have Googled the cr*p out of this one so apologies if the answer is
Have a really weird one here. The app has two targets, just to be
have a php code like this,going to convert it in to C#. function isValid($n){
Have data that has this kind of structure. Will be in ascending order by
Have data that has this kind of structure: $input = [ { animal: 'cat',
Have searched for the answer but no joy, so here goes... I'm working on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.