Page 1 of 1

Random Fractal Avatar

Posted: Thu Jun 23, 2005 8:35 pm
by Vilkacis
Okay, because some of you may be wondering about the change to my avatar, it's probably just temporary. You see, I saw what Lupin did with his avatar (that is, he randomized it), and being the curious person I am, I decided to try to emulate the effect. Also, it occurred to me, why bother with a limited number of images when I can have an infinite number? So, thus, my random fractal avatar was born:

Image

Not quite as cool as I imagined it, but a lot of fun to write nonetheless.
:lol:

-- Vilkacis

Posted: Thu Jun 23, 2005 8:52 pm
by Figarou
I think its cool to have random pics as the avatar. I've seen it done before at other forums. I like to know how its done so I can do the same. :D

Posted: Thu Jun 23, 2005 9:00 pm
by Figarou
hehe...sneaky little devil I am!!

Added one more option to the poll.

:D

Posted: Thu Jun 23, 2005 9:07 pm
by Lupin
Mine, at least, is a real simple php script that selects a random image from the directory it's in.

Posted: Thu Jun 23, 2005 9:16 pm
by Figarou
Lupin wrote:Mine, at least, is a real simple php script that selects a random image from the directory it's in.

interesting. Did you write this yourself?

Posted: Thu Jun 23, 2005 10:27 pm
by Lupin
Figarou wrote:
Lupin wrote:Mine, at least, is a real simple php script that selects a random image from the directory it's in.

interesting. Did you write this yourself?
It's based on someone elses script, but I ended up ripping most of the old script out and replacing it with my own code.

Posted: Thu Jun 23, 2005 11:34 pm
by Aki
As cool as that tis, i liked the old one better. :P

Posted: Thu Jun 23, 2005 11:38 pm
by Vilkacis
Aki wrote:As cool as that tis, i liked the old one better. :P
Heh, I'll be back to the old one before long, don't you worry.

I'm just showing this off for a little while.

-- Vilkacis

Posted: Thu Jun 23, 2005 11:52 pm
by Lupin
So how are you generating the fractal?

Posted: Thu Jun 23, 2005 11:58 pm
by Vilkacis
Lupin wrote:So how are you generating the fractal?
I'm working on commenting the code right now, then I'll post it :D

It's a Markus-Lyapunov fractal.

-- Vilkacis

Posted: Fri Jun 24, 2005 9:38 am
by Vilkacis
Okay, here we go:

The source code can be found here.

I used this java code as my primary reference as far as fractal generation goes.

In order to get it to work on phpBB, you'll have to add something like this to your .htaccess file on your server:

Code: Select all

Redirect /fractal/randomav.jpg http://www.thevilkacis.net/fractal/randomav.php
EDIT: (Note: that's supposed to be a single line)

That way you can link to it as if it were an image instead of a php file (phpBB won't let you link to a php file like that for your avatar).

-- Vilkacis

Posted: Fri Jun 24, 2005 9:49 am
by Vilkacis
I went back to my old avatar
:lol:

The fractal was neat, but it doesn't fit well as an avatar here. Anyway, you can still see it at the top of this thread.

-- Vilkacis

Posted: Fri Jun 24, 2005 3:59 pm
by Figarou
I'm not sure what I did, but I tried to post the code/script into my website. I even got help from Vilkacis. It is cool to have different pics show up. But its not worth losing your website if you place the code in wrong.

I still think its cool though. :D

Posted: Fri Jun 24, 2005 4:31 pm
by Lupin
Vilkacis wrote: That way you can link to it as if it were an image instead of a php file (phpBB won't let you link to a php file like that for your avatar).
It won't? I was wondering about that. I just used the redirect because I was too lazy to edit my profile for the new image.

Posted: Fri Jun 24, 2005 4:43 pm
by WolvenOne
kinda indifferent to it myself but, hey, whatever floats your boat.

Posted: Fri Jun 24, 2005 4:47 pm
by Lupin
Figarou wrote:I'm not sure what I did, but I tried to post the code/script into my website. I even got help from Vilkacis. It is cool to have different pics show up. But its not worth losing your website if you place the code in wrong.

I still think its cool though. :D
Yeah, that's why I stuck all of it in it's own directory. I have a bad habit of sticking large images in ~lupin/ so I figured that accidently using one of those would be a bad idea.

Posted: Fri Jun 24, 2005 5:24 pm
by Vilkacis
Lupin wrote:It won't? I was wondering about that. I just used the redirect because I was too lazy to edit my profile for the new image.
Nope. If you try to link to a php file for your avatar, it will display a blank "error" message and reject your change. Furthermore, if you try to link to it with the tags, it won't recognize it:

Image

-- Vilkacis

Posted: Fri Jun 24, 2005 5:27 pm
by Vilkacis
Figarou wrote:I'm not sure what I did, but I tried to post the code/script into my website. I even got help from Vilkacis.
To clarify, we got the script working correctly, but we were having trouble getting the server to redirect correctly with the .htaccess file.

-- Vilkacis

Posted: Fri Jun 24, 2005 6:34 pm
by outwarddoodles
I was seeing those and kept wondering 'What the heck?', personally I might want to try it, put a couple pictures of demons llamas and maybe one of Kuzco, thats really cewl.

Posted: Tue Jun 28, 2005 8:24 pm
by Lupin
Vilkacis wrote:
Nope. If you try to link to a php file for your avatar, it will display a blank "error" message and reject your change. Furthermore, if you try to link to it with the tags, it won't recognize it:

Image
I don't know why I didn't think of this earlier, but there's a real easy workaround. Just apppend a slash and a 'legal' filename to the end of the url.

Fo example. my avatar URL is now http://nospam.kicks-a**.net/~lupin/avat ... p/fake.jpg

And
Image

(Note: this only works on webservers running apache, which is most of them anyway.)

Posted: Tue Jun 28, 2005 9:07 pm
by Vilkacis
Never thought of that :wink:

Much easier than messing around with .htaccess files and redirects.

-- Vilkacis