CPCWiki forum

General Category => Technical Support - Software related => Topic started by: simon christo on 21:57, 04 January 25

Title: ORIGIN COMMAND WHOES
Post by: simon christo on 21:57, 04 January 25
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
Title: Re: ORIGIN COMMAND WHOES
Post by: HAL6128 on 22:34, 04 January 25
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)
Title: Re: ORIGIN COMMAND WHOES
Post by: simon christo on 04:32, 05 January 25
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.
Title: Re: ORIGIN COMMAND WHOES
Post by: simon christo on 04:34, 05 January 25
Re:LINE PROGRAM
Title: Re: ORIGIN COMMAND WHOES
Post by: andycadley on 11:39, 05 January 25
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.
Title: Re: ORIGIN COMMAND WHOES
Post by: Prodatron on 12:11, 05 January 25
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
Title: Re: ORIGIN COMMAND WHOES
Post by: eto on 12:49, 05 January 25
A quick test.
Title: Re: ORIGIN COMMAND WHOES
Post by: simon christo on 07:22, 06 January 25
Thanks eveyone, for your help!!
Simon.
Powered by SMFPacks Menu Editor Mod