News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

ORIGIN COMMAND WHOES

Started by simon christo, 21:57, 04 January 25

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

simon christo

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

HAL6128

no. the coordinate system has been changed. for your approach try "drawr" or "mover" instead.
Locomotive BASIC - CPCWiki

simon christo

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.

simon christo


andycadley

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.

Prodatron

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

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

eto


simon christo

Thanks eveyone, for your help!!
Simon.

Powered by SMFPacks Menu Editor Mod