Programming in Anime, Firefox Addons

Posted in Multiply on Jan 24, ’09 8:28 PM

Hello guys…

This is the very first time I posted something out of the blue (well, maybe not the first time; it doesn’t matter anyway). It is SO boring here (I don’t have the urge to study) so whatever this post’s outcome will be, then so be it. 🙂

For starters:


This picture is from Digimon Adventure 01 (the anime I am currently watching). For those who do not know, this code is the one translated from symbols by Koushiro (Tentomon’s owner). At first glance, it is just a BASIC code (please correct me if I’m wrong) that does mathematical computations (notice the square root functions) and does further processing via the fractal function (which then calls itself recursively).

I’ll just type the code here:

100   /* func sample, coast creation */
110   float s
120   while s<1 or s>2
130        input “ratio 1 to 2”; s
140   endwhile
150   s = (s-1)/10+1
160   screen 1,2,1,1
170   s=sqr(s*s-1)
180   float x0=100, x1=412, y0=0, y1=0
190   fractal(x0,x1,y0,y1,1)
200   line(100, 50, 412, 50, 255, 65535)
210   end
220   func fractal(x0;float,x1;float,y0;float,y1;float,sp;int)
230        float l, r, x2, y2
240        l=sqr[(x1-x0)*(x1-x0)+(y1-y0)*(y1-y0)]
250        if l<2 or sp>=9 then (
260               line(x0,y0/3+50,x1,y1/3+50,255,65535) ; return()
270        )
280        r=rnd()+rnd()+rnd()-2
290        x2=(x0+x1)/2+s*(y1-y0)*r
300        y2=(y0+y1)/2+s(x0+x1)*r
310        sp = sp + 1
320        fractal(x0,x2,y0,y2,sp)
330        fractal(x2,x1,y2,y1,sp)
340   endfunc

There! Done typing! 🙂

What’s notable with this is that this code segment seem to do nothing but churn numbers (with the distance formula appearing at line 240 and the midpoint fla at lines 290 and 300), then call fractal again recursively two times (at lines 320 and 330). The program gets input at line 130 via a while loop. When input is either less than 1 or greater than 2, the program again prompts the user to enter a number (displaying the message “ratio 1 to 2”). As you can see, the valid inputs are from the interval (1,2) (1 and 2 not included).

Also, there you can see function line at 200, which was not declared in this code segment. My guess is that maybe this is a built-in function, or declared somewhere else (of course, this should be declared somewhere).

Also, this function returns when 250 is satisfied, after executing 260 (calling function line then returning afterwards). Whatever function line does, we do not know; this is the only code segment that was shown at the whole season.

What interests me so much is that this code segment made the following transformation possible:


On the left is Tentomon (holding Koushiro’s laptop) and to the right is Kabuterimon, Tentomon’s Adult form.

Cool, isn’t it? (This happened at ep 5).

Secondly, this picture:

This is what my Firefox looks like now.
This is about:blank page.

How did I do it?
Btw, this is my Linux version of Firefox.

1. Install Stylish add-on.
2. Then, go to http://www.userscripts.org and search for the following scripts:

a. Matrix – Global Style      <- makes all webpages have a black background and green text
b. about:blank – Dark Firefox  <- for displaying the blue Firefox logo at every blank tab
c. BlackMail (real black gmail Theme)
d. Firefox 3 – Chrome Theme  (Dark Gray) Tabs on Top   <- for Google Chrome styled tabs
e. Firefox 3 – Tab Tweaks
f. OneManga – Optimal Viewing
g. Yahoo! Wide BlackForest

Anyway, all of these are optional; so choose whatever you like.

I conclude this post by wishing you a happy day. 🙂

 

Multiply comments

zizo0003 wrote on Nov 19, ’10
assuming command “line” draws a line between (x0,y0) and (x1,y1) I found that this code draws a sequence of lines between the points (100,50) and (412,50) along with a straight line between these two points .
if anyone is interested mail my at zizo_0003@yahoo.com
Comment deleted at the request of the thread owner.

chong69 wrote on Jan 25, ’09

C or C++? I believe not. The line numbers already can tell us that this is not C (in BASIC, line numbers are important). Also, there are no opening/closing braces, which are prerequisites in C programs for grouping statements. Also, “input” is not a special word in C, but it is in BASIC.

Please be not offended. I don’t intend to offend anybody, I’m just saying what I know.

none taken!

we all are human, thus flawed! 😀

and its good to learn something new! 😀

thegenuisishere wrote on Jan 25, ’09
chong69 said

:))

true…

the program’s not really BASIC, but more of C or C++

but then again, who knows??? 🙂

C or C++? I believe not. The line numbers already can tell us that this is not C (in BASIC, line numbers are important). Also, there are no opening/closing braces, which are prerequisites in C programs for grouping statements. Also, “input” is not a special word in C, but it is in BASIC.

Please be not offended. I don’t intend to offend anybody, I’m just saying what I know.

chong69 wrote on Jan 24, ’09, edited on Jan 24, ’09
:))

true…

the program’s not really BASIC, but more of C or C++

but then again, who knows??? 🙂

 

Jan 24, ’09 8:28 PM
Advertisements

1 Puna

Filed under Archives, Codes, Multiply

One response to “Programming in Anime, Firefox Addons

  1. Pingback: What makes Globalization of Japanese Comics Successful? « Reply2Julian

Mag-iwan ng Tugon

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Baguhin )

Twitter picture

You are commenting using your Twitter account. Log Out / Baguhin )

Facebook photo

You are commenting using your Facebook account. Log Out / Baguhin )

Google+ photo

You are commenting using your Google+ account. Log Out / Baguhin )

Connecting to %s