Author |
Topic: I made a 3D sphere but I need pixel thickness of 2 (Read 244 times) |
|
michael
Senior Member
member is offline


Posts: 335
|
 |
I made a 3D sphere but I need pixel thickness of 2
« Thread started on: Mar 7th, 2016, 6:05pm » |
|
I am converting my emulated 3D tool box to BBC basic.. All I need is a pixel thickness of 2 The VDU statement at the top of the program should work BUT It gives me a tiny window that doesn't do what the examples tell me it should do. I copied the information on the base of my work so you can see I did it supposedly right.
Code:
REM VDU 23,22,1024,768,2,2,16 REM why is this not working?
MODE 8 REM this is my current working window, but I need pixel thickness of 2
OFF
GCOL 1
dimmer=255
FOR x%=0 TO 255
_dimmer =_dimmer-1
COLOUR 1,_dimmer,_dimmer,_dimmer
CIRCLE 500,500,x%
REM FILL 500,500
NEXT x%
REM VDU 23,22,width;height;charx,chary,ncols,charset
REM width = window width in pixels (e.g. 640)
REM height = window height in pixels (e.g. 512)
REM charx = character width in pixels (e.g. 8)
REM chary = character height in pixels (e.g. 16)
REM ncols = number of colours (e.g. 16)
REM charset = 0 for ANSI, 1 for OEM (IBM PC), 8 for UTF-
|
« Last Edit: Mar 7th, 2016, 7:58pm by michael » |
Logged
|
I like making program generators and like reinventing the wheel
|
|
|
DDRM
Administrator
member is offline


Gender: 
Posts: 321
|
 |
Re: I made a 3D sphere but I need pixel thickness
« Reply #1 on: Mar 7th, 2016, 9:32pm » |
|
Hi Michael,
Your version of VDU 23 doesn't work because you have used commas after width and height where you need to use semicolons, as seen in the example. If I recall correctly, the semicolons mean it gets passed to the routine as 16 bit values instead of 32 bits.
It might also be useful to know that you generally get 2 graphics units per pixel, for historical reasons. In other words, if you define a mode which is 600 x 400, there will be 1200 by 800 graphics units (in other words, a circle centred at 600,400 will be at the centre of the window, and if the radius is 400 it will reach the top and bottom (but not the sides)).
Best wishes,
D
|
|
Logged
|
|
|
|
|