[QUOTE=User.;16825824]yep, i did
anyway, here's the finished script. the image is fully scalable now
[php]
<?php
$size = 400;
$centre = $size / 2;
$top = $centre - $size * .375;
$inc = 10;
$maxalpha = 110;
$img = imagecreatetruecolor($size, $size);
imageline($img, $centre, $top, $centre, $size - $top, imagecolorallocate($img, 40, 180, 255));
for ($i = $a = $b = 1; $i <= $centre; $i += $inc, $a += round($maxalpha / ($centre / $inc), 1), $b++)
{
$blue = imagecolorallocatealpha($img, 40, 180, 255, $a);
$white = imagecolorallocatealpha($img, 255, 255, 255, $a);
imageellipse($img, $centre, $centre, $i*1.5, $size*.75, $b % 2 ? $blue : $white);
imageellipse($img, $centre, $centre, $size*.75, $i*1.5, $b % 2 ? $blue : $white);
}
header('content-type: image/png');
imagepng($img);
imagedestroy($img);
?>
[/php]
example
[editline]02:12AM[/editline]
what the..
by upping the image size to 5000 this happened
that is amazing[/QUOTE]
Make it take GET vars so we do dynamic shit with it.
[QUOTE=Grayron;16826564]:aaa:[/QUOTE]
:aaa:
[QUOTE=Xeon06;16828027]Make it take GET vars so we do dynamic shit with it.[/QUOTE]
What? You can't do that yourself?
[QUOTE=User.;16825824]
what the..
by upping the image size to 5000 this happened
[/QUOTE]
[media]http://i28.tinypic.com/6hojlt.jpg[/media]
:saddowns:
Need to have GD
i think it's because the memory limit on the server is set too low, it's just not showing the error
try adding the following to the top of your script
[php]ini_set('memory_limit', '1000M');[/php]
the max execution time might need changing too
[editline]09:51AM[/editline]
sorry for filling up the thread with this rubbish but this is just insane...
[img]http://dl.getdropbox.com/u/790162/woah.png[/img]
[QUOTE=User.;16825824]
[img]http://dl.getdropbox.com/u/790162/whatthe.png[/img][/QUOTE]
Saved and imported as brush in photoshop
They look really cool. You have now caused me to begin playing with GD. Hopefully I'll have something awesome to show soon.
[QUOTE=Wickedgenius;16832349]You have not caused me to begin playing with GD.[/QUOTE]
Okay.
Never really done much GD myself, other than image caching, looks pretty fuckin' awesome though :D
[QUOTE=Dlaor;16833776]Okay.[/QUOTE]
Meh, edited.
[QUOTE=User.;16831352]i think it's because the memory limit on the server is set too low, it's just not showing the error
try adding the following to the top of your script
[php]ini_set('memory_limit', '1000M');[/php]
the max execution time might need changing too
[/QUOTE]
Still gives an internal server error. And fun fact: it works with sizes up to exactly 1497.
Playing with gd is fun.
I built a USB HID gameport adapter.
It's built around the AVR ATtiny2313 MCU and has four 555 timers wired in astable mode to convert the joystick rheostat impedances into a variable frequency/duty cycle square wave for easy reading. It uses the [url=http://www.obdev.at/products/vusb/index.html]V-USB[/url] library to handle USB communications, which allows it to appear as a plug-and-play USB HID device that requires no extra drivers on the host side. I've tested it on both Linux and Windows machines.
[img]http://img248.imageshack.us/img248/4447/gameportusbhid.jpg[/img]
Sorry for the crappy cellphone pic, but I don't have a real camera.
[img]https://dl.getdropbox.com/u/99765/ui_1.png[/img]
component panels in pink
text panels in green
[QUOTE=ROBO_DONUT;16839530]I built a USB HID gameport adapter.
It's built around the AVR ATtiny2313 MCU and has four 555 timers wired in "astable" mode to convert the joystick rheostat impedances into a variable frequency/duty cycle square wave for easy reading. It uses the [url=http://www.obdev.at/products/vusb/index.html]V-USB[/url] library to handle USB communications, which allows it to appear as a plug-and-play USB HID device that requires no extra drivers on the host side. I've tested it on both Linux and Windows machines.
[img]http://img248.imageshack.us/img248/4447/gameportusbhid.jpg[/img]
Sorry for the crappy cellphone pic, but I don't have a real camera.[/QUOTE]
Cool. I've been thinking about doing something like this with my Arduino(ATMega168) for my N64/GC controllers.
Nothing to show right now. Been playing around with ways to store data that my app uses. So far I am very impressed by JSON. Lightweight and easy to use/read.
[code]
{"Name":"Name here!",
"Description":"Description here!",
"Addresses":[
{"Address":"0051B663", "Original":"B8 EA 0D 60 00", "Patched":"C2 04 00 90 90"}
]
},[/code]
[QUOTE=Xera;16840442]Cool. I've been thinking about doing something like this with my Arduino(ATMega168) for my N64/GC controllers.[/QUOTE]
I interfaced an Arduino with my PS2 controller. I had to send it as serial TTY/COM port data and write special software for the host side. It works (in Linux, at least -- the input APIs are different for each platform), but getting the software all set up on each machine I want to use it with is a huge pain in the ass. That's why I switched over to USB HID for this project.
Nekkid habbo :X
Sorry for being a tad late, but what language/program are you using to do that with, qurl?
[QUOTE=The Inzuki;16842186]Sorry for being a tad late, but what language/program are you using to do that with, qurl?[/QUOTE]
C++, Directx
[QUOTE=qurl;16842463]C++, Directx[/QUOTE]
Ah, thanks. I should start learning C++ again, although the book my dad bought me doesn't seem so real. It's one of those "<word(s) here> For Dummies" :v:
[IMG]http://i429.photobucket.com/albums/qq12/the1trueryandaniels/asteroid.png[/IMG]
Trying to generate asteroids, but these are too round. I've managed to do some cool shapes, but they always over-draw and leave an ugly hangnail;
[IMG]http://i429.photobucket.com/albums/qq12/the1trueryandaniels/asteroid_hangnail.png[/IMG]
Any ideas on algorithms to draw asteroids that aren't circles with bumps?
My immediate brain-solution would be use the classic Cos/Sin Arithmetic to generate a circle but change the radius by random amount within a range of the last values. But one problem I see with this is they will be circular.. So maybe generate random proportioned ovals and then randomise the radius.
But I don't know wether this is what you are doing currently.
Also: My Musos (The name of the things that walk on the tiles) are now playing sounds dependant on the tile colour (Each colour represents a note on the Chromatic scale from E to E + 2 octaves.)
Anyone able to guess the game yet? :o
[url]http://i17.photobucket.com/albums/b93/tezzanator/220809-0056.png[/url]
All I can say is, Garry's Todo-list-on-paper Idea works a treat, I am 300% more productive as usual, I tend to piss about on the internet too much :D
[QUOTE=User.;16825824]
[img]http://dl.getdropbox.com/u/790162/whatthe.png[/img]
[/QUOTE]
This looks AMAZING.
[QUOTE=Tezza1234;16844609]My immediate brain-solution would be use the classic Cos/Sin Arithmetic to generate a circle but change the radius by random amount within a range of the last values. But one problem I see with this is they will be circular.. So maybe generate random proportioned ovals and then randomise the radius.
But I don't know wether this is what you are doing currently.
Also: My Musos (The name of the things that walk on the tiles) are now playing sounds dependant on the tile colour (Each colour represents a note on the Chromatic scale from E to E + 2 octaves.)
Anyone able to guess the game yet? :o
[url]http://i17.photobucket.com/albums/b93/tezzanator/220809-0056.png[/url]
All I can say is, Garry's Todo-list-on-paper Idea works a treat, I am 300% more productive as usual, I tend to piss about on the internet too much :D
This looks AMAZING.[/QUOTE]
[code]
vector <Point> MakeAsteroidMesh(int diameter) {
float radius= diameter/ 2.0f;
int mesh_detail= int(2* PI* radius);
float degree_step= 360.0f/ mesh_detail;
Point next= Point().ADD(radius, 0);
vector <Point> mesh;
mesh.push_back( next.RandomChange(1) );
for(int i= 0; i< mesh_detail; i++) {
next= Orbit(next, Point(), int(degree_step) );
mesh.push_back( next.RandomChange(1) );
}
return mesh;
}
[/code]
Basically, I just make a certain amount of points (determined by size), and as I add them to the mesh vector, I fuck them up a little. The hangnail version just fucked them up permanently, which causes the next point to be fucked up by the last points fucking up. However, as you can expect, and see, the combined fuck-ups eventually cause the last point to be placed really far away from the first point, which causes the hangnail, because I automatically connect the first and last points the mesh when drawing.
[img]http://winsaucestudios.com/forum/index.php?action=mgallery;sa=media;id=103[/img]
[img]http://winsaucestudios.com/forum/index.php?action=mgallery;sa=media;id=102[/img]
Moar info: [url]http://winsaucestudios.com/forum/index.php/board,44.0.html[/url]
I'll make a thread soon enough too.
[highlight]FUCK[/highlight]
Box2d, despite their claims that all their shit would have "b2" attached to the front of it, made a an "Point" object, which conflicts with my own "Point" object, so I had to rename mine to "RyPoint" which pisses me off because it's more letters and ugly as fuck.
Damnit -[ Fizzadar ]-, I read the page title. :(
Sorry, you need to Log In to post a reply to this thread.