COMMODORE PLUS/4 WORLD
  Home  Search  Games  Tapes  Covers  Cheats  Maps  Software  New Stuff 
 Hall Of Fame  HVTC  Game Endings  Features  Solutions  Remakes  Publications  Magazines  Effects  Top List 
 Members  Groups  Plus/4 Encyclopedia  Hardware  Tools  Options  Forum 
Login
Back to forumReply To This TopicGo to last reply

Posted By

SVS
on 2017-03-16
09:05:23
 Use of CIRCLE command in Multicolor Mode

A question for you, graphic masters!

As known the resolution of Multicolor Screen is 160*200 instead of 320*200 of Hires one.
The Basic commands (Box, Circle, etc.) seem do not consider this when they draw their figures. The result is that the pictures are distorted (especially if is set an inclination).
Well: is there a way to correct this distortion in order to obtain plain figures even if inclined?
Thank you.

Posted By

MMS
on 2017-03-18
06:11:00
 Re: Use of CIRCLE command in Multicolor Mode

Sorry to answer to this, as I am not a graphic master, just to share what I learned from the books

Plus/4 Programmers reference guide Page 23:
(as a conclusion: even in HIRES mode you need a little smaller vertical diamater to get a real circle instead of oval)

"4. Vertical radius is the distance from the center of the shape to the top and
bottom of the shape. Because vertical dots on the high-resolution graphic screen
are slightly farther apart than horizontal dots are, when the vertical and horizon
tal radii have the same value, the shape drawn is an oval, not a circle. To draw a
circle, the vertical radius must be scaled to the horizontal radius (e.g., 50 horizon
tal, 47 vertical). For multicolor coordinates, 25 horizontal is about 47 vertical."


I think that if you want to keep the same commands irrespective of the mode you use (or do not know in advance), you may use the SCALE command.
In fact I've never understood how it could be really useful, maybe in a CAD program? :-D

Programmer's reference Guide:

"The SCALE command lets you change these values to 1024 logical dots both
across and down in any mode.
In particular, this is useful when you are unsure whether a final program will
run in high-resolution or in multicolor mode. If you do all the drawing with
SCALE on, the figures will be the same size in either mode. No coordinate
transformations are required to move between high resolution and multicolor
SCALEd coordinates.
The SCALE command may be executed at any time and remains in effect until
canceled.
After you turn on scaling, you must adapt the drawing commands to the new
screen coordinates. For example, the center of the high-res screen is no longer
160,100. It is now 512,512.
To calculate SCALEd values from high resolution or multicolor coordinates,
use these formulas:
High-res rows 5.12 * row coordinate
High-res columns 3.2 * column coordinate
Multicolor rows 5.12 * row coordinate
Multicolor columns 6.4 * column coordinate

For example, to get the same circle as drawn without SCALE by
CIRCLE, 160,100,60,50, you can use the following lines with SCALE:

5 SCALE 1
10 A = 3.2 * 160: B = 5.1S * 100
20 C = 3.2 * 60: D = 5.12 * 50
30 GRAPHIC 2,1
40 CIRCLEA3,C,D"


Posted By

SVS
on 2017-03-20
04:19:02
 Re: Use of CIRCLE command in Multicolor Mode

Thank you MMS.
I'll perform some tests and then feed back.

*EDIT*
The problem is the "inclination" of the shape. For example an equilateral triangle results distorted even after SCALE 1. The same one without inclination results correct even without SCALE.

But there is an exception: if you specify as parameters only: center' coordinates, first ray, and sides' angle (leaving default for the others) then the shape will result correct.




Back to topReply To This Topic


Copyright © Plus/4 World Team, 2001-2017