Post Reply 
GROBW/GROBH vs GROBW_P/GROBH_P
10-11-2018, 09:18 AM (This post was last modified: 10-11-2018 09:32 AM by toml_12953.)
Post: #5
RE: GROBW/GROBH vs GROBW_P/GROBH_P
(10-11-2018 02:34 AM)sasa Wrote:  Thank you for your respond. I understand these functions are for Cartesian plane - the screen coordinate system have top left corner defined as (0,0) (a relict from early CRT time), while in Cartesian plane (0,0) is the center...

The beauty of using Cartesian coordinates is that you can define the screen to be anything you want. (0,0) can be in the lower left if you only want to deal with quadrant 1. See how much simpler the following program is with a user-defined coordinate system?

Code:
EXPORT SINWAVE()
BEGIN
Xmin:=0; Xmax:=2*PI;
Ymin=-.85; Ymax=1;
RECT(0);
LINE(0,0,2*PI,0,#777777);
FOR A FROM 0 TO 2*PI STEP .01 DO
  PIXON(A,SIN(A),#00FF00);
  PIXON(A,COS(A),#0000FF);
END;
FREEZE;
END;

Think of how you'd have to write those LINE and PIXON statements if (0,0) was the upper-left corner and (319,239) was the lower-right!

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
GROBW/GROBH vs GROBW_P/GROBH_P - sasa - 10-10-2018, 11:27 PM
RE: GROBW/GROBH vs GROBW_P/GROBH_P - sasa - 10-11-2018, 02:34 AM
RE: GROBW/GROBH vs GROBW_P/GROBH_P - toml_12953 - 10-11-2018 09:18 AM
RE: GROBW/GROBH vs GROBW_P/GROBH_P - sasa - 10-11-2018, 01:27 PM
RE: GROBW/GROBH vs GROBW_P/GROBH_P - sasa - 10-11-2018, 07:34 PM
RE: GROBW/GROBH vs GROBW_P/GROBH_P - sasa - 10-11-2018, 12:52 PM
RE: GROBW/GROBH vs GROBW_P/GROBH_P - sasa - 10-12-2018, 06:46 AM



User(s) browsing this thread: 2 Guest(s)