One quick question

Started by
9 comments, last by dontknowanything 19 years, 6 months ago
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.
Advertisement
Read the manual.
Doesn't say ->_<-
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.
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.
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.
Can you fill it at the same time?
: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.
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.
- A momentary maniac with casual delusions.
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]

This topic is closed to new replies.

Advertisement