Hi there!!
If you PLOT a dot, and then change the ORIGIN co-ordinates, the computer
should really remember the dot I've plotted, and draw a line with a new ORIGIN-
right???
Tah, Simon. ;D
no. the coordinate system has been changed. for your approach try "drawr" or "mover" instead.
Locomotive BASIC - CPCWiki (https://www.cpcwiki.eu/index.php/Locomotive_BASIC#MOVER_xr.2Cyr.5B.2C.5Bi1.5D.5B.2Ci2.5D.5D)
I tried what you said, and I couldn't get it to work!! ???
I've included the program, I'm trying to get to work.
What it does, is asks for X,Y & X2,Y2 - the begining and
end of the line entered.Then, it asks for X value, along
the line, to draw a perpendicular line (90 degrees) compared
to original line.Then it asks, the value for X for the end of the
90 degree line.
The purpose of this, is to be able, to 'stretch' the line to the
90 degree lines limits, to 'bend' then line, similar to the Windows
program 'Paint'.Once the X & Y of the 90 degree limits, are there,
the 'Radius' of the 2 halves, can be worked out.
This only works out, a smooth oval, even though Paint can do
more variants, of this.
I've included a drawing of this,as an attachment...
Thanks Simon.
Re:LINE PROGRAM
ORIGIN won't recalculate the relative position of the "last point plotted", it's really intended to be set before doing any plotting to make it easier to draw graphs with negative axis etc rather than being something you constantly change.
If you want to draw a line from the last point plotted, either use DRAWR and just give it the offsets to the destination, or use DRAW and specify both points. Don't change the ORIGIN at all.
Quote from: simon christo on 21:57, 04 January 25If you PLOT a dot, and then change the ORIGIN co-ordinates, the computer
should really remember the dot I've plotted, and draw a line with a new ORIGIN-
right???
No.
The ORIGIN command always
resets the last plot coordinate to 0,0 of the new origin.
If you do
ORIGIN 100,100
DRAW 100,100
it will be the same like
ORIGIN 0,0
MOVE 100,100
DRAW 200,200
A quick test.
Thanks eveyone, for your help!!
Simon.