Homestar Runner Wiki Forum
http://forum.hrwiki.org/

My Reddit Alien Drawing
http://forum.hrwiki.org/viewtopic.php?f=20&t=13933
Page 1 of 1

Author:  MikeMcG [ Tue Apr 22, 2008 6:00 am ]
Post subject:  My Reddit Alien Drawing

I pretty much just finished my drawing. I wouldn't consider it finished, though. I still want to improve it as much as I can. For one, I want to try switching the body from an ellipse to two square root modeled curves attached to two line segments. I should probably make the feet a bit bigger. Anyways, what do you think of it?

Image

Code:
<?php

$im = imagecreate(300, 400);

$white = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
$black = imagecolorallocate($im, 0x00, 0x00, 0x00);
$orange = imagecolorallocate($im, 0xFD, 0x46, 0x00);

$thick = 10; //Border

//Feet
imageBorderedArc($im, 110, 330, 50, 50, 180, 0, $thick, $black, $white, false); //Left foot
imageBorderedArc($im, 200, 330, 50, 50, 180, 0, $thick, $black, $white, false); //Right foot

//Arms
//imageBorderedEllipse($im, 160, 220, 145, 80, $thick, $black, $white); One ellipse for the arm
imageBorderedEllipse($im, 120, 250, 60, 75, $thick, $black, $white); //Left arm
imageBorderedEllipse($im, 190, 250, 60, 75, $thick, $black, $white); //Right arm

//Body
   //Try square root modelled line?
imageBorderedEllipse($im, 155, 260, 100, 165, $thick, $black, $white); //Body

//Antennae
imageThickLine($im, 155, 95, 177, 50, 5, $black, 0); //Head --> Second Antennae
imageThickLine($im, 177, 50, 230, 60, 5, $black); //First Antennae --> Bobble
imageBorderedEllipse($im, 230, 60, 35, 35, $thick, $black, $white); //Bobble

//Head
imageBorderedEllipse($im, 75, 130, 50, 50, $thick, $black, $white); //Left ear
imageBorderedEllipse($im, 235, 130, 50, 50, $thick, $black, $white); //Right ear
imageBorderedEllipse($im, 155, 155, 195, 125, $thick, $black, $white); //Head
imageFilledEllipse($im, 120, 150, 30, 30, $orange); //Left Eye
imageFilledEllipse($im, 195, 150, 30, 30, $orange); //Right Eye
imageBorderedEllipse($im, 160, 190, 80, 20, $thick, $black, $white); //Smile p1
imageFilledRectangle($im, 118, 175, 200, 189, $white); //Smile p2 CHEATING CHEATING CHEATING

//Cleanup
imageFilledRectangle($im, 94, 330, 232, 356, $white);
imageThickLine($im, 86, 330, 224, 330, 3, $black);

header('Content-type: image/png');
imagepng($im);
imagedestroy($im);

function imageThickLine($image, $x1, $y1, $x2, $y2, $border, $colour, $toRight = -1){
   if($y1 == $y2 || $toRight == 1){
      for($i = 0; $i <= $border; $i++) imageline($image, $x1, $y1+$i, $x2, $y2+$i, $colour);
   }elseif($x1 == $x2 || $toRight == 0){
      for($i = 0; $i <= $border; $i++) imageline($image, $x1+$i, $y1, $x2+$i, $y2, $colour);
   }else{
      for($i = 0; $i <= $border; $i++) imageline($image, $x1+$i, $y1+$i, $x2+$i, $y2+$i, $colour);
   }
}

function imageBorderedEllipse($image, $cx, $cy, $width, $height, $border, $borderColor, $fillColor){
   imagefilledellipse($image, $cx, $cy, $width, $height, $borderColor);
   imagefilledellipse($image, $cx, $cy, $width - $border, $height - $border, $fillColor);
}

function imageBorderedArc($image, $cx, $cy, $width, $height, $start, $end, $border, $borderColor, $fillColor, $fullBorder = true, $bitWise = IMG_ARC_PIE){
   imagefilledarc($image, $cx, $cy, $width, $height, $start, $end, $borderColor, $bitWise);
   imagefilledarc($image, $cx, $cy, $width-$border, $height-$border, $start, $end, $fillColor, $bitwise);
   if($fullBorder){
      $border /= 2;
      for($i = 0; $i <= $border; $i++) imageline($image, $cx - ($width/2) + 1, $cy + 1 + $i, $cx + ($width/2) - 1, $cy + $i + 1, $borderColor);
   }
}

?>

Author:  STupendous7 [ Tue Apr 22, 2008 1:17 pm ]
Post subject:  Re: My Reddit Alien Drawing

Wow...you made that all with script? That's pretty sweet! :D

Author:  MikeMcG [ Thu Apr 24, 2008 1:47 pm ]
Post subject:  Re: My Reddit Alien Drawing

Thanks. Looking back, it wasn't really that hard to make. It was just getting everything correctly positioned that was hard.

Author:  Einoo T. Spork [ Fri Apr 25, 2008 12:39 am ]
Post subject:  Re: My Reddit Alien Drawing

Why did you call the variable orange when his eyes are clearly red?

Author:  MikeMcG [ Fri Apr 25, 2008 9:08 pm ]
Post subject:  Re: My Reddit Alien Drawing

Puh-lease, they're clearly orange. Therefore $orange.

Author:  16_BIT_MARIO1 [ Thu May 29, 2008 10:20 pm ]
Post subject:  Re: My Reddit Alien Drawing

MikeMcG wrote:
Puh-lease, they're clearly orange. Therefore $orange.

It's more of a red-ish orange color, not pure orange. Anyway, this picture is awesome!

Author:  Starcraft Maniac [ Fri May 30, 2008 11:08 pm ]
Post subject:  Re: My Reddit Alien Drawing

Looks like what one of those LGM's from Buzz Lightyear: Star Command...with red-orange eyes.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/