Re: Cantering MOOSE / anyone do gaits?
Dave Bird---St Hippo of Augustine wrote: > > In article <34C...@freent.toronto.on.ca>, llizard writes: > >In article <CJ9...@xemu.demon.co.uk>, Dave Bird wrote: > >> > >> Enclosed is an amination of a moose cantering; to view, save and > >> browse as an HTML file. > >> > >> Has anyone done an animation of animals showing all the real-life > >> four legged walking patterns ("gaits"), which can all be observed > >> in domestic cats if you have cats at home. > >> (A) SLOW WALK. The legs act in diagonally opposite pairs: > >> 1. LeftRear forward 2 RightFront 3 RightRear 4 RightFront, > >> in four time units the animal is one pace forward. > >> > >>[snip other gaits..........] > > > >You should really turn the poor thing around so it doesn't suddenly and > >inexplicably beam itself back to the starting point. > > Can the Basic below be done in JavaScript i.e. the array stores > not FRAMES but LINES, and a frame is built dynamically from lines > (don't know how slow this would be), thus eliminating lots of > frames which are just the same object 4,8,12 etc spaces rightwards? > The animation shows a little dog doing the slow quadruped walk. > [snip basic source] > > ~~~~~~~~~~~~~~~~~~~~~~~~JAVASCRIPT~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Does JavaScript have basic-style string variables, concatenate, > and left$/right$/mid$? can you do a bitwise and of variables?? > Yes, Yes, ??? and Yes. JavaScript variables have no type, you can just do: var str; // not really required either. str="Hello, world!"; or str=1; or str=true; or whatever. Concatenate: var str1,str2,str3; str1="Hello,"; str2="world!"; str3=str1+str2; or str1+=str2 // for non C-people: equal to str1=str1+str2 I'm not too familiar with basic, what does left$/mid$/right$ do or mean? bitwise and: var a,b,c; a=23475; b=43556; c=a & b; or a&=b; So, a script that dynamically builds up frames: [snip from here ---> <HTML> <HEAD><TITLE>Dynamically build up frames</TITLE></HEAD> <BODY> <FORM NAME=f> <TEXTAREA NAME=t ROWS=8 COLS=60> </TEXTAREA> </FORM> <SCRIPT LANGUAGE="JavaScript"> function MakeArray() { for (i=0;i<MakeArray.arguments.length;i++) this[i]=MakeArray.arguments[i]; } // make the first frame: (the reason it looks distorted is because all \'s // have been replaced by \\'s) frame=new Array(4); frame[0] = new MakeArray( "\\\\ /\\ \r\n", " \\\\__________/ @--o \r\n", " | === \r\n", " | _________ .'' \r\n", " | |+\\ | |+| \r\n", " | |\\#\\ | |+| \r\n", ".|_|.'-' .|_|-' \r\n", " \r\n" ); frame[1] = new MakeArray( " |\\ /\\ \r\n", " \\\\_________/ @--o \r\n", " | === \r\n", " | ________ .'' \r\n", " | |+| | |+| \r\n", " / /\\+\\ \\#\\/ \r\n", " .|_|'-' ___|_| \r\n", " \r\n", " \r\n" ); frame[2] = new MakeArray( " |\\ /\\ \r\n", " \\\\_________/ @--o \r\n", " | === \r\n", " | ________ .'' \r\n", " \\ \\+| | |+| \r\n", " \\#\\\\ \\ \\/ \r\n", " ___\\_\\ _|_| \r\n", " \r\n" ); frame[3] = new MakeArray( " \\\\ /\\ \r\n", " \\\\_________/ @--o\r\n", " | ===\r\n", " | _________ .''\r\n", " \\ \\+| | |+| \r\n", " | |+| | |#| \r\n", " _\\_\\' ..|_|-' \r\n", " \r\n" ); // OK, we now have 4 frames (frame[0] trough frame[3]) which all contain // 8 lines (frame[X][0] through frame[X][7]). lets do the animating: var loop=0; var count=0; function animate() { var str=""; // variable in which we build up the frame. for (x=0;x<8;x++) { for (y=0;y<loop;y++) { str+=" "; // loop times four spaces in front of each line } str+=frame[count][x]; } document.f.t.value=str; count++; // increase frame; if (count==4) { count=0; loop++; loop%=10; } setTimeout("animate()",60); } animate(); </SCRIPT> </BODY> </HTML> <-- until here ] Script tested and it worked. You can see it on: http://fmf.ml.org/~shimrod/asciiart/dynamic.html Greetz, -- (`. ____________________________ \ `. / __/ / / / /_ / /_ / ) `._..---._ \__ \ \ \ \_\ \ \ \ \_\ \ \`. __...---` o ) /___/_/_/_/_/ /_/_/_/___/___/ \ `._,--' , ___,' Herman Hiddema ---------------------- ) ,-._ \ ) _,-' ----------- mailto:shi...@fmf.ml.org /,' ``--.._____\/--'' http://fmf.ml.org/~shimrod ----------
Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f996b,95e1feafcd3e7471 X-Google-Attributes: gidf996b,public From: Shimrod <csg...@wing.rug.nl> Subject: Re: Cantering MOOSE / anyone do gaits? Date: 1998/01/26 Message-ID: <34C...@wing.rug.nl> X-Deja-AN: 319419505 Content-Transfer-Encoding: 7bit References: <CJ9...@xemu.demon.co.uk> <34C...@freent.toronto.on.ca> <34C...@freent.toronto.on.ca> <PBk...@xemu.demon.co.uk> To: Dave Bird---St Hippo of Augustine <new...@xemu.demon.co.uk> Content-Type: text/plain; charset=us-ascii Organization: http://huizen.dds.nl/~shimrod/ Mime-Version: 1.0 Newsgroups: alt.ascii-art
Related ASCII art in the Gallery
Explore these categories from our collection of 11,000+ artworks:
Make your own ASCII art
Turn images, text or 3D into ASCII, or draw your own – right in your browser.
About this message.
This message was posted publicly to the newsgroup
alt.ascii-art
in 1998 and is mirrored here unchanged as part of the Historic Archives – only email addresses are masked.
The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can.
Are you the author? Contact us to get your posts attributed, connected to your artist profile, or removed.
Report this message
Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.