TinyRC.com

TinyRC.com (http://tinyrc.com/forums/index.php)
-   Miscellaneous Discussion (http://tinyrc.com/forums/forumdisplay.php?f=37)
-   -   java flower (http://tinyrc.com/forums/showthread.php?t=17929)

rallger 01-30-2004 02:08 PM

java flower
 
public class FlowerMaker extends Turtle
{
// Draw two flowers each 60 pixels tall.
// Start and end facing east at the base of the left flower.

public void drawTwoFlowers()
{ drawFlower();
move (90, 61);
drawFlower();
move (90, -59);
} //======================


// Start facing east at the base of the flower, right side.
// End facing south at the base of the flower, center.

public void drawFlower()
{ paint (90, 50); // right side of stem
paint (90, 2);
paint (90, 50); // left side of stem
paint (90, 1);

paint (90, 5); // one-fourth of the way up the stem
paint (-45, 8); // draw the twig for the right leaf
drawLeaf();

paint (45, 5); // one-half of the way up the stem
paint (45, 8); // draw the twig for the left leaf
drawLeaf();


paint (-45, 5); // one-fourth of the way up the stem
paint (-45, 8); // draw the twig for the right leaf
drawLeaf();

paint (45, 5); // one-half of the way up the stem
paint (45, 8); // draw the twig for the left leaf
drawLeaf();



paint (-45, 30); // to top of stem, in the center
switchTo (RED);
fillCircle (5); // draw the flower petals

switchTo (BLUE);
move(0,10);
fillCircle (5); // draw the flower petals
move(-120,10);
fillCircle (5); // draw the flower petals
move(-60,10);
fillCircle (5); // draw the flower petals
move(-60,10);
fillCircle (5); // draw the flower petals
move(-60,10);
fillCircle (5); // draw the flower petals
move(-60,10);
fillCircle (5);// draw the flower petals
move(-60,10);




switchTo (BLACK);
move (-120 , 60); // return to the base of the flower
} //======================


// Draw one leaf on one flower.

public void drawLeaf()
{ switchTo (GREEN);
fillCircle (3);
move (0, 3);
fillCircle (2);
move (0, 2);
fillCircle (1);
move (0, -13);
switchTo (BLACK);
} //======================
}

pacificwarriors 02-03-2004 05:48 PM

ok is this 1 of those things that you draw on a graph i wanna try it


All times are GMT -5. The time now is 05:30 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.