Public Group

# One quick question

This topic is 5102 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

How might one draw a rectangle on a TI-83 plus... without saving it as a picture or anything.. like to put it in a program "draw this rectangle" or whatever... Thanks.

##### Share on other sites
Doesn't say ->_<-

##### Share on other sites
Use the line function to draw 4 lines between the 4 corners of the rectangle. Then use DispG (or whatever it is for a Ti-83) to display the graph. Probably insert a pause statement in there after that or something - depends what you want to do.

##### Share on other sites
That's not what im trying to accomplish. I'm trying to make it to where I can put it on one line, and it appears, rather than go each step individually, when it draws it.

##### Share on other sites
Quote:
 rather than go each step individually

What do you mean by this? You can have the 4 lines drawn simultaneously, so you won't even be able to notice that they're all drawn separately.

Do it within a program. Have the user input the 4 points. Draw the lines. Display the graph. Done.

##### Share on other sites
Can you fill it at the same time?

##### Share on other sites
:Line(X1,Y1,X2,Y1):Line(X2,Y1,X2,Y2):Line(X2,Y2,X1,Y2):Line(X1,Y2,X1,Y1)

^^^ All on one line (not that it would make a difference if it were on four lines).

All of this material is definitely covered in the manual.

##### Share on other sites
When it comes down to it a computer can only perform one instruction at a time. Thus, if you want to draw a box, you tell it to draw each line according to the coordinates you give them. It usually happens so fast that you don't notice it. So your code would do this:

Draw line 1;
Draw line 2;
Draw line 3;
Draw line 4;
Calculate the area;
Fill in the area;

All those steps would happen so fast that you'd just see the end result.

##### Share on other sites
To fill you need to use the shade function, which sadly only takes two function values as parameters. Since a rectangle is defined by 3 4 functions, I don't know if you'll be able to shade it without altering the pixel data... which is really slow unless you're using ASM, and I gather you're not...

EDIT: what was I thinking? A rectangle is defined by 4 functions... not 3. Pardon the error!

[Edited by - Mushu on October 7, 2004 8:09:32 PM]

1. 1
2. 2
3. 3
4. 4
Rutin
11
5. 5

• 12
• 19
• 10
• 14
• 10
• ### Forum Statistics

• Total Topics
632666
• Total Posts
3007719
• ### Who's Online (See full list)

There are no registered users currently online

×